Assembling a Web services-enabled WAR file when starting from Java codeYou need the following artifacts...
- An assembled Web archive (WAR) file containing web.xml, but not Web services-enabled
- The Java class for the Service Endpoint Interface
- A Web Services Description Language (WSDL) file
- Complete webservices.xml,ibm-webservices-bnd.xmi, ibm-webservices-ext.xmi, and Java API for XML-based remote procedure call (JAX-RPC) mapping deployment descriptors.
Use the Assembly Toolkit to assemble a Web services-enabled WAR file. The Assembly Toolkit replaces the Application Assembly Tool (AAT). It is one of the tools available with the Application Server Toolkit product.
To assemble a Web services-enabled WAR file when starting from Java code...
- Start the Assembly Toolkit.
- Click File > Import to import the WAR file into the Assembly Toolkit.
- Open the J2EE perspective by clicking Windows >Open Perspective > Other > J2EE.
- Switch to the Project Navigator pane by clicking the Project Navigator tab.
- Locate the project for the WAR file you just imported in the Project Navigator pane.
- Expand the WebContent directory so the WEB-INF directory is displayed. Expand the WEB-INF directory
- Confirm that the WEB-INF/web.xml descriptor for the Web module contains a <servlet-class> element indicating the Java bean class that is implementing the service.Confirm by...
- Double-click Web Deployment Descriptor.
- In the Web Deployment Descriptor editor, click the Servlets.
- Enter the full path name of the Java bean class implementing the Web service in the Servlet class field.
- Close the editor window to save your changes.
- Right-click the WEB-INF directory and click New > Folder. Create a subfolder named wsdl in the WEB-INF directory.
- Copy the WSDL file to the WEB-INF\wsdl directory by right-clicking on the wsdl directory and click File > Import > File system. Browse the WSDL file for this Web service and click Finish.
- Copy the JAX-RPC mapping file as specified by the deployment descriptor <jaxrpc-mapping-file> element of webservices.xml.
- Copy webservices.xml,ibm-webservices-bnd.xmi and ibm-webservices-ext.xmi into the WEB-INF subdirectory in the same manner.
- Import the Service Endpoint Interface class so that its package begins in the JavaSource directory. When you import the source file it is automatically compiled.
The artifacts required to Web service-enable the Web module are added to the WAR file.
Assemble a Web services-enabled WAR into an EAR file.
See AlsoAssembling a Web services-enabled WAR file
Assembling a Web services-enabled WAR into an EAR file
Assembling a Web services-enabled WAR file when starting from WSDL