The WSRR WebService message flows are supplied, but if you prefer to create the message flows yourself, follow the instructions below:
Palette drawers | Node type | Node name |
---|---|---|
Web Services | SOAPInput | SOAP DemoCustomer |
Transformation | Compute | Create WS Response |
Web Services | SOAPReply | SOAP Reply |
Node name | Terminal | Connect to this node |
---|---|---|
SOAP DemoCustomer | Out | Create WS Response |
Create WS Response | Out | SOAP Reply |
Node name | Page | Property | Value |
---|---|---|---|
SOAP DemoCustomer | 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. |
DECLARE tns NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/'; DECLARE intf NAMESPACE 'http://demo.sr.eis.ibm.com'; CREATE COMPUTE MODULE DemoCustomer_WebService_v10_CreateWSResponse CREATE FUNCTION Main() RETURNS BOOLEAN BEGIN CALL CopyMessageHeaders(); SET OutputRoot.SOAP.Body.intf:updateCustomerResponse.updateCustomerReturn = 'Updated Customer via WebService version 1.0'; RETURN TRUE; END; CREATE PROCEDURE CopyMessageHeaders() BEGIN DECLARE I INTEGER; DECLARE J INTEGER; SET I = 1; SET J = CARDINALITY(InputRoot.*[]); WHILE I < J DO SET OutputRoot.*[I] = InputRoot.*[I]; SET I = I + 1; END WHILE; END; END MODULE; CREATE COMPUTE MODULE DemoCustomer_WebService_v20_CreateWSResponse CREATE FUNCTION Main() RETURNS BOOLEAN BEGIN CALL CopyMessageHeaders(); SET OutputRoot.SOAP.Body.intf:updateCustomerResponse.updateCustomerReturn = 'Updated Customer via WebService version 2.0'; RETURN TRUE; END; CREATE PROCEDURE CopyMessageHeaders() BEGIN DECLARE I INTEGER; DECLARE J INTEGER; SET I = 1; 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 main WSRR Connectivity message flow, which will invoke these Web Services: Creating the main flow.