10-05-2014, 04:20 PM
Intro and Message Formats
Intro and Message .ppt (Size: 136 KB / Downloads: 14)
SOAP Primary References
SOAP is defined by a number of links
http://www.w3TR/soap/
See primarily the “Primer” and “Messaging Framework” links.
The actual SOAP schema is available from http://www.w32003/05/soap-envelope/
It is pretty small, as these things go.
SOAP and Web Services
Our previous lectures have looked at WSDL
Defines the interfaces for remote services.
Provides guidelines for constructing clients to the service.
Tells the client how to communicate with the service.
The actual communications are encoded with SOAP.
Transported by HTTP
Defining SOAP Messages
Given what you have learned about WSDL, imagine it is your job to design the message interchange layer.
What are the requirements?
Note SOAP actually predates WSDL, so this is in reverse order.
Web Service Messaging Infrastructure Requirements?
Define a message format
Define a messaging XML schema
Allow the message to contain arbitrary XML from other schemas.
Keep It Simple
Messages may require advanced features like security, reliability, conversational state, etc.
KISS, so don’t design these but do design a place where this sort of advanced information can go.
Tell the message originator is something goes wrong.
Define data encodings
That is, you need to tell the message recipient the types of each piece of data.
Define some RPC conventions that match WSDL
Your service will need to process the message, so you need to provide some simple conventions for matching the message content to the WSDL service.
Decide how to transport the message.
Generalize it, since messages may pass through many entities.
Decide what to do about non-XML payloads (movies, images, arbitrary documents).
What Does SOAP Look Like?
The next two slides shows examples of SOAP message.
It’s just XML
First slide is an example message that might be sent from a client to the echo service.
Second slide is an example response.
I have highlighted the actual message payload.
Lax
“If the item, or any items among its children if it's an element information item, has a uniquely determined declaration available, it must be ·valid· with respect to that definition.”
That is, ·validate· where you can, don't worry when you can't.
Header Roles
SOAP nodes may be assigned role designations.
SOAP headers then specify which role or roles should process.
Standard SOAP roles:
None: SOAP nodes MUST NOT act in this role.
Next: Each SOAP intermediary and the ultimate SOAP receiver MUST act in this role.
UltimateReceiver: The ultimate receiver MUST act in this role.
In our example, all nodes must process the header entries.
Next Time
This lecture has examined the basic SOAP message format.
We have not described the following:
The rules for encoding transmitted data
Specifically, how do I encode XML for RPC?
How does this connect to WSDL?
The rules for transmitting messages.
I also want to give a specific example of extending SOAP to support reliable messaging.