• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Tutorial: Make any EJB Session Bean a Web Service with Axis

 
Author
Posts: 350
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tutorial: Make any EJB Session Bean a Web Service with Axis

This article shows J2EE developers how to use Apache Axis from the IBM ETTK (Emerging Technologies Toolkit) to make any Enterprise JavaBean (EJB) component into a Web service that will run on any application server.
--------------
This tutorial shows J2EE developers how to use the IBM ETTK (Emerging Technologies Toolkit) to make any Enterprise JavaBean (EJB) component into a Web service that will run on any application server.
Do you currently use EJB technology? Have you ever wondered how to expose an EJB component as a Web service no matter what your application server is? This tutorial shows how to use the ETTK and Axis to convert a local and remote EJB component into a Web service. I will use a subcomponent of the ETTK called Axis, a SOAP client implementation originally hosted by the Apache Software Foundation.
The ETTK implements the Web services architecture and provides a set of tools to create, locate and invoke Web services. It includes the following tools:
<ul>
<li>
UDDI4J API allows developers to perform save, delete, find, and get operations against a UDDI registry.
UDDI4J-WSDL API allows developers to perform publish, unpublish, and find operations against a UDDI registry.
WSDL4J allows developers to programmatically read and work with WSDL documents.
</li>
<li>
WSDLdoc allows developers to automatically generate documentation from WSDL files similar to JavaDoc.
WSIL4J allows developers to programmatically read and work with WSIL documents.
</li>
<li>
Axis RC1 allows a developer to generate Web services WSDL definitions from Java code and generate Java proxy code from a WSDL definition. Axis is also the transport engine for Web services.
</li>
<li>
Sample services including Accounting, Contract, Metering, Service Desk etc.
</li>
<li>
Demos and tutorials to illustrate key Web service concepts.
</li>
<li>
Privacy Policy Authorization Director (PAD) Web service allows privacy policy control access to personal information.
</li>
<li>
And much more...
</li>
</ul>
If you are serious about Web services then you have to check out IBM's ETTK!

The primary focus of this tutorial is developing EJB-based Web services with Axis. Axis provides support for turning EJB components into Web services and is included with the ETTK.

What this tutorial covers page
This tutorial covers turning EJB components into Web services and has two step-by-step examples. The first example uses all primitive types with one simple EJB component. The second example uses a SessionBean that talks to several EJB components and returns complex types. All examples ship with a set of Ant build scripts so you can easily create your own custom solutions by reusing the sample build files.
This tutorial assumes you have a working knowledge of Java technology and EJB technology. In-depth knowledge of EJB components, Web services, and Ant are helpful but not required to understand the key concepts. Ant is used to build and deploy the example applications. Reference to introductory material on Ant, Java technology, J2EE, Web services, XML, and EJB components are provided in throughout the tutorial and at the references section at the end of this tutorial.
The source code in the tutorial has been tested with Resin EE application server.
The applications should be easy to port to other J2EE-compliant application servers like IBM WebSphere or JBoss. Please check back at my site for ports to other application servers (see Resources).
I typically get examples from people working with other application servers, and then I put them up on my site (see Resources).
I used the Eclipse framework to create the examples in this tutorial. The examples are easiest to run by downloading Eclipse 2.1 or higher and a J2EE application server plug-in for Eclipse. Eclipse has excellent support for Ant, which facilitates running the Axis and XDoclet Ant tasks right from the IDE environment.
If you are new to Ant, please read this sample chapter from Mastering Tomcat on Developing Web Components with Ant (written by yours truly). Just read the sections on Ant development for now.
<a href="http://www.rickhightower.com/AntPrimer.pdf"> Using Ant </a>
Also note that the Ant scripts can use XDoclet. You will not need to use this functionality, but, in case you decide to, please refer to the developerWorks tutorial, "Enhance J2EE component reuse with XDoclets" (see Resources).
 
catch it before it slithers away! Oh wait, it's a tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic