WebSphere Message Brokers
File: ac34590_
Writer: Jane Brockbank

Task topic

This build: July 31, 2007 21:20:23

Broker calls existing Web service - detail

This is an overview of a typical end-to-end scenario where the broker invokes a Web service.

There are two basic business propositions:

It is reasonable to assume that a WSDL definition is available for the Web service.

  1. Import the WSDL definition for the Web service to create a message model for the payload data (see Importing data structures).
  2. The WSDL import step will result in the appropriate SOAP mxsds being automatically included in the message set. Specifically this includes the SOAP envelope mxsd and – if required – the SOAP encoding mxsd.
  3. Implement a message flow to make the Web service request – i.e. to act as the Web services client. The endpoint nodes might be MQ for integration with an existing system. The flow includes an HTTPRequest node to emit the Web service request and receive the response. The user must create the required SOAP content by populating a SOAP envelope instance. This might be done via a mapping node or created directly in ESQL:
     
     DECLARE SOAPENV NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/';
     
     SET OutputRoot.Properties.MessageSet = 'soap1';
     SET OutputRoot.Properties.MessageType = 'Envelope';
     SET OutputRoot.Properties.MessageFormat = 'XML1';
     
     SET OutputRoot.MRM.SOAPENV:Body.addEntryResponse.cid = 'abc123';
     .
     .
  4. The HTTPRequest node properties related to the request are:
    • domain: "MRM"
    • set: the message set containing the SOAP Envelope definition
    • type: "Envelope"
    • format: "XML1"
    • whether the Web service request is to consist of the whole input message or just part of it
  5. The HTTPRequest node properties related to the response are:
    • option to automatically redirect for HTTP status codes 300-399
    • whether a valid Web service response replaces the input message in the tree (default) or is attached at a specific location in the original tree
    • likewise, whether a Web service error replaces the input message in the tree (default) or is attached at a specific location in the original tree
    • the domain, set, type, and format (as in step 4 above). Used by the broker to create the logical tree (portion) from the bit stream
  6. Once the response is available in the tree, you can process it using a mapping node or using ESQL. If the actual name of the response message is unknown (it isn’t defined in the WSDL and appending Response to the request name is only a convention) then the user could write ESQL to check the children of the (arbitrarily named) response element.
Related concepts
Web services, WSDL and message flows
Broker calls existing Web service
Broker implements new Web service interface
Broker implements existing Web service interface
Broker implements non-web-service interface to new Web service
Related tasks
Broker implements existing Web service interface - detail
Broker calls existing Web service - detail
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:20:23

ac34590_ This topic's URL is: