Deploy a programming component as a SOAP accessible Web service
Complete these steps to deploy a SOAP-accessible Web service on WAS:
- Create or locate the software resource to be published as a service
To deploy a service, create one or more of the supported programming components (beans, enterprise beans, DB2 stored procedure, or BSF script), or locate an existing piece of code of the supported type.- Assemble an Enterprise Archive (EAR) file
Package the component into an Enterprise Archive (EAR) file. This step is a deployment packaging requirement of WAS. Use the Application Assembly Tool (AAT) to create the EAR file.- Create the SOAP deployment descriptor for the desired service
To deploy a component as a SOAP service, create a Apache SOAP deployment descriptor that describes the service you are creating. This step designates the programming component as a service. The descriptor describes and defines the parts of the code that are invoked through SOAP calls.The information contained in the deployment descriptor varies, depending on the type of artifact you are publishing. For example, this deployment descriptor could be used with the StockQuoteSample:
<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment" id="urn:service-urn" [type="message"]> <isd:provider type="java" scope="Request | Session | Application" methods="exposed-methods"> <isd:java class="implementing-class" [static="true|false"]/> </isd:provider> <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener> </isd:service>- Run the SoapEarEnabler tool to enable your Web service
You must first package your component into an Enterprise Archive (EAR) file. Next, using the deployment descriptor as input data, add the necessary pieces to the EAR file to enable the component as a Web service. To facilitate this process, use the Java(TM)-based tool, SoapEarEnabler. Depending on whether you secure the Web service, this tool adds two Web modules: soap.war and soap-sec.war to the EAR file. These Web modules include the SOAP deployment descriptors plus the necessary parts to deploy the service into the WAS run time.Note: The service does not become available until you install the SOAP enabled EAR file and restart the application server.
- Install the modified EAR file into your WAS instance
Install the modified EAR file into your WAS instance using the Application Installer Command Line Tool.- Restart your WAS instance.