0% found this document useful (0 votes)
107 views18 pages

Soap

The document discusses SOAP, including its structure and advantages/disadvantages. SOAP is a protocol for exchanging XML-based messages over computer networks, typically using HTTP/HTTPS. A SOAP message contains an envelope with a header and body. The body includes call and response information, while the header contains metadata. SOAP enables interoperability between systems and standardizes remote procedure calls, though it adds overhead and has security issues.

Uploaded by

Naoya Makino
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
107 views18 pages

Soap

The document discusses SOAP, including its structure and advantages/disadvantages. SOAP is a protocol for exchanging XML-based messages over computer networks, typically using HTTP/HTTPS. A SOAP message contains an envelope with a header and body. The body includes call and response information, while the header contains metadata. SOAP enables interoperability between systems and standardizes remote procedure calls, though it adds overhead and has security issues.

Uploaded by

Naoya Makino
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 18

Group 9 - 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"

The encodingStyle Attribute


soap:encodingStyle="URI"
The SOAP Header Element
The mustUnderstand Attribute
Indicate whether a header entry is mandatory or optional
soap:mustUnderstand="0|1"

The actor Attribute


Used to address the Header element to a specific endpoint
soap:actor="URI"

The endocingStyle Attribute


Used to define the data types used in the doc
soap:encodingStyle="URI"
SOAP Fault Element
Used to indicate error messages
Sub Element
• <faultcode>: a code for identifying the fault
• <faultstring>: an explanation of the fault
• <faultactor>: info about who caused the fault to happen
• <detail>: application specific error info related to the Body
element
SOAP Example
<?xml version="1.0"?>
<soap:Envelope
xmlns:soap="http://www.w3.org/2001/12/soap-
envelope"
soap:encodingStyle="http://www.w3.org/2001/12/
soap-encoding">

<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

You might also like