WebSphere MQ Web Services Transport is a service that connects Web services clients that use the HTTP protocol for messaging.
Web services clients use non-persistent, non-transactional messaging to communicate with other applications. WebSphere Business Integration Message Broker provides support to allow these clients to communicate with other applications through message flows in a broker.
The clients are either service providers or service requesters. Service providers publish their services, defined in WSDL, to a registry. The service requesters query the service registry to find information about available services, including where these services are and how to bind to them.
The ability to communicate with a broker means that Web services clients can communicate with applications that use other supported protocols and transports, if the message flow is configured to provide this function.
For more information, follow the Web services link on the developerWorks Web site.
Messages that pass across this transport have an XML format that provides platform-independence. The XML content that defines specific operations, and error situations (SOAP Fault), is defined by the SOAP standard. Because delivery is not guaranteed, applications must provide recovery in the event of system or network failures.
A message contains components that are appropriate to its type:
In most cases, the body of a message is XML. However, an inbound message can contain a different format if the receiving node is configured to handle that format and the appropriate parsers are available. An outbound message can contain a body of any format that is accepted by the Web service to which it is sent.
An error that is generated by a component other than a Web service (for example, 404 Not Found) might result in a message that is in HTML format.
The bit stream containing headers and body are parsed and represented within the message tree when an input request is received by an HTTPInput node, or when a response from a Web service is received by the HTTPRequest node. A bit stream is created by parsers from the appropriate parts of the message tree when a reply is sent to the client by the HTTPReply node, and when a request is sent to a Web service by the HTTPRequest node. For further details about these actions, see the individual node descriptions.
When a message is received from a Web service client or Web server, the HTTPInput or HTTPRequest node that receives that message must parse the HTTP headers to create elements in the message tree. When an HTTPReply or HTTPRequest message sends a message to a Web service client or Web server, it parses the HTTP headers from the message tree into a bit stream.
The HTTP headers in a message depend on the type of message that is processed. There are four message types recognized in a message flow, and a parser is associated with each of these.
Header | Content | Example |
---|---|---|
Host | The hostname to which the client issued the message. | localhost |
Content-Length | The length of the body of the input message in decimal (that follows the CRLFCRLF after the last header). | 520 |
Content-Type | The type of the body data. | text/xml; charset=utf-8 |
SOAPAction | "" (empty string) |
Header | Value |
---|---|
Content-Length (if present in the input message) | The calculated length of the reply message body in decimal. |
Content-Type | text/xml; charset=utf-8 |
Header | Value |
---|---|
Host | Value set in the Default Web Service URL property. |
Content-Length | The calculated length of the request message body in decimal. |
Content-Type | text/xml; charset=utf-8 |
SOAPAction | "" (empty string) |
Header | Content | Example |
---|---|---|
Content-Length | The length of the response message body in decimal. | 1585 |
Example messages provides example messages that include these headers.
The following message provides an example of a request sent by an HTTPRequest node to a Web service that provides a look-up service:
POST /greenpages/servlet/rpcrouter HTTP/1.0 Host: localhost Content-Type: text/xml; charset=utf-8 Content-Length: 520 SOAP Action: "" Cookie: JSESSIONID=0000B5OSLFIUDMQZFAUXKHD5ZDQ:-1 <?xml version='1.0' encoding='UTF-8'?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schema.xmlsoap.org.soap/envelope/" xmlns:xsi="http://www.w3/2001/XMLSchema-instance" xmlns:xsd="http://www.w3/2001/XMLSchema"> <SOAP-ENV:Body> <ns1:getUserByName xmlns:ns1="http://tempuri.org/imb.GreenPages" SOAP-ENV:encodingStyle="http:/schemas.xmlsoap.org/soap/encoding/"> <nameField xsl:type="xsd:string">bloggs, joe</nameField> </ns1:getUserByName> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
The following message is an example of the response that might be returned to the HTTPRequest node:
HTTP/1.0 200 OK Server: WebSphere Application Server/4.0 Content-Type: text/xml; charset=utf-8 Content-Length: 1585 Content-Language: en Connection: close <?xml version='1.0' encoding='UTF-8'?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schema.xmlsoap.org.soap/envelope/" xmlns:xsi="http://www.w3/2001/XMLSchema-instance" xmlns:xsd="http://www.w3/2001/XMLSchema"> <SOAP-ENV:Body> <ns1:getUserByNameResponse xmlns:ns1="http://tempuri.org/imb.GreenPages" SOAP-ENV:encodingStyle="http:/schemas.xmlsoap.org/soap/encoding/"> <return xmlns:ns2="http://www.greenpages.com/schemas/GreenPagesRemoteInterface" xsi:type="ns2:imb.UserRecord"> <fullName xsi:type="xsd:string">Joseph Bloggs</fullName> <empNum xsi:type="xsd:int">65874</empNum> <deskPhone xsi:type="xsd:string">(718)545-3623</deskPhone> </return> </ns1:getUserByNameResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
Related concepts
Message flows
Generate Web Services Description Language (WSDL)
Related tasks
Developing message flow applications
Generating a Web Service Definition from a message set
Deploying message flow applications
Related reference
WebSphere MQ Web Services Transport
developerWorks Web
site
Notices |
Trademarks |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
ac00475_ |