Sending SOAP documents over HTTP/S
SOAP
documents differ from other types of documents exchanged over HTTP/S. They
use the standard Adapter for Web Services, which calls the SOAP
data handler to transform SOAP messages into business objects and
to transform business objects into SOAP messages. This section describes
how to send and receive SOAP documents between WebSphere Partner
Gateway and WebSphere InterChange Server over the HTTP transport protocol.
Refer to the Adapter for Web Services documentation for information
on the business-object structure and on the WSDL Object Discovery
Agent (ODA), a design-time tool you can use to generate SOAP business
objects that include information about the target Web services.
As described in the Hub Configuration Guide,
you must have set up a target to receive Web service invocations
from a back-end system (the Web services target) as well as a target
to receive Web service invocations from a community participant
(the external Web services target).
Components required for sending and receiving
To send a SOAP document from WebSphere Partner Gateway
to InterChange Server using the HTTP transport protocol, you use the component
listed in Table 50.
Table 50. Components required to send SOAP documents to InterChange Server through HTTP
Component |
Description |
Notes and restrictions |
WebSphere Business Integration Adapter
for Web Services |
This adapter allows InterChange Server to exchange business
objects with applications that send or receive data in the form
of HTTP messages. |
- This adapter cannot be used with non-SOAP
documents.
- Make sure you are using the Adapter for Web Services 3.4.0 (or
higher). Refer to the Adapter for Web Services User Guide to
make sure that the level of the adapter is compatible with the version
of WebSphere InterChange Server you are using.
|
Note: If a SOAP document contains attachments, you do
not need to use the Attachment data handler to handle them.
How community participants invoke Web services
The following steps occur when a community participant
sends a request for a collaboration that is exposed as a Web Service
that the Community Manager provides:
- The community participant sends a SOAP request message to the
destination specified in the WSDL document generated for the collaboration.
Note that the endpoint specified in the WSDL is the Web services
target (URL) of WebSphere Partner Gateway instead of the actual
endpoint.
- WebSphere Partner Gateway receives and routes the message to
the Adapter for Web services.
- The Adapter for Web Services sends the SOAP message to the SOAP
data handler to convert the SOAP message to a business object. The
adapter invokes the collaboration exposed as a Web service.
- If this is a request/response operation, the collaboration returns
a SOAP response (or fault) business object.
- If the collaboration returned a SOAP response (or fault) business
object, the Adapter for Web Services calls the SOAP data handler
to convert the SOAP response (or fault) business object to a SOAP
response message. The adapter returns the response to WebSphere
Partner Gateway. If the collaboration did not return a SOAP response
(or fault) business object, the Adapter for Web Services returns
the appropriate HTTP response status code.
- WebSphere Partner Gateway routes the response to the Web service.
How the Community Manager invokes Web services
The Public WSDL provided by WebSphere Partner Gateway
can be used for creating business objects using WSDL ODA. It is
important to note that when the Web service is provided by a community
participant for use by the Community Manager, the public URL used
by the Community Manager to invoke the Web service should contain
the following query string:
?to=<Community participant Web Service Provider's business ID>
For example, the following address tells WebSphere Partner Gateway
that the provider of the Web service is the participant with business
ID 123456789:
http://<Hub_IP_address>/bcgreceiver/Receiver?to=123456789
The WSDL ODA will not add the query string in the default value
of the URL attribute of the Web Service top-level business object.
The following steps occur when a collaboration sends a request
(to the Adapter for Web Services) to invoke a Web service of a community
participant:
- The collaboration sends a service call request to the adapter,
which calls the SOAP data handler to convert the business object
to a SOAP request message.
- The adapter invokes the Web service by sending the SOAP message
to the external Web services target (URL) on WebSphere Partner Gateway.
- WebSphere Partner Gateway acts as a proxy, sending the SOAP
message to the endpoint corresponding to the destination (community
participant) Web service. This invokes the Web service.
- The invoked Web service receives the SOAP request message and
performs the requested processing.
- The invoked Web service sends a SOAP response (or fault) message.
In the case of a one-way operation, the appropriate HTTP status
code is returned.
- If this is a request/response Web Service, WebSphere Partner
Gateway routes the SOAP response (or fault) message to the adapter,
which calls the data handler to convert it to a response or fault
business object. The connector returns the SOAP response or fault
business object to the collaboration.
