+

Search Tips   |   Advanced Search

Deploy web services applications onto application servers

To deploy Java-based web services, we need an EAR file configured and enabled for web services.

A JAX-WS application does not require additional bindings and deployment descriptors for deployment. JAX-WS web services use annotations instead of a deployment descriptor file. We can still use the deployment descriptor file to augment or override annotations. A JAX-RPC web services application requires additional bindings and deployment descriptors. To install or deploy a JAX-WS application, we only need to install the JAX-WS enabled EAR file. For JAX-RPC, use the wsdeploy command.

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

Use either the administrative console or the wsadmin scripting tool to deploy an EAR file. If we are installing an application containing web services using the wsadmin command, specify the -deployws option for JAX-RPC applications. If we are installing an application containing web services using the administrative console, select Deploy WebServices in the Install New Application wizard.

If our JAX-RPC web services application was previously deployed with the wsdeploy command, it is not necessary to specify web services deployment during installation.


Deploy the EAR file with the wsadmin command

  1. Start install_root/bin/wsadmin from a command prompt.

  2. Deploy the EAR file.

    • For JAX-WS web service applications, run...

        $AdminApp install EARfile "-usedefaultbindings"

    • For JAX-RPC web service applications, run...

        $AdminApp install EARfile "-usedefaultbindings -deployws"

We have a web service installed onto the application server.

While installing web services applications that contain a large number of enterprise beans onto the application server, we might receive out of memory errors. If we receive out of memory errors, increase the heap size of our JVM. If we are installing the application server in a network deployment environment, we might need to increase the heap size of the JVM in the application servers in which we are installing the application, and in the deployment manager profile, dmgr.


What to do next

We can confirm that the web services application was deployed by entering the web service endpoint URL in a browser, then viewing an informative page. The information page contains the following information:

{http://webservice.pli.tc.wssvt.ibm.com}RetireWebServices 
Hello! This is an Axis2 web service!

The first line of this information is variable, depending on the web service. The URI in the brackets is the namespace and the string that follows, in this example RetireWebServices, is the name of the port used to access the web service.

The next step we might want to consider is to apply security to the web service.


Subtopics

  1. Provide options to perform the web services deployment settings
  2. wsdeploy command
  3. JAX-WS application deployment model


Related:

  • Overview of standards and programming models for web services message-level security
  • Secure web services
  • Making deployed web services applications available to clients
  • Developing a webservices.xml deployment descriptor for JAX-WS applications
  • Developing JAX-RPC web services deployment descriptor templates for a JavaBeans implementation
  • Secure web services
  • Task overview: Implementing web services applications
  • Tune the IBM virtual machine for Java
  • Install enterprise application files with the console