div.collapsecontent{display:block;}

Express (Distributed operating systems), v8.0 > Develop and deploying applications > Rapid deployment of J2EE applications > Constructing a J2EE application from artifacts > Dropping J2EE artifacts into a free-form project


Deploy Web services using a free-form project

We can add Java beans containing Web service annotation tags to a free-form project. This generates a WSDL file and Web service deployment descriptors, and deploy the Web service.


Before you begin

Restriction: We can use the rapid deployment tools for packaging applications at J2EE 1.3 or 1.4 specification-levels. However, the rapid deployment tools do not support Java EE 5.0 (or later) nor J2EE 1.2 specification-level. For tools support of deploying Java EE 5 and later modules, you can use the monitored directory starting in WAS V8.0 release. For more details about the monitored directory, see Ways to install enterprise applications or modules and Installing enterprise application files by adding them to a monitored directory topics.

Prerequisites: Before you can add the Java bean to the free-form project, the bean must contain the Web service annotation tags that define how the Web service is deployed. The minimum required tag is @WebSphere.WebService, which tells the rapid deployment tools to deploy a Web service. If you want to deploy a stateless session EJB Web service, the Java bean that you add to the free-form project must contain @ejb.session with type=Stateless. For more information about the available tags and how to add them to your beans, refer to the IBM Rational Application Developer for WebSphere online help.


About this task

To deploy a Web service from a Java bean using a free-form project:


Procedure

  1. Create a directory structure within your free-form project that maps exactly to the package name for the bean from which you are deploying the Web service. Note: If your project supports J2EE 1.3 (as compared to J2EE 1.4), the bean and its package structure must be contained in the gen/src folder or the free-form project. If it is located somewhere else the tools creates an SEI with the same name as the bean which in turn results in a conflict.

  2. Use your file management system to properly place your Java bean into the free-form project. The directory name of the free-form project has the same string value you had provided for the -project parameter used in the wrd-config command.
  3. The following activities occur when you drop a bean containing the @WebSphere.WebService tag to a free-form project:

    1. The bean searched for annotation tags and is then compiled.
    2. The bean is analyzed and a Java2WSDL model is created. If any invalid or malformed tags are encountered the deployment process aborts.
    3. The Service Endpoint Interface (SEI) code is generated and compiled.

    4. If you are deploying a stateless session EJB Web service, a Web project is created or selected to act as the router project.
    5. Java2WSDL creates the WSDL file for the Web service.
    6. The Web service deployment descriptors, JAX-RPC mapping file, serializers, deserializers, helper, and holder code are created. These files are then compiled.

    7. If you are deploying a stateless session EJB Web service, the EJB is deployed and the deployment files are compiled.


Results

The Web service endpoint can be accessed with the following URL: //publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=/ :// <hostname>: <WC_defaulthost>/ <free-form project name>Web/services/ <port-component-name>, and the <port-component-name> element can be found in the generated webservices.xml in the Web project.

For example, if your free-form project is called MyProject, the port-component-name is MyService. If we have published the application to myhost using the default ports, then the endpoint URL is: //publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=/ ://myhost:9080/MyProjectWeb/services/MyService


What to do next

Tip: To monitor the rapid deployment activity, run your rapid deployment session with console output. We can complete this by running the rapid deployment launch tool as follows:

Restriction: There is no support for deleting Web services deployed by a free-form project at this time.


Feedback

+

Search Tips   |   Advanced Search