Introduction

DB2 Web services uses WORF to support Web services defined with either SQL statements or XML collection statements for the XML Extender. Web service operations and their corresponding SQL statements are stored in a DADX resource file. The format of a DADX file is described in detail in additional documents, see documentation. Note that the WebSphere Studio development tools provide wizards for building DADX files.

The figure above shows how WORF processes a Web service request by receiving an HTTP SOAP, GET or POST service request from a Web service client. The URL of the Web service request includes the name of the Web service's resource file (for example, a DADX file) and a command, which is either:

In either case, WORF invokes the specified operation of the Web service and returns the result document. WORF performs the following steps in response to a Web service request:

  1. loads the DADX file specified in the request
  2. generates a response, based on the request;
    for operations, WORF,
    1. loads a DAD file for XML extenders, if requested in the DADX file
    2. replaces query parameters with requested values
    3. connects to DB2 and runs any SQL statements, including SQL calls
    4. commits the database transaction
    5. formats the result into XML, converting types as necessary
    for built-in commands, WORF generates necessary files, test pages, or other responses required.
  3. returns the response to the service requestor.

This model implies that you can only have one transaction per Web service invocation. If you want multiple SQL operations in one transaction, write stored procedures executing these statements and use those stored procedures as your Web service operation.