Developing and deploying Web services
You can use the workbench to create Web services that expose database operations (SQL SELECT and DML statements, XQuery expressions, or calls to stored procedures) to client applications.
Web services accept XML messages or URL-encoded parameter strings as requests for database operations. (In the rest of this documentation, XML messages and URL-encoded parameter strings are both referred to as "messages," except where a distinction between the two is necessary.) Web services return results and result sets in XML messages. For operations that perform SQL inserts, updates, and deletes, Web services return a count of the number of new, changed, or deleted rows.
A Web service performs the following actions when it receives a message that contains a request:
You have the option of configuring XSL transformations on input and output messages.
- Looks in the message to determine the requested database operation.
- Extracts the input parameters from the message.
- Prepares and executes the statement.
- Retrieves the result of the operation.
- Generates the output XML message that contains the result.
- Sends the output message to the requesting client application.
XML messages that request an operation and XML messages that return the results of an operation are tagged according to a default XML schema that the workbench generates for each operation. This default schema performs the following functions:
- Maps input and output parameters to XML tags
- Maps columns to XML tags
- Maps SQL data types to XML data types
- Maps Web service operations to XML tags
- Provides the general structure of input and output messages
After you develop a Web service, with one click you can deploy it to a Web server. The workbench deploys Web services as Java™ Platform, Enterprise Edition (Java EE) Web Archive (WAR) files. You can also use the workbench to generate deployable files only or artifacts for DataPower® and then deploy them yourself.
- Supported Web servers, SOAP engines, and databases
You can deploy Web services to several types of Web servers, use a number of different SOAP engines, and access DB2® and Informix® databases.- Supported message protocols
Client applications can access Web services by sending messages that use the SOAP/HTTP or SOAP/JMS protocols, or three REST-like message protocols.- Support for the DB2 native XML data type in Web service operations
Operations in Web services can refer to DB2 columns that use the native XML data type.- Mapping of SQL and JDBC data types to XML data types
The data type of a parameter or column of a result set in a message is specified using XML data types.- Developing Web services with the workbench
Developing Web services involves creating and adding operations to them, optionally configuring XSL transformations of the request messages and result messages for your operations, and deploying the Web services to Web servers for testing.- Deploying, undeploying, and testing Web services
After you develop a Web service, with one click you can deploy it to a Web server. The workbench deploys Web services as Java Platform, Enterprise Edition (Java EE) Web Archive (WAR) files. You can also simply generate deployable files or artifacts for DataPower and deploy them yourself. You can use the Web Services Explorer or the Data Web Service Test Client to test your Web service after it has been deployed.- Migrating Web applications that were developed for the Web Object Runtime Framework (WORF)
You can migrate Web applications that were developed for the Web Object Runtime Framework (WORF).
Related concepts
Support for the DB2 native XML data type in Web service operations
Related reference
Supported Web servers, SOAP engines, and databases