Creating a DB2 Web service using WebSphere Studio

You can use WebSphere Studio development tools, such as WebSphere Development Studio Client for iSeries, to develop a DB2 Web Service from a DADX file. The information in this topic is based on the WebSphere Studio help and is provided as an overview of the development process. The following steps are performed using WebSphere Studio. Refer to WebSphere Studio help and the links provided for additional details.

  1. Create a Web Project for the application
  2. Create a DB2 Web Service DADX group using the Web Services DADX Group Configuration wizard
  3. Create a DADX file using a text editor or the XML from SQL Query wizard
  4. Add DADX Files to a DADX group
  5. Create the Web Service from the DADX file

Create a DB2 Web Service DADX Group
The Web Service DADX Group Configuration wizard assists you in creating a DADX group. The DADX group contains connection (JDBC and JNDI) and other information that is shared between DADX files within the group. To create the DADX group:

  1. In the Navigator view, select the Web project in which you want to create the DADX group.
  2. Click File > New > Other. Select Web Services in order to display the various Web service wizards. Select the Web Services DADX Group Configuration wizard. Click Next
  3. Select your Web project. Click Add group. Enter a name for your DADX group. Click OK.
  4. Expand your Web project to display your DADX group. Right-click your DADX group. Select Properties. Change the DB URL to jdbc:db2:DATABASE_NAME where DATABASE_NAME is the name of your database. Click OK.
  5. Click Finish. Your DADX group is generated in: WebProject\source\groups.

Create a DADX File
You can also write DADX files using any text editor or use XML tools to create DAD and DADX files. For more information on creating a DADX file from SQL, refer to Generating a DADX file from SQL.   

After you create a DADX file, use the Web services DADX Group Configuration wizard to configure your database connections. 

Then use the Web Services wizard to generate your WSDL documents, deployment descriptors, client proxy, property mappings, deployment mappings, and test your DADX Web service, in preparation for publishing your Web service to the UDDI registry.

Add DADX Files to a DADX Group
You must add your DADX files to the DADX group that you previously created in the project. You can do this either by:

Create the Web Service
To create a DB2 Web service from a DADX file:

  1. Select the DADX file from the DADXGroup folder.
  2. Click File > New > Other. Select Web Services in order to display the various Web service wizards. Select the Web Service wizard. Click Next.
  3. Follow the instructions in the wizard to configure your DADX Web service. On the Web Services page of the wizard select Overwrite files without warning. You can optionally generate a proxy to the Web service, optionally generated and launch a sample Web application, and optionally launch the UDDI Explorer to publish your Web service. The proxy that is generated provides a remote procedure call interface to the Web service. The sample Web application demonstrates how to code the proxy file.  Use the test client to test the Web service.