Deploy Web services applications onto appservers


 

+

Search Tips   |   Advanced Search

 

After assembling the artifacts required to enable the Web module for Web services into an EAR file, we can deploy the EAR file into the application server.

A JAX-WS application does not require additional bindings and deployment descriptors for deployment. A JAX-RPC Web services application requires you to add additional bindings and deployment descriptors for application deployment.

For JAX-WS, the use of webservices.xml is optional because we can use annotations to specify all of the information contained within webservices.xml. Use the webservices.xml file to augment or override existing JAX-WS annotations. Information defined in webservices.xml overrides corresponding information specified by annotations.

In a mixed node cell, we can only target a JAX-WS enabled enterprise beans module to a server using WAS V7.0. However, we can target a JAX-WS enabled WAR module to a server using either WAS V7.0 or WAS V6.1 Feature Pack for Web Services.

Use wsdeploy with JAX-RPC applications to add WebSphere product-specific deployment classes to a Web services-compatible EAR file or an application client JAR file.

To install or deploy a JAX-WS application, you only need to install the JAX-WS enabled EAR file. If the Web services application contains only JAX-WS endpoints, you do not need to run the wsdeploy command, as this command is used to process only JAX-RPC endpoints.

Ensure that we have installed the HTTP or JMS router module that was generated with endptEnabler onto the same target as the Web services enterprise bean JAR files. These modules are included in the Web services application and they need to use the runtime libraries of the application server.

Use either the admin console or the wsadmin scripting tool to deploy an EAR file. For wsadmin, specify the -deployws option for JAX-RPC applications.

For the admin console, select Deploy WebServices in the Install New Application wizard.

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

To deploy a JAX-WS Web service app with wsadmin...

$AdminApp install EARfile "-usedefaultbindings"

To deploy a JAX-RPC Web service app...

$AdminApp install EARfile "-usedefaultbindings -deployws"

While installing Web services applications that contain a large number of enterprise beans onto the application server, you might receive out of memory errors. If we receive out of memory errors, increase the heap size of the JVM.

 

What to do next

You 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.

 

Related tasks

Making deployed Web services applications available to clients
Provide options to perform the Web services deployment settings
wsdeploy
JAX-WS application deployment model
Develop a webservices.xml deployment descriptor for JAX-WS applications
Develop JAX-RPC Web services deployment descriptor templates for a Java Beans implementation
Secure Web services for V5.x applications based on WS-Security
Secure Web services applications using message level security
Task overview: Implement Web services applications
Tuning the IBM virtual machine for Java