Network Deployment (Distributed operating systems), v8.0 > Develop and deploying applications > Develop web services > Deploy web services
Deploy web services applications onto application servers
After assembling the artifacts required to enable the web module for web services into an EAR file, you can deploy the EAR file into the application server.
To deploy Java-based web services, you need an enterprise application, also known as an EAR file that is configured and enabled for web services.
A Java API for JAX-WS application does not require additional bindings and deployment descriptors for deployment whereas a Java API for XML-based RPC (JAX-RPC) web services application requires you to add additional bindings and deployment descriptors for application deployment. JAX-WS is much more dynamic, and does not require any of the static data generated by the deployment step required for deploying JAX-RPC applications.
For JAX-WS web services, the use of the webservices.xml deployment descriptor is optional because you can use annotations to specify all of the information that is contained within the deployment descriptor file. We can use the deployment descriptor file to augment or override existing JAX-WS annotations. Any information that you define in the webservices.xml deployment descriptor overrides any corresponding information specified by annotations.
Mixed-version environment: In a mixed node cell, you can only target a JAX-WS enabled enterprise beans module to a server using WAS v7.0 and later. However, you can target a JAX-WS enabled web application archives (WAR) module to a server using either WAS v7.0 and later or WAS Version 6.1 Feature Pack for Web Servicesmixv
We can use the wsdeploy command with JAX-RPC applications to add WebSphere product-specific deployment classes to a web services-compatible enterprise application enterprise archive (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 your 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 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.
This task is one of the steps in developing and implementing web services.
We can use either the admin console or the wsadmin scripting tool to deploy an EAR file. If you are installing an application containing web services by using the wsadmin command, specify the -deployws option for JAX-RPC applications. If you are installing an application containing web services by using the admin console, select Deploy WebServices in the Install New Application wizard. For more information about installing applications using the administrative console, see the installing enterprise application files with the console information.
If your JAX-RPC web services application was previously deployed with the wsdeploy command, it is not necessary to specify web services deployment during installation. The following actions deploy the EAR file with the wsadmin command:
Procedure
- Start install_root/bin/wsadmin from a command prompt.
(AIX) (Solaris) On operating systems such as AIX or Linux, start install_root/bin/wsadmin.sh.
- 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 that contain 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). If you are installing the application server in a network deployment environment, you might need to increase the heap size of the JVM in the application servers in which you are installing the application, and in the dmgr profile, dmgr. Read about tuning the IBM virtual machine for Java documentation to learn more about tuning the application server environment.
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 your 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 your web service.
Related
Provide options to perform the web services deployment settings
wsdeploy command
JAX-WS application deployment model
Overview of standards and programming models for web services message-level security
Secure web services
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
Task overview: Implementing web services applications
Tune the IBM virtual machine for Java
Install enterprise application files with the console