IBM BPM, V8.0.1, All platforms > Programming IBM BPM > Developing client applications for BPEL processes and tasks > Developing web services API client applications
Web service components and sequence of control
In web services applications, a number of client-side and server-side components participate in the sequence of control that represents a web service request and response.
A typical sequence of control is as follows.
- On the client side:
- A client application (provided by the user) issues a request for a web service.
- A web service proxy (also provided by the user, but which can be automatically generated using client-side utilities) wraps the service request in a SOAP request envelope and forwards the request to a URL defined as the web service endpoint.
- The network transmits the request to the web service endpoint using HTTP, HTTPS, or JMS for SOAP/JMS.
- On the server side:
- The generic web services API receives and decodes the request.
- The request is either handled directly by the generic Business Flow Manager or Human Task Manager component, or forwarded to the specified BPEL process or human task.
- The returned data is wrapped in a SOAP response envelope.
- The network transmits the response to the client-side environment using HTTP, HTTPS, or JMS for SOAP/JMS.
- Back on the client side:
- The client-side development infrastructure unwraps the SOAP response envelope.
- The web service proxy extracts the data from the SOAP response and passes it to the client application.
- The client application processes the returned data as necessary.
Example
The following is a possible outline for a client application that accesses the Human Task Manager web services API using the HTTP transport layer to process a to-do task:
- The client application issues a query web service call to the process server requesting a list of to-do tasks to be worked on by a user.
- The process server returns the list of to-do tasks.
- The client application then issues a claim web service call to claim one of the to-do tasks.
- The process server returns the input message for the task.
- The client application issues a complete web service call to complete the task with an output or fault message.
Developing web services API client applications for BPEL processes and human tasks