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.

  1. Save the OrderService.WSDL file to your workspace, for example, C:\Documents and Settings\<username>\IBM\wmbt80\workspace\OrderService.wsdl.
  2. In the Broker Development view, click Start from WSDL and/or XSD files. The Quick Start wizard is displayed.
  3. In the Message Broker project name field, type AsyncWebServiceFlows.
  4. In the Message set project name field, type AsyncWebServiceMessages.
  5. In the Message set name field, type AsyncWebServiceMessages.
  6. In the Message flow name field, type AsyncWebSebServiceServerFlow.
  7. Clear Create a new working set for these resources. The completed values for the Quick Start wizard are shown in the following diagram:
    Screen capture of the Quick Start wizard. The values are described in the text above
  8. Click Next.
  9. Select Use external resources, click Browse.
  10. Locate the OrderService.wsdl file from your workspace, click OK.
  11. Click Next.
  12. Click Finish. A blank message flow and a message set based on the WSDL file are created.
  13. 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

  14. 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:


    A screen capture of the WebServiceAsyncServerFlow message flow
  15. Drag OrderService.wsdl from the AsyncWebServiceMessages project, onto the SOAP Input node. You can find the OrderService.wsdl file in AsyncWebServicMessages > AsyncWebServicMessages > Deployable WSDL.
  16. 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.
  17. 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