Network Deployment (Distributed operating systems), v8.0 > Develop and deploying applications > Develop web services > Assembling web services applications > Assembling web services applications > Enable an EAR file for EJB modules that contain web services


Enable an EAR file for web services with the endptEnabler command

Use the endptEnabler command-line tool to enable an EAR file for Enterprise JavaBeans (EJB) modules that contain web services and to specify whether the web services are exposed using SOAP over Java Message Service (JMS) or SOAP over HTTP.

Before doing this task, assemble a web services-enabled enterprise JAR into an EAR file.

The endptEnabler command-line tool adds one or more router modules to the EAR file for each Java API for XML Web Services (JAX-WS) or JAX-RPC based Web service-enabled enterprise bean Java archive (JAR) module within the EAR file. A router module provides an endpoint for the web services in a particular enterprise bean JAR module.

Each router module supports a specific transport such as HTTP or JMS. An HTTP router module is a WAR module that provides an HTTP endpoint for each of the web services contained within a particular enterprise bean JAR module. Likewise, a JMS router module is an enterprise bean JAR module that contains a Message Driven Bean (MDB) that serves as the message listener for requests intended for the web service endpoints.

If no enterprise bean JAR modules exist in the EAR file, it is not necessary to use this tool.


Procedure

  1. Invoke the endptEnabler command.

    Invoke the endptEnabler command from the install_root/bin directory.

  2. The EAR file, when prompted.

  3. Enter various input values as requested by the endptEnabler command. You are prompted for various input values for each enterprise bean JAR module that is enabled for web services in the EAR file. Typically, you accept the defaults for each prompt.

    To learn about the properties of this command, see the endptEnabler command documentation.

    1. Specify an HTTP router module to transport your EJB-based web service. Use the -transport //publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=/ option to indicate the web service is available using HTTP. One router module is created for each enterprise bean JAR file that contains either JAX-WS or JAX-RPC web services.

    2. Specify an JMS router module to transport your EJB-based web service. Use the -transport jms option to indicate the web service is available using JMS. One router module is created for each enterprise bean JAR file that contains either JAX-WS or JAX-RPC web services.


Results

An HTTP or JMS router module is added to the EAR file for each enterprise bean JAR module within the EAR file that contains web services endpoints. For HTTP, a context-root is configured for the application so that the web service can be invoked through a Web address. The web address used to invoke the web service is:

http://host[:port]/
<context-root>/services/
<port-component-name> 

Ensure that you install the HTTP or JMS router module that you generated with the endptEnabler command onto the same target as your web services enterprise bean JAR files. These HTTP or JMS router modules are included in your web services application and they need to use the runtime libraries of the application server.


What to do next

Deploy the EAR file onto the application server. An assembled EAR file that is enabled for web services is required for deployment.

If you are using JMS as a transport for your web service requests, define the various JMS objects such as queues, topics, or connection factories, that will be used by the application prior to installing the application.


Related


endptEnabler command
Enable an EAR file for EJB modules that contain web services
Assembling an enterprise bean JAR file into an EAR file
Deploy web services applications onto application servers
Assembling web services applications
Use SOAP over JMS to transport web services

+

Search Tips   |   Advanced Search