The WSRR Connectivity sample main message flow is supplied, but if you prefer to create the message flow yourself, follow the instructions below:
Palette drawers | Node type | Node name |
---|---|---|
WebSphere MQ | MQInput | WSRR_IN |
Transformation | Compute | SetVersion |
WebServices | Endpoint Lookup | Endpoint Lookup One |
WebServices | SOAP Request | SOAP Request |
Transformation | Compute | InformFailure |
Transformation | Compute | InformWSResult |
Transformation | Compute | InformNoMatch |
WebSphere MQ | MQOutput | WSRR_OUT |
Node name | Terminal | Connect to this node |
---|---|---|
WSRR_IN | Out | SetVersion |
SetVersion | Out | Endpoint Lookup One |
Endpoint Lookup One | Out | SOAP Request |
Failure | InformFailure | |
NoMatch | InformNoMatch | |
SOAP Request | Out | InformWSResult |
Fault | WSRR_OUT | |
InformFailure | Out | WSRR_OUT |
InformWSResult | Out | WSRR_OUT |
InformNoMatch | Out | WSRR_OUT |
Node name | Page | Property | Value |
---|---|---|---|
WSRR_IN | Basic | Queue name | WSRR_IN |
Input Message Parsing | Message domain | XMLNSC : For XML messages | |
SetVersion | Basic | Compute mode | Local Environment and Message |
Endpoint Lookup One | Basic | Port Type Name | DemoCustomer |
Port Type Namespace | http://demo.sr.eis.ibm.com | ||
Port Type Version | 1.0 | ||
SOAP Request | Basic | WSDL file name | Browse to the DemoCustomer_v10.wsdl file imported earlier into the WSRR Connectivity Message Set. Once selected, this will populate the other properties on the Basic page. |
HTTP Transport | Web Service URL | Put in a bogus value here ie http://dummy. This property will be over-ridden at runtime with the Web Service URL specific to the wsdl document that was retrieved from the WSRR,. |
|
WSRR_OUT | Basic | Queue name | WSRR_OUT |
DECLARE soapenv NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/'; CREATE COMPUTE MODULE WSRR_Connectivity_SetVersion CREATE FUNCTION Main() RETURNS BOOLEAN BEGIN -- Set the LE to the over-rides specified in the input data -- Note if the input message does not contain a Version tag, the LE will not be written SET OutputLocalEnvironment.ServiceRegistryLookupProperties.Version = InputRoot.XMLNSC.soapenv:Envelope.soapenv:Body.Request.Version; -- Store the MQMD to rebuild after HTTP Response node SET Environment.MQMD = InputRoot.MQMD; CALL CopyEntireMessage(); RETURN TRUE; END; CREATE PROCEDURE CopyEntireMessage() BEGIN SET OutputRoot = InputRoot; END; END MODULE; CREATE COMPUTE MODULE WSRR_Connectivity_InformWSResult CREATE FUNCTION Main() RETURNS BOOLEAN BEGIN CALL CopyEntireMessage(); -- The response from the WebService contains a HTTP Header -- Remove the HTTP header and create a MQMD header in order to propagate the message to a MQ output node SET OutputRoot.HTTPResponseHeader = NULL; CREATE NEXTSIBLING OF OutputRoot.Properties DOMAIN 'MQMD'; -- Retrieve the MQMD that was stored earlier SET OutputRoot.MQMD = Environment.MQMD; RETURN TRUE; END; CREATE PROCEDURE CopyEntireMessage() BEGIN SET OutputRoot = InputRoot; END; END MODULE; CREATE COMPUTE MODULE WSRR_Connectivity_InformNoMatch CREATE FUNCTION Main() RETURNS BOOLEAN BEGIN CALL CopyMessageHeaders(); CREATE LASTCHILD OF OutputRoot DOMAIN 'XMLNSC'; SET OutputRoot.XMLNSC.(XMLNSC.XmlDeclaration)*.(XMLNSC.Attribute)Version = '1.0'; SET OutputRoot.XMLNSC.(XMLNSC.XmlDeclaration)*.(XMLNSC.Attribute)Encoding = 'UTF-8'; CREATE LASTCHILD OF OutputRoot.XMLNSC NAME 'LookupResults'; SET OutputRoot.XMLNSC.LookupResults.WSRR_Request = InputRoot.XMLNSC.WSRR_Request; SET OutputRoot.XMLNSC.LookupResults.ServiceRegistry = 'No matching services!'; RETURN TRUE; END; CREATE PROCEDURE CopyEntireMessage() BEGIN SET OutputRoot = InputRoot; END; END MODULE; CREATE COMPUTE MODULE WSRR_Connectivity_InformFailure CREATE FUNCTION Main() RETURNS BOOLEAN BEGIN CALL CopyMessageHeaders(); CREATE LASTCHILD OF OutputRoot DOMAIN 'XMLNSC'; SET OutputRoot.XMLNSC.(XMLNSC.XmlDeclaration)*.(XMLNSC.Attribute)Version = '1.0'; SET OutputRoot.XMLNSC.(XMLNSC.XmlDeclaration)*.(XMLNSC.Attribute)Encoding = 'UTF-8'; CREATE LASTCHILD OF OutputRoot.XMLNSC NAME 'LookupResults'; SET OutputRoot.XMLNSC.LookupResults.WSRR_Request = InputRoot.XMLNSC.WSRR_Request; SET OutputRoot.XMLNSC.LookupResults.ServiceRegistry = 'Failure to retrieve Service from WSRR!'; SET OutputRoot.XMLNSC.LookupResults.Exception = InputExceptionList; RETURN TRUE; END; CREATE PROCEDURE CopyMessageHeaders() BEGIN DECLARE I INTEGER 1; DECLARE J INTEGER; SET J = CARDINALITY(InputRoot.*[]); WHILE I < J DO SET OutputRoot.*[I] = InputRoot.*[I]; SET I = I + 1; END WHILE; END; END MODULE;
You can now create the queues and run your flow: Creating the MQ queues.