Soap
Soap
Soap
Bernard Cheng
Juhan Houang
Brandon Jew
Naoya Makino
Stephen Tiu
Agenda
• What is SOAP?
• Structure of a SOAP message
• Advantages of Using SOAP?
• Disadvantages of SOAP?
• Demonstration & Q&A
What is SOAP?
• Simple Object Access Protocol
• Highly flexible RPC communication
protocol
• Bridges technologies in a standardized
way
• Interoperability
Structure of a SOAP Message
The Structure of a SOAP Message
• The SOAP envelope
o Identifies the XML doc as a SOAP msg
• The SOAP header
o Contains header info
• The SOAP body
o Contains call and response info
• The SOAP fault
o Contains errors and status info
The SOAP Envelope Element
The xmlns:soap Namespace
Envelopexmlns:soap=
"http://www.w3.org/2001/12/soap-envelope"
<soap:Body>
<m:GetPrice
xmlns:m="http://www.example.com/prices">
<m:Item>Apples</m:Item>
</m:GetPrice>
</soap:Body>
</soap:Envelope>
SOAP Response
<?xml version="1.0"?>
<soap:Envelope
xmlns:soap="http://www.w3.org/2001/12/soap-
envelope"
soap:encodingStyle="http://www.w3.org/2001/12/soa
p-encoding">
<soap:Body>
<m:GetPriceResponse
xmlns:m="http://www.example.com/prices">
<m:Price>1.90</m:Price>
</m:GetPriceResponse>
</soap:Body>
</soap:Envelope>
Advantages
• Interoperability
• Standardized protocol allows for easy
integration with multiple web services
• Sits on top of other protocols – focuses
purely on handling & processing
messages
• allow remote procedure calls
Disadvantages?
• XML can be consumed by overhead
(Angle Bracket Tax)
• Inefficient for short messages
• Severe security issues: "We poke holes in
your firewall so you don’t have to!"
• CORBA + IIOP is faster, requires less
chatter
DEMO