Utilice las instrucciones siguientes para crear el flujo de clientes de servicio web a partir de una definición de WSDL existente. Debe haber creado satisfactoriamente el flujo de servicio web, utilizando el archivo OrderService.wsdl que ha importado, consulte Crear el flujo de mensajes y el conjunto de mensajes de servicio web.
Tipo de nodo | Nombre de nodo |
---|---|
MQInput | MQWSInput |
MQOutput | MQWSOutput |
Compute | Compute Request, Format Response |
SOAPAsyncRequest | SOAP Asynchronous Request |
SOAPAsyncResponse | SOAP Asynchronous Response |
Nombre de nodo | Terminal | Conectar a este nodo |
---|---|---|
MQWSInput | Out | Compute Request |
Compute Request | Out1 | SOAP Asynchronous Request |
SOAPAsyncResponse | Out | Format Response |
Format Response | Out1 | MQWSOutput |
El diagrama siguiente muestra una captura de pantalla del flujo de mensajes WebServicesAsyncClientFlow con los nodos conectados entre sí:
Dominio del mensaje | XMLNSC |
Conjunto de mensajes | 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;
Ahora puede crear las colas para el ejemplo, consulte Crear las colas de WebSphere MQ.