Problem solve Get help with specific problems with your technologies, process and projects.

Protocols for asynchronous communication

What protocol should we use for asynchronous communication? Is there any provision for it in the WSDL? If I have an asynchronous Web service that will call back the caller with the result, then who is responsible for defining the callback interface--the client or the server? Can I assume the scenario is like this: the server defines the callback portType and operation, the client implements this and sends the contact point dynamically? Can you give an example?

By "protocol" I assume you mean which "Web service" protocol as opposed to which underlying transport protocol. If so, then there is no hard and fast answer. At the time of this writing (December, 2003) there are a number of competing approaches to standardizing asynchrony in Web services and still more specifications that have tangential relationships to asynchronous messaging.

When the smoke clears, however, a series of specifications are emerging as the defacto solution to asynchrony and reliable messaging. These are; WS-Addressing, WS-ReliableMessaging, and WS-Policy. Together these specifications allow you to send one or more messages to an endpoint, guarantee that they are received, specify an endpoint where the response is to be sent, and advertise the capabilities of an endpoint. WS-Addressing allows you to take the request and response address out of the underlying protocol and put them in the message. It also allows for the correlation of potentially more than one response. WS-ReliableMessaging allows you to send one or more messages, assure delivery at the endpoint X many times (at least once, exactly once, etc.), retransmit lost messages and more. Effectively creating a reliable messaging bus similar to MQ-Series or Tibco but using any transport including HTTP. WS-Policy is a specification that allows for a service to state its capabilities and other information about itself. For instance, that it uses X.509 certificates for authentication and that it supports reliable messaging.

To answer your question directly, you are responsible for setting the callback interface. Or, more accurately, the Wed Service toolkit you are using, is responsible. Fundamentally, when you send a message the SOAP header should be populated with the WS-Addressing compliant address of an endpoint you set up. When the server sees this header, instead of responding directly (which, indeed, it may not be able to do depending on the underlying physical transport), it should formulate its response (in accordance with the WSDL) and send it back to the address specified in the original request. This may take place immediately, or it may be hours or days later.

Part of WS-Policy discusses how to get policy assertions into a WSDL document of referenced from UDDI.

At the time of this writing, most Web service toolkit vendors do not have complete support for these specifications. However, they do look ascendant and you should expect to see them implemented by mid 2004. Taken together, these standards will significantly impact the way Web services are deployed and significantly extend the business problems they can solve.

Dig Deeper on Topics Archive

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.