Home

 

Generating the Web service and client

To create the Web service and client using the Web Service wizard, do these steps:

Right-click ProcessDocumentService.wsdl and select Web Services Æ Generate Java bean skeleton. The Web Service wizard starts with the Web Services page.

Select the following options for the Web service:

Server: WebSphere Application Server v7.0
Web service runtime: IBM WebSphere JAX-WS
Service project: RAD75WSMTOM
Service EAR project: RAD75WSMTOMEAR

Select the following options for the Web service client:

Move the slider to Test client.
Server: WebSphere Application Server v7.0.
Web service runtime: IBM WebSphere JAX-WS
Client project: RAD75WSMTOMClient
Client EAR project: RAD75WSMTOMClientEAR

Because the Web service client project is not yet in the workspace when we run the Web Service wizard, the wizard creates the project for you.

Select Monitor the Web service and then click Next.

In the WebSphere JAX-WS Top Down Web Service Configuration page, select Enable MTOM Support and click Next (Figure | 8-43).

Figure 18-43 Enable MTOM support

A warning pops up. Click Details to view the complete message (Figure | 8-44.) Click Ignore to continue the code generation.

Figure 18-44 WS-I warning against MTOM

In the Test Web Service page, click Next.

In the WebSphere JAX-WS Web Service Client Configuration page, accept the defaults, and click Next.

In the Web Service Client Test page, select JAX-WS JSPs as the Test Facility, and click Finish. The generated JavaBean skeleton is opened, as well as the sample JSP client.
ibm.com/redbooks