Creating the web service message flow and message set
Use the following instructions to create the web service flow
message flow and message set from a WSDL definition.
- Save the OrderService.WSDL file to your workspace,
for example,
C:\Documents and Settings\<username>\IBM\wmbt80\workspace\OrderService.wsdl.
- In the Broker Development view, click
Start from WSDL and/or XSD files.
The Quick Start wizard is displayed.
- In the Message Broker project name field, type
AsyncWebServiceFlows.
- In the Message set project name field, type
AsyncWebServiceMessages.
- In the Message set name field, type
AsyncWebServiceMessages.
- In the Message flow name field, type
AsyncWebSebServiceServerFlow.
- Clear Create a new working set for these resources.
The completed values for the Quick Start wizard are shown in the following diagram:

- Click Next.
- Select Use external resources,
click Browse.
- Locate the OrderService.wsdl file from your workspace, click
OK.
- Click Next.
- Click Finish. A blank message flow and a message set based on the
WSDL file are created.
- Add the following nodes to the WebServiceAsyncServerFlow message flow.
Node type |
Node name |
SOAPInput |
SOAP Input |
RouteToLabel |
Route WS Operation |
Label |
submitPO |
Compute |
Compute Response |
SOAPReply |
SOAP Reply |
- Connect the nodes as described in the following table.
Node name |
Terminal |
Connect to this node |
SOAPInput |
Out |
Route WS Operation |
submitPO |
Out |
Compute Response |
Compute Response |
Out1 |
SOAP Reply |
For more information about connecting nodes, see
Connecting message flow nodes in the WebSphere Message Broker documentation.
The following diagram shows the WebServiceAsyncServerFlow message flow with the
nodes connected together:
- Drag OrderService.wsdl from the AsyncWebServiceMessages project,
onto the SOAP Input node. You can find the OrderService.wsdl file in
AsyncWebServicMessages > AsyncWebServicMessages > Deployable WSDL.
- Select Use WS-Addressing on the
WS Extensions
tab of the SOAP Input node properties.
WS-Addressing headers are used in all the SOAP messages for this web
service.
- Double-click the Compute Response node, paste the following module into the ESQL file:
CREATE COMPUTE MODULE WebServicesAsyncServerFlow_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
SET OutputRoot.SOAP.Body.ns:submitPOResponse.orderStatus = 'AVAILABLE';
DECLARE outMsg REFERENCE TO OutputRoot.SOAP.Body.ns:submitPOResponse;
DECLARE inMsg REFERENCE TO InputRoot.SOAP.Body.ns:submitPORequest;
SET outMsg.orderAmt = 50;
SET outMsg.partNo = inMsg.partNo;
SET outMsg.partQuantity = inMsg.partQuantity;
RETURN TRUE;
END;
END MODULE;
You can now create the client driver message set, see
Creating the client driver message set.
Back to Building the Asynchronous Consumer sample