Professional Documents
Culture Documents
1
Unit-5: Technologies for SOA
• XML: Namespaces, schemas, processing/passing models
• SOAP: messages, elements, attributes and processing
model, message exchange types ,HTTP binding
• WSDL: containment structure, elements of abstract
description, elements of the implementation part,
logical relationships, SOAP binding
• UDDI Registry: Basic data model, tmodel, categorization
and identification schemes, binding template, use of
WSDL in the UDDI registry
2
SOAP
XML itself is not enough for two parties to
communicate
5
SOAP
A simple but complete example of a SOAP
request for making a reservation request is
shown in Listing 12-1.
6
7
8
SOAP Elements
Envelop
Header
Body
Fault
Name Space:
http://schemas.xmlsoap.org/soap/envelope/
9
SOAP
The header element is optional, but when it is
present it should be the first immediate child of
the envelope element
10
SOAP Header
<env:header xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<!—extensions go here -->
</env:header>
The child elements of the Header element are called header blocks
Elements of body
Must be qualified with a namespace
Should not be 'http://schemas.xmlsoap.org/soap/ envelope/’ 12
SOAP Fault
13
14
SOAP Attributes and Processing Model
Role
mustUnderstand
Relay
15
SOAP Attribute: role
SOAP Nodes assume one or more roles
How this is done is not defined in SOAP specification
16
17
SOAP Attribute: role
As shown in Listing 12-3.
A mustUnderstand value of "true" means that the SOAP node must process the header
with the semantics described in that header's specification, or else generate a SOAP fault
and returned.
19
SOAP Attribute: relay
relay Attribute is of type Boolean
Possible values :("true" or "false“).
By default, the SOAP intermediary node also removes all header
blocks with the mustUnderstand value as false.
However, when the relay attribute is specified with a value of true, the
SOAP intermediary node retains the unprocessed header block in the
message.
22
RPC
To make an RPC request for invocation, the following steps are needed:
The address of the targeted node that will ultimately process the request
The required parameters' names and values to invoke the method/ procedure,
including any output parameter and return value
Address information the target of the RPC equivalent to a node that adopts the
role of ultimate Receiver.
The target URI is made available depends on the underlying protocol binding.
the URI identification information can be carried in a SOAP header block.
URI information outside the SOAP message. (as HTTP header) 23
an example of an RPC request for credit card
payment. The travel reservation application
provides credit card information
On successful completion the card being charged
and a reservation code returned.
This reserve-and-charge interaction between the
travel reservation application and the travel
service application is modeled as a SOAP RPC.
24
25
The response is also returned as a SOAP message.
the response has two output parameters
reference to the reservation code
URL where the details of the reservation can be viewed.
26
27
SOAP HTTP Binding
SOAP messages may be exchanged using a variety of
"underlying" protocols. One ex: HTTP
HTTP POST method is used to convey SOAP messages in the bodies of HTTP
request and response messages (request/response message-exchange
Pattern)
30
31
32
HTTP POST Usage
The SOAP request/response message-exchange pattern is
restricted to the HTTP POST method if HTTP binding is used.
This pattern is available to all applications.
It can be used for general exchange of XML data or RPCs
An example of an RPC exchange
the server is at myCompany .example.com
the SOAP request is sent in the body of an HTTP POST request.
the request is directed at the method chargeReservation.
The HTTP POST response
33
34
35
Conclusion
• SOAP is an XML based message format to
exchange structural information between
applications
• SOAP can be transported on any protocol
• SOAP defines HTTP specific binding
• SOAP supports a number of message
exchange patterns, including remote
procedure calls.
36