WAS v8.5 > Deploy applications > Deploy web services

Deploy web services EARs onto application servers

To deploy Java-based web services, requires enterprise application, also known as an EAR file, configured and enabled for web services.

A JAX-WS application does not require additional bindings and deployment descriptors for deployment. A JAX-RPC application requires addding additional bindings and deployment descriptors.

For JAX-WS web services, webservices.xml is optional. We can use annotations to specify all of the information contained within the deployment descriptor file. We can use webservices.xml to augment or override existing JAX-WS annotations. Any information defined in the webservices.xml deployment descriptor overrides any 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 WebSphere Application Server v7.0 and later. However, we can target a JAX-WS enabled WAR module to a server using either WAS v7.0 and later or WAS v6.1 Feature Pack for Web Servicesmixv

We can use wsdeploy with JAX-RPC applications to add WebSphere product-specific deployment classes to a web services-compatible enterprise application 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, we do not need to run wsdeploy, which is used to process only JAX-RPC endpoints.

Ensure that we have installed the HTTP or JMS router module that was 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. This task is one of the steps in developing and implementing web services.

We can use either the dmgr console or the wsadmin scripting tool to deploy an EAR file. If you are installing an application containing web services using wsadmin, specify the -deployws option for JAX-RPC applications. If you are installing an application containing web services using the dmgr console, select Deploy WebServices in the Install New Application wizard. For more information about installing applications using the dmgr console, see the installing enterprise application files with the console information.

If your JAX-RPC web services application was previously deployed with wsdeploy, it is not necessary to specify web services deployment during installation. The following actions deploy the EAR file with wsadmin:

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

    On operating systems such as AIX or Linux, start install_root/bin/wsadmin.sh.

  2. Deploy the EAR file.

    • For JAX-WS web service applications, enter the $AdminApp install EARfile "-usedefaultbindings" command at the wsadmin prompt.

    • For JAX-RPC web service applications, enter the $AdminApp install EARfile "-usedefaultbindings -deployws" command at the wsadmin prompt.


Results

You have a web service installed onto the application server.

While installing web services applications containing a large number of enterprise beans onto the application server, you might receive out of memory errors. If you receive out of memory errors, increase the heap size of your Java Virtual Machine (JVM). Read about tuning the IBM virtual machine for Java documentation to learn more about tuning the application server environment.

We can confirm 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 you might want to consider is to apply security to the web service.


Subtopics


Related concepts:

Programming models for web services message-level security
Secure web services


Related


Make deployed web services applications available to clients
Develop a webservices.xml deployment descriptor for JAX-WS applications
Develop JAX-RPC web services deployment descriptor templates for a JavaBeans implementation
Secure web services
Tasks: Implementing web services applications
Tune the IBM virtual machine for Java
Install enterprise application files with the console


+

Search Tips   |   Advanced Search