Use the following instructions to create the web service client flow from an existing WSDL definition. You must have successfully created the web service flow, by using the OrderService.wsdl file that you imported, see Creating the web service message flow and message set.
Node type | Node name |
---|---|
MQInput | MQWSInput |
MQOutput | MQWSOutput |
Compute | Compute Request, Format Response |
SOAPAsyncRequest | SOAP Asynchronous Request |
SOAPAsyncResponse | SOAP Asynchronous Response |
Node name | Terminal | Connect to this node |
---|---|---|
MQWSInput | Out | Compute Request |
Compute Request | Out1 | SOAP Asynchronous Request |
SOAPAsyncResponse | Out | Format Response |
Format Response | Out1 | MQWSOutput |
The following diagram shows a screen capture of the WebServicesAsyncClientFlow message flow with the nodes connected together:
Message domain | XMLNSC |
Messgae set | SampleDriverMessages |
DECLARE ns NAMESPACE 'http://www.acmeOrders.com/OrderService'; CREATE COMPUTE MODULE WebServicesAsyncClientFlow_Compute CREATE FUNCTION Main() RETURNS BOOLEAN BEGIN DECLARE inMsg REFERENCE TO InputRoot.XMLNSC.OrderMessage.localElement; SET OutputRoot.SOAP.Body.ns:submitPORequest.partNo = inMsg.PartNumber; DECLARE outMsg REFERENCE TO OutputRoot.SOAP.Body.ns:submitPORequest; SET outMsg.partQuantity = inMsg.Quantity; SET outMsg.personName.firstName = inMsg.FirstName; SET outMsg.personName.lastName = inMsg.LastName; SET outMsg.address.street = inMsg.Street; SET outMsg.address.city = inMsg.City; SET outMsg.address.zipCode = inMsg.ZipCode; RETURN TRUE; END; END MODULE;
CREATE COMPUTE MODULE WebServicesAsyncClientFlow_Format CREATE FUNCTION Main() RETURNS BOOLEAN BEGIN SET OutputRoot.Properties.MessageDomain = 'XMLMSC'; SET OutputRoot.Properties.MessageSet = 'SampleDriverMessages'; SET OutputRoot.Properties.MessageType = 'OrderResponse'; DECLARE inMsg REFERENCE TO InputRoot.SOAP.Body.ns:submitPOResponse; SET OutputRoot.XMLNSC.OrderResponse.PartNo = inMsg.partNo; DECLARE respMsg REFERENCE TO OutputRoot.XMLNSC.OrderResponse; SET respMsg.PartQuantity = inMsg.partQuantity; SET respMsg.AMT = inMsg.orderAmt; SET respMsg.Status = inMsg.orderStatus; RETURN TRUE; END; END MODULE;
You can now create the queues for the sample, see
Creating the WebSphere MQ queues.