Simple Object Access Protocol
(SOAP)
Presented by Mehul Kumar
What we are going to Discuss?
• Introduction
• Design Goals
• Architecture
• SOAP Message Format
• Messaging Models
• Security & Issues
• Advantages & Disadvantages
• WSDL Overview
• Implementation Example
What is SOAP?
• Simple Object Access Protocol
• Messaging Protocol
• Protocol to Access Web Services
• Based on XML
• Developed by IBM, Microsoft, Lotus, and others
Example
Design Goals of SOAP
• Simplicity
• Extensibility
• Neutrality (Protocols)
• Independence (Programming Language)
In Brief
• SOAP is a way for a program running in one
operating system to communicate with a program
running in either the same or a different operating
system, using HTTP (or any other transport
protocol) and XML.
SOAP Architecture
SOAP Message Format
1. Envelope - What is in the message & who should deal
with it.
2. Header (Optional) - Generic Container for Control
Information. Can contain any number of elements.
3. Body - Message Payload
Format - SOAP Envelope Code
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header> <!-- optional -->
<!-- header blocks go here... -->
</soap:Header>
<soap:Body>
<!-- payload or Fault element goes here... -->
</soap:Body>
</soap:Envelope>
Format - SOAP Header Code
<soap:Header>
<!-- security credentials -->
<s:credentials xmlns:s="urn:examples-org:security">
<username>dave</username>
<password>evad</password>
</s:credentials>
</soap:Header>
Format - SOAP Body Code
<soap:Body>
<x:TransferFunds xmlns:x="urn:examples-
org:banking"> <from>22-342439</from>
<to>98-283843</to>
<amount>100.00</amount>
</x:TransferFunds>
</soap:Body>
SOAP Messaging Models
• Request/Response
• One Way
• Multicast
SOAP Security & Issues
• Does not define encryption for XML Web Services.
• Left up to the implementer.
Issues
• Encryption places dependency on transport protocol
• Cost of Encryption
SOAP Advantages
• Simplicity
• Portability
• Firewall Friendly
• Use of Open Standards
• Interoperatibility
SOAP Disadvantages
• Too much reliance on HTTP
• Statelessness
• Serialized by Value and not by Reference
What is WSDL?
• Web Service Description Language
• Pronounced as 'wiz-dull'
• Provides Metadata for SOAP Service
• Follow Specific Structure
WSDL Structure
<definitions>
<types> ........ </types> <!--Type of Data-->
<message> <part></part> </message> <!--Data Elements-->
<portType> ....... </portType> <!--Operations-->
<binding> .... </binding> <!--Protocol & Data Format for a Port-->
<service> .... </service> <!--URI & Details-->
</definitions>
Implementation of SOAP
Let's see an example using PHP
Conclusion
• Fallen-out of Favor due to new public APIs
• Commonly used for B2B Applications
• Independent of Programming Languages
• XML Based

Simple Object Access Protocol (SOAP)

  • 1.
    Simple Object AccessProtocol (SOAP) Presented by Mehul Kumar
  • 2.
    What we aregoing to Discuss? • Introduction • Design Goals • Architecture • SOAP Message Format • Messaging Models • Security & Issues • Advantages & Disadvantages • WSDL Overview • Implementation Example
  • 3.
    What is SOAP? •Simple Object Access Protocol • Messaging Protocol • Protocol to Access Web Services • Based on XML • Developed by IBM, Microsoft, Lotus, and others
  • 4.
  • 5.
    Design Goals ofSOAP • Simplicity • Extensibility • Neutrality (Protocols) • Independence (Programming Language)
  • 6.
    In Brief • SOAPis a way for a program running in one operating system to communicate with a program running in either the same or a different operating system, using HTTP (or any other transport protocol) and XML.
  • 7.
  • 8.
    SOAP Message Format 1.Envelope - What is in the message & who should deal with it. 2. Header (Optional) - Generic Container for Control Information. Can contain any number of elements. 3. Body - Message Payload
  • 9.
    Format - SOAPEnvelope Code <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <!-- optional --> <!-- header blocks go here... --> </soap:Header> <soap:Body> <!-- payload or Fault element goes here... --> </soap:Body> </soap:Envelope>
  • 10.
    Format - SOAPHeader Code <soap:Header> <!-- security credentials --> <s:credentials xmlns:s="urn:examples-org:security"> <username>dave</username> <password>evad</password> </s:credentials> </soap:Header>
  • 11.
    Format - SOAPBody Code <soap:Body> <x:TransferFunds xmlns:x="urn:examples- org:banking"> <from>22-342439</from> <to>98-283843</to> <amount>100.00</amount> </x:TransferFunds> </soap:Body>
  • 12.
    SOAP Messaging Models •Request/Response • One Way • Multicast
  • 13.
    SOAP Security &Issues • Does not define encryption for XML Web Services. • Left up to the implementer. Issues • Encryption places dependency on transport protocol • Cost of Encryption
  • 14.
    SOAP Advantages • Simplicity •Portability • Firewall Friendly • Use of Open Standards • Interoperatibility
  • 15.
    SOAP Disadvantages • Toomuch reliance on HTTP • Statelessness • Serialized by Value and not by Reference
  • 16.
    What is WSDL? •Web Service Description Language • Pronounced as 'wiz-dull' • Provides Metadata for SOAP Service • Follow Specific Structure
  • 17.
    WSDL Structure <definitions> <types> ........</types> <!--Type of Data--> <message> <part></part> </message> <!--Data Elements--> <portType> ....... </portType> <!--Operations--> <binding> .... </binding> <!--Protocol & Data Format for a Port--> <service> .... </service> <!--URI & Details--> </definitions>
  • 18.
    Implementation of SOAP Let'ssee an example using PHP
  • 19.
    Conclusion • Fallen-out ofFavor due to new public APIs • Commonly used for B2B Applications • Independent of Programming Languages • XML Based