Web Services
  Home arrow Web Services arrow Page 5 - Using EJBs with Axis
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
WEB SERVICES

Using EJBs with Axis
By: Sams Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 5
    2006-05-25

    Table of Contents:
  • Using EJBs with Axis
  • Using EJBs from Axis
  • The Session Bean
  • The Deployment Unit
  • Exposing the EJBs via Axis

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Using EJBs with Axis - Exposing the EJBs via Axis


    (Page 5 of 5 )

    This EJB JAR can now be packaged together with Axis into an EAR application. Then the whole can be deployed and the resulting application will let you access these EJBs using SOAP/HTTP via Axis.

    The first task is to package the Axis Web application as a WAR file:

    cd axis11\webapps
    <java_home>\bin\jar cf axis.war *.*

    Doing so creates a Web Application aRchive (WAR) file containing the Axis code.

    The next step is to create an application DD that packages Axis.WAR and the SkatesEJB.jar together into a single application, as shown here:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE application PUBLIC 
    "-//Sun Microsystems, Inc.//DTD J2EE Application
    1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd"> <application id="SkatesTownEJBWS"> <display-name>Skates</display-name> <module id="EjbModule_skates"> <ejb>skatesejb.jar</ejb> </module> <module id="WebModule_Axis"> <web> <web-uri>axis.war</web-uri> <context-root>axis</context-root> </web> </module> </application>

    Usually you'd use a tool from the application server to do this and package the resulting EAR file. The EAR file now contains the following:

    • skates.ear

    • axis.war

    • skatesejb.jar

    • META-INF/MANIFEST.MF

    • META-INF/application.xml

    At this point we move away from pure interoperable J2EE and into the realm of a specific application server. The deployment tooling will augment skates.ear with server- specific files. For example, WebSphere Application Server will generate a number of additional classes and XML files that bind the EJBs we've written into the container. For the examples in this book, we used the latest available WebSphere Application Server—version 5.1, which is available for trial download on the Web (http://www-106.ibm.com/developerworks/websphere/ downloads/WASsupport.html).

    WebSphere allows you to do this outside the runtime using the application assembly tool, and also from the administration console. Other application servers have appropriate methods (for example, BEA WebLogic server has an ejbdeploy tool).

    Please come back next week for the conclusion of this article.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · This article is an excerpt from the book "Building Web Services with Java: Making...
     

    Buy this book now. This article is excerpted from chapter 7 of the book Building Web Services with Java: Making sense of XML, SOAP, WSDL, and UDDI, written by Steve Graham et al. (Sams; ISBN: 0672326418). Check it out today at your favorite bookstore. Buy this book now.

    WEB SERVICES ARTICLES

    - Safety, Idempotence, and the Resource-Orient...
    - The Resource-Oriented Architecture in Action
    - Features of the Resource-Oriented Architectu...
    - The Resource-Oriented Architecture
    - Getting Started with Flex
    - Automated Billing and Faxing for the Web
    - An Introduction to Web Services
    - The Foundations of Web Services: From Novice...
    - Web Services Reengineering: Finishing Touches
    - Fault Handling with Web Services
    - Flow and Web Services
    - Process Lifecycles and Web Services
    - Business Processes and Web Services
    - Orchestrating Web Services
    - Notifications and Resources in the WS-Resour...







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek