SlideShare a Scribd company logo
1 of 40
Download to read offline
Topic 2

         Introduction to SOAP



Assoc.Prof. Dr. Thanachart Numnonda
       www.imcinstitute.com
            August 2010
Agenda
 What   is SOAP?
 SOAP Structure

 SOAP Communication   / Encode




                                  2
What is SOAP?




                3
SOAP Definition [W3C]
   SOAP is a lightweight protocol intended for exchanging
    structured information in a decentralized, distributed
    environment
   SOAP uses XML technologies to define an extensible
    messaging framework providing a message construct
    that can be exchanged over a variety of underlying
    protocols
   The framework has been designed to be independent of
    any particular programming model and other
    implementation specific semantics
                                                             4
What is SOAP?
 Simple Object Access Protocol
 Wire protocol similar to
     – IIOP for CORBA
     – JRMP for RMI
 XML is used for data encoding
     – “text” based protocol vs. “binary” protocol
 Supports XML-based RPC (Remote Procedure Call)



                                                     5
Do I Need to know how SOAP works
   in detail as a Java Developer?
 Yes
       –   Understanding it will help you to build better
           application
       –   Example) Understanding how TCP/IP will help
           you build better TCP/IP application
 No
       –   You will mostly likely use high-level API (JAX-
           WS, JAX-RPC) to build Web applications
       –   How SOAP works is hidden from developers
                                                             6
Where is SOAP?
 SOAP 1.2 is W3C recommendation
 SOAP 1.2 Part 1 defines
     – SOAP envelope
     – Protocol binding framework
 SOAP 1.2 Part 2 defines
 SOAP 1.2 becomes a W3C recommendation in
  2003.


                                             7
SOAP Features
 Extensible
 Usable over a variety of underlying networking
  protocols
 Independent of programming models




                                                   8
SOAP Features : Extensible
 SOAP is simple by design
 SOAP lacks various distributed system features:
       –   security
       –   Routing
       –   Transactions
       –   etc.
   SOAP defines a communication framework that allows
    additional features to be added as layered extensions.

                                                             9
SOAP Features : Protocol Independent
   SOAP can be used over any protocol:
       –   TCP
       –   HTTP
       –   SMTP
       –   etc.
 SOAP provides a flexible framework for defining
  bindings to arbitrary protocols to maintain
  interoperability.
 SOAP provides an explicit binding for HTTP.
                                                    10
SOAP Features : Model-Independent
 Allows for any programming model not tied to
  RPC.
 Defines a model for processing individual, one-way
  messages, or combine multiple messages into an
  overall message exchange
 Allows for any number of message exchange
  patterns: request/response, solicit/response,
  notifications, peer-to-peer

                                                       11
SOAP Structure




                 12
SOAP Message Structure




                         13
SOAP Messaging
   The SOAP messaging framework defines a suite of
    XML elements for packaging arbitrary XML
    messages for transport between systems:
       – envelope
       – header
       – body
       – fault
       – etc.

                                                      14
SOAP Messaging : Example
<soapenv:Envelope
 <soapenv:Envelope
   xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
   xmlns:web="http://www.webserviceX.NET/">
    xmlns:web="http://www.webserviceX.NET/">
   <soapenv:Header/>
    <soapenv:Header/>
   <soapenv:Body>
    <soapenv:Body>
      <web:GetQuote>
       <web:GetQuote>
         <!--Optional:-->
          <!--Optional:-->
         <web:symbol>goog</web:symbol>
          <web:symbol>goog</web:symbol>
      </web:GetQuote>
       </web:GetQuote>
   </soapenv:Body>
    </soapenv:Body>
</soapenv:Envelope>;;
 </soapenv:Envelope>




                                                                15
SOAP Namespaces
 All XML elements belong to the following
  namespaces:
 SOAP 1.1 -
  http://schemas.xmlsoap.org/soap/envelope
 SOAP 1.2 -

http://www.w3.org/2003/05/soap-envelope



                                             16
SOAP Message Envelope
   Embedded Information
       –     Namespaces
       –     Encoding information
   Header
       –     Optional
       –     Can be handled by intermediaries
   Body
       –     Mandatory
       –     Handled only by ultimate receiver
                                                 17
SOAP Envelope : Embedded Information
   Envelop is always the root element of a SOAP
    message:
   The namespace is specified in the envelope for:
         –        defining the envelope elements
         –        controlling the SOAP version
<soap:Envelope
 <soap:Envelope
xmlns:soap="http://www.w3.org/2003/05/soap-envelope /">
 xmlns:soap="http://www.w3.org/2003/05/soap-envelope /">
<soap:Header>...</soap:Header>
 <soap:Header>...</soap:Header>
<soap:Body>...</soap:Body>
 <soap:Body>...</soap:Body>
</soap:Envelope>
 </soap:Envelope>

                                                           18
SOAP Header
 Provides a mechanism for extending SOAP
  messages in a decentralized and modular way
 Allows to pass control information to the receiving
  SOAP server.
 Used for extension
     –   Context
     –   Authentication
     –   Transaction
     –   Management
     –   Many other higher level semantics
                                                        19
SOAP Header : Example


<soap:Envelope xmlns:soap=“http://www.w3.org/2003/05/soap-envelope”>
 <soap:Envelope xmlns:soap=“http://www.w3.org/2003/05/soap-envelope”>
<soap:Header>
 <soap:Header>
    <t:transaction xmlns:t=“http://example.org/transac”>
     <t:transaction xmlns:t=“http://example.org/transac”>
    <t:loginTime>10:20:00</t:loginTime>
     <t:loginTime>10:20:00</t:loginTime>
    <t:logoutTime>10:21:00</t:logoutTime>
     <t:logoutTime>10:21:00</t:logoutTime>
    </t:transaction>
     </t:transaction>
</soap:Header>
 </soap:Header>
...
 ...
</soap:Envelope>
 </soap:Envelope>




                                                                        20
SOAP Header : Attributes
 SOAP 1.2 provides mechanisms to specify who
  should deal with headers and what to do with them.
 For this purpose it includes attributes:
       –    role
       –    MustUnderstand
       –    relay
   Also it is possible to define:
       – encodingStyle
   SOAP 1.1 has actor attribute instead of role, with the
    same semantic.                                         21
Mandatory/Optional Headers
 Headers may be mandatory or optional.
 If a header is mandatory:
      – the receiver must process the header
      – if the receiver is unable to process the
          header, it must fail
 mustUnderstand attribute indicates if a header is
  mandatory or optional.



                                                      22
SOAP Body
 The SOAP Body element represents a mechanism
  for exchanging information intended for the
  ultimate recipient of the message.
 Body represents the message payload – a generic
  container that includes any number of elements
  from any namespace.
 In the simplest case the body of a SOAP message
  includes:
      –  message name
     –   reference to a service instance
     –   parameters with values and optional type references 23
SOAP Body (cont)
   Made of Body blocks (Body entries)
   Consumed by Ultimate SOAP receiver
   Carry end-to-end information
     Applicationdata (XML document) (document style)
     RPC method and parameters (rpc style)
     SOAP fault




                                                        24
SOAP Body: Request Example
   Request message to transfer funds between bank accounts:


soap:Envelope xmlns:soap=“http://www.w3.org/2003/05/soap-envelope”
 soap:Envelope xmlns:soap=“http://www.w3.org/2003/05/soap-envelope”
    soap:Body
     soap:Body
             x:TransferFunds xmlns:x=“urn:examples-org:banking”
              x:TransferFunds xmlns:x=“urn:examples-org:banking”
                     x:from983-23456/x:from
                      x:from983-23456/x:from
                     x:to672-24806/x:to
                      x:to672-24806/x:to
                  x:amount1000.00/x:amount
                   x:amount1000.00/x:amount
         /x:TransferFunds
          /x:TransferFunds
     /soap:Body
      /soap:Body
/soap:Envelope
 /soap:Envelope




                                                                     25
SOAP Body: Response Example
soap:Envelope xmlns:soap=“http://www.w3.org/2003/05/soap-envelope”
 soap:Envelope xmlns:soap=“http://www.w3.org/2003/05/soap-envelope”
    soap:Body
     soap:Body
        x:TransferFundsResponse xmlns:x=“urn:examples-org:banking”
         x:TransferFundsResponse xmlns:x=“urn:examples-org:banking”
            x:balances
             x:balances
                x:account
                 x:account
                     x:id983-23456/x:id
                      x:id983-23456/x:id
                     x:balance34.98/x:balance
                      x:balance34.98/x:balance
                 /x:account
                  /x:account
                 x:account
                  x:account
                     x:id672-24806/x:id
                      x:id672-24806/x:id
                     x:balance1267.14/x:balance
                      x:balance1267.14/x:balance
                /x:account
                 /x:account
            /x:balances
             /x:balances
        /x:TransferFundsResponse
         /x:TransferFundsResponse
    /soap:Body
     /soap:Body
/soap:Envelope
 /soap:Envelope                                                       26
SOAP Fault
   The Fault element is used to represent errors:
          processing errors
          errors understanding a mandatory header
          all abnormal situations
   Faults are specified within the body of a SOAP
    message.




                                                     27
SOAP Fault: Example
soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/
 soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/
     soap:Body
      soap:Body
        soap:Fault
         soap:Fault
             soap:Code
              soap:Code
                  soap:Valuesoap:Sender/soap:Value
                   soap:Valuesoap:Sender/soap:Value
             /soap:Code
              /soap:Code
             soap:ReasonInsufficient funds/soap:Reason
              soap:ReasonInsufficient funds/soap:Reason
             soap:Detail
              soap:Detail
                    x:TransferError xmlns:x=urn:examplesorg:banking
                     x:TransferError xmlns:x=urn:examplesorg:banking
                         x:sourceAccount22-342439/x:sourceAccount
                          x:sourceAccount22-342439/x:sourceAccount
                        x:transferAmount100.00/x:transferAmount
                         x:transferAmount100.00/x:transferAmount
                        x:currentBalance89.23/x:currentBalance
                         x:currentBalance89.23/x:currentBalance
                  /x:TransferError
                   /x:TransferError
             /soap:Detail
              /soap:Detail
         /soap:Fault
          /soap:Fault
    /soap:Body
     /soap:Body
/soap:Envelope
 /soap:Envelope                                                          28
SOAP Communication / Encode




                              29
SOAP Communication Styles
 SOAP enables two communication styles:
 Document-style
       –   The message has no fixed structure, so the
           interacting applications must agree beforehand
           on this structure.
   RPC-style
       –   Synchronous method invocation - pre-defined
           message structure.


                                                            30
RPC Style
 RPC-style is a synchronous invocation of an
  operation returning a result:
 One SOAP message encapsulates the request.
       –   The body of the request message contains the
           actual call including the name of the procedure
           being invoked and the input parameters.
   Another SOAP message encapsulates the response.
       –   The body of the response contains the result and
           output parameters.
   The two interacting applications agree upon the
    RPC method signature.                                     31
Document Style
   Also known as a message-oriented style:
       –   a request is an XML document
       –   an optional response is also an XML document
 Two interacting applications agree beforehands
  upon the structure of the documents exchanged,
  then use SOAP messages to transport them.
 Very flexible communication style that provides the
  best interoperability, using synchronous or
  asynchronous communication.

                                                          32
SOAP Document Style: Example
soap:Envelope
 soap:Envelope
     xmlns:soap=“http://www.w3.org/2003/05/soap-envelope”
      xmlns:soap=“http://www.w3.org/2003/05/soap-envelope”
     xmlns:xsd=“http://www.w3.org/2001/XMLSchema”
      xmlns:xsd=“http://www.w3.org/2001/XMLSchema”
soap:Body
 soap:Body
    orgNS:returnBalance
     orgNS:returnBalance
         xmlns:orgNS=“http://myOrganization.com/”
          xmlns:orgNS=“http://myOrganization.com/”
        soap:encodingStyle=“http://www/w3.org/2003/05/soap-encoding”
         soap:encodingStyle=“http://www/w3.org/2003/05/soap-encoding”
        orgNS:balance orgNS:type=“xsd:float”1235.95
         orgNS:balance orgNS:type=“xsd:float”1235.95
         /orgNS:balance
          /orgNS:balance
    /orgNS:returnBalance
     /orgNS:returnBalance
/soap:Body
 /soap:Body
/soap:Envelope
 /soap:Envelope




                                                                         33
Data Model and Encoding
 In order to be able to send Java and others
  programming language objects inside SOAP
  envelopes, SOAP defines:
 SOAP Data Model - an abstract representation of
  the data structures such as the ones handled by Java
  or C#
 SOAP Encoding - a set or rules to map the data
  model into XML for sending the data inside SOAP
  envelopes

                                                         34
Data Model
   The SOAP data model represents data structures as
    connected graphs, where nodes represent values and edges
    represent labels.




                                                               35
Encoding
 SOAP encoding describes how the SOAP data model is
  written with XML.
 SOAP encoding is identified by the URI

 http://www.w3.org/2003/05/soap-encoding.
 When serializing XML using encoding rules, processors
  should use the encodingStyle attribute to indicate the
  SOAP encoding in use.
 The encodingStyle attribute can appear in:
     –   message headers
     –   message bodies
     –   Detail sub-element of Fault                       36
Encoding Example
soapenv:Envelope
 soapenv:Envelope
     xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/
      xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/
    xmlns:xsd=http://www.w3.org/2001/XMLSchema
     xmlns:xsd=http://www.w3.org/2001/XMLSchema
    xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
     xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
soapenv:Body
 soapenv:Body
     ns1:downloadFileResponse
      ns1:downloadFileResponse
        soapenv:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/
         soapenv:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/
             xmlns:ns1=http://soapinterop.org/
              xmlns:ns1=http://soapinterop.org/
        downloadFileReturn
         downloadFileReturn
             xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/
              xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/
             xsi:type=soapenc:base64“
              xsi:type=soapenc:base64“
             TW9..QogDQo=
              TW9..QogDQo=
         /downloadFileReturn
          /downloadFileReturn
    /ns1:downloadFileResponse
     /ns1:downloadFileResponse
/soapenv:Body
 /soapenv:Body
/soapenv:Envelope
 /soapenv:Envelope
                                                                             37
SOAP Processing Model
   SOAP defines a processing model that outlines rules for
    processing a SOAP message as it travels from a SOAP
    sender to a SOAP receiver.
   The model allows for architectures with multiple
    intermediary nodes:




                                                              38
Resources
 Some contents are borrowed from the presentation
  slides of Sang Shin, Java™ Technology Evangelist,
  Sun Microsystems, Inc.
 Web Services and Java, Elsa Estevez, Tomasz
  Janowski and Gabriel Oteniya, UNU-IIST, Macau




                                                      39
Thank you

   thananum@gmail.com
www.facebook.com/imcinstitute
   www.imcinstitute.com



                                40

More Related Content

What's hot

SOAP, WSDL and UDDI
SOAP, WSDL and UDDISOAP, WSDL and UDDI
SOAP, WSDL and UDDIShahid Shaik
 
SOAP, UDDI, WSDL. XML definitions
SOAP, UDDI, WSDL. XML definitions SOAP, UDDI, WSDL. XML definitions
SOAP, UDDI, WSDL. XML definitions Wish Mrt'xa
 
Introduction to Service Oriented Architectures, SOAP/WSDL Web Services and RE...
Introduction to Service Oriented Architectures, SOAP/WSDL Web Services and RE...Introduction to Service Oriented Architectures, SOAP/WSDL Web Services and RE...
Introduction to Service Oriented Architectures, SOAP/WSDL Web Services and RE...ecosio GmbH
 
Introduction to SOAP/WSDL Web Services and RESTful Web Services
Introduction to SOAP/WSDL Web Services and RESTful Web ServicesIntroduction to SOAP/WSDL Web Services and RESTful Web Services
Introduction to SOAP/WSDL Web Services and RESTful Web Servicesecosio GmbH
 
Java web services using JAX-WS
Java web services using JAX-WSJava web services using JAX-WS
Java web services using JAX-WSIndicThreads
 
WebServices SOAP WSDL and UDDI
WebServices SOAP WSDL and UDDIWebServices SOAP WSDL and UDDI
WebServices SOAP WSDL and UDDIRajkattamuri
 
Introduction to web services and how to in php
Introduction to web services and how to in phpIntroduction to web services and how to in php
Introduction to web services and how to in phpAmit Kumar Singh
 
Web service Introduction
Web service IntroductionWeb service Introduction
Web service IntroductionMadhukar Kumar
 
Web Services - Architecture and SOAP (part 1)
Web Services - Architecture and SOAP (part 1)Web Services - Architecture and SOAP (part 1)
Web Services - Architecture and SOAP (part 1)Martin Necasky
 
Intro to web services
Intro to web servicesIntro to web services
Intro to web servicesNeil Ghosh
 

What's hot (20)

WSDL 2.0 and Apache Woden
WSDL 2.0 and Apache WodenWSDL 2.0 and Apache Woden
WSDL 2.0 and Apache Woden
 
SOAP, WSDL and UDDI
SOAP, WSDL and UDDISOAP, WSDL and UDDI
SOAP, WSDL and UDDI
 
SOAP, UDDI, WSDL. XML definitions
SOAP, UDDI, WSDL. XML definitions SOAP, UDDI, WSDL. XML definitions
SOAP, UDDI, WSDL. XML definitions
 
Web service
Web serviceWeb service
Web service
 
Web service introduction
Web service introductionWeb service introduction
Web service introduction
 
Introduction to Service Oriented Architectures, SOAP/WSDL Web Services and RE...
Introduction to Service Oriented Architectures, SOAP/WSDL Web Services and RE...Introduction to Service Oriented Architectures, SOAP/WSDL Web Services and RE...
Introduction to Service Oriented Architectures, SOAP/WSDL Web Services and RE...
 
Introduction to SOAP/WSDL Web Services and RESTful Web Services
Introduction to SOAP/WSDL Web Services and RESTful Web ServicesIntroduction to SOAP/WSDL Web Services and RESTful Web Services
Introduction to SOAP/WSDL Web Services and RESTful Web Services
 
Java web services using JAX-WS
Java web services using JAX-WSJava web services using JAX-WS
Java web services using JAX-WS
 
WebServices SOAP WSDL and UDDI
WebServices SOAP WSDL and UDDIWebServices SOAP WSDL and UDDI
WebServices SOAP WSDL and UDDI
 
Web service architecture
Web service architectureWeb service architecture
Web service architecture
 
Web Service
Web ServiceWeb Service
Web Service
 
Web Services
Web ServicesWeb Services
Web Services
 
Introduction to web services and how to in php
Introduction to web services and how to in phpIntroduction to web services and how to in php
Introduction to web services and how to in php
 
Web service Introduction
Web service IntroductionWeb service Introduction
Web service Introduction
 
Web services
Web servicesWeb services
Web services
 
Web Services - Architecture and SOAP (part 1)
Web Services - Architecture and SOAP (part 1)Web Services - Architecture and SOAP (part 1)
Web Services - Architecture and SOAP (part 1)
 
WSDL
WSDLWSDL
WSDL
 
Web services wsdl
Web services wsdlWeb services wsdl
Web services wsdl
 
Intro to web services
Intro to web servicesIntro to web services
Intro to web services
 
Wsdl
WsdlWsdl
Wsdl
 

Viewers also liked

Java Web Services [5/5]: REST and JAX-RS
Java Web Services [5/5]: REST and JAX-RSJava Web Services [5/5]: REST and JAX-RS
Java Web Services [5/5]: REST and JAX-RSIMC Institute
 
Java Web Service - Summer 2004
Java Web Service - Summer 2004Java Web Service - Summer 2004
Java Web Service - Summer 2004Danny Teng
 
Jaxp Xmltutorial 11 200108
Jaxp Xmltutorial 11 200108Jaxp Xmltutorial 11 200108
Jaxp Xmltutorial 11 200108nit Allahabad
 
Simple API for XML
Simple API for XMLSimple API for XML
Simple API for XMLguest2556de
 
REST API Design for JAX-RS And Jersey
REST API Design for JAX-RS And JerseyREST API Design for JAX-RS And Jersey
REST API Design for JAX-RS And JerseyStormpath
 
Xml Java
Xml JavaXml Java
Xml Javacbee48
 
java API for XML DOM
java API for XML DOMjava API for XML DOM
java API for XML DOMSurinder Kaur
 
Web Technologies in Java EE 7
Web Technologies in Java EE 7Web Technologies in Java EE 7
Web Technologies in Java EE 7Lukáš Fryč
 
Community and Java EE @ DevConf.CZ
Community and Java EE @ DevConf.CZCommunity and Java EE @ DevConf.CZ
Community and Java EE @ DevConf.CZMarkus Eisele
 
Writing simple web services in java using eclipse editor
Writing simple web services in java using eclipse editorWriting simple web services in java using eclipse editor
Writing simple web services in java using eclipse editorSantosh Kumar Kar
 
Spring Framework - Core
Spring Framework - CoreSpring Framework - Core
Spring Framework - CoreDzmitry Naskou
 
HATEOAS 101 - Opinionated Introduction to a REST API Style
HATEOAS 101 - Opinionated Introduction to a REST API StyleHATEOAS 101 - Opinionated Introduction to a REST API Style
HATEOAS 101 - Opinionated Introduction to a REST API StyleApigee | Google Cloud
 
Fifty Features of Java EE 7 in 50 Minutes
Fifty Features of Java EE 7 in 50 MinutesFifty Features of Java EE 7 in 50 Minutes
Fifty Features of Java EE 7 in 50 Minutesglassfish
 

Viewers also liked (19)

Java Web Services [5/5]: REST and JAX-RS
Java Web Services [5/5]: REST and JAX-RSJava Web Services [5/5]: REST and JAX-RS
Java Web Services [5/5]: REST and JAX-RS
 
WebServices
WebServicesWebServices
WebServices
 
SCDJWS 2. Soap
SCDJWS 2. SoapSCDJWS 2. Soap
SCDJWS 2. Soap
 
JAXP
JAXPJAXP
JAXP
 
Java Web Service - Summer 2004
Java Web Service - Summer 2004Java Web Service - Summer 2004
Java Web Service - Summer 2004
 
Jaxp Xmltutorial 11 200108
Jaxp Xmltutorial 11 200108Jaxp Xmltutorial 11 200108
Jaxp Xmltutorial 11 200108
 
Simple API for XML
Simple API for XMLSimple API for XML
Simple API for XML
 
REST API Design for JAX-RS And Jersey
REST API Design for JAX-RS And JerseyREST API Design for JAX-RS And Jersey
REST API Design for JAX-RS And Jersey
 
Xml Java
Xml JavaXml Java
Xml Java
 
java API for XML DOM
java API for XML DOMjava API for XML DOM
java API for XML DOM
 
Web Technologies in Java EE 7
Web Technologies in Java EE 7Web Technologies in Java EE 7
Web Technologies in Java EE 7
 
Java Web Services
Java Web ServicesJava Web Services
Java Web Services
 
6 xml parsing
6   xml parsing6   xml parsing
6 xml parsing
 
Java XML Parsing
Java XML ParsingJava XML Parsing
Java XML Parsing
 
Community and Java EE @ DevConf.CZ
Community and Java EE @ DevConf.CZCommunity and Java EE @ DevConf.CZ
Community and Java EE @ DevConf.CZ
 
Writing simple web services in java using eclipse editor
Writing simple web services in java using eclipse editorWriting simple web services in java using eclipse editor
Writing simple web services in java using eclipse editor
 
Spring Framework - Core
Spring Framework - CoreSpring Framework - Core
Spring Framework - Core
 
HATEOAS 101 - Opinionated Introduction to a REST API Style
HATEOAS 101 - Opinionated Introduction to a REST API StyleHATEOAS 101 - Opinionated Introduction to a REST API Style
HATEOAS 101 - Opinionated Introduction to a REST API Style
 
Fifty Features of Java EE 7 in 50 Minutes
Fifty Features of Java EE 7 in 50 MinutesFifty Features of Java EE 7 in 50 Minutes
Fifty Features of Java EE 7 in 50 Minutes
 

Similar to Java Web Services [2/5]: Introduction to SOAP

Similar to Java Web Services [2/5]: Introduction to SOAP (20)

Soap pt1
Soap pt1Soap pt1
Soap pt1
 
Exchange of data over internet using web service(e.g., soap and rest) in SAS ...
Exchange of data over internet using web service(e.g., soap and rest) in SAS ...Exchange of data over internet using web service(e.g., soap and rest) in SAS ...
Exchange of data over internet using web service(e.g., soap and rest) in SAS ...
 
SOAP WEB TECHNOLOGIES
SOAP WEB TECHNOLOGIESSOAP WEB TECHNOLOGIES
SOAP WEB TECHNOLOGIES
 
Soap
SoapSoap
Soap
 
SOAP - Simple Object Access Protocol
SOAP - Simple Object Access ProtocolSOAP - Simple Object Access Protocol
SOAP - Simple Object Access Protocol
 
WebServices.ppt
WebServices.pptWebServices.ppt
WebServices.ppt
 
Introduction to SOAP
Introduction to SOAPIntroduction to SOAP
Introduction to SOAP
 
Soap xp-wg
Soap xp-wgSoap xp-wg
Soap xp-wg
 
Consuming SOAP
Consuming SOAPConsuming SOAP
Consuming SOAP
 
Soap service
Soap serviceSoap service
Soap service
 
Web-Services!.pptx
Web-Services!.pptxWeb-Services!.pptx
Web-Services!.pptx
 
Mazda siv - web services
Mazda   siv - web servicesMazda   siv - web services
Mazda siv - web services
 
web programming
web programmingweb programming
web programming
 
Simple Object Access Protocol (SOAP)
Simple Object Access Protocol (SOAP)Simple Object Access Protocol (SOAP)
Simple Object Access Protocol (SOAP)
 
Soap vs rest
Soap vs restSoap vs rest
Soap vs rest
 
Web services Concepts
Web services ConceptsWeb services Concepts
Web services Concepts
 
what is soap
what is soapwhat is soap
what is soap
 
Soap.doc
Soap.docSoap.doc
Soap.doc
 
Web Programming
Web ProgrammingWeb Programming
Web Programming
 
Why do you need REST
Why do you need RESTWhy do you need REST
Why do you need REST
 

More from IMC Institute

นิตยสาร Digital Trends ฉบับที่ 14
นิตยสาร Digital Trends ฉบับที่ 14นิตยสาร Digital Trends ฉบับที่ 14
นิตยสาร Digital Trends ฉบับที่ 14IMC Institute
 
Digital trends Vol 4 No. 13 Sep-Dec 2019
Digital trends Vol 4 No. 13  Sep-Dec 2019Digital trends Vol 4 No. 13  Sep-Dec 2019
Digital trends Vol 4 No. 13 Sep-Dec 2019IMC Institute
 
บทความ The evolution of AI
บทความ The evolution of AIบทความ The evolution of AI
บทความ The evolution of AIIMC Institute
 
IT Trends eMagazine Vol 4. No.12
IT Trends eMagazine  Vol 4. No.12IT Trends eMagazine  Vol 4. No.12
IT Trends eMagazine Vol 4. No.12IMC Institute
 
เพราะเหตุใด Digitization ไม่ตอบโจทย์ Digital Transformation
เพราะเหตุใด Digitization ไม่ตอบโจทย์ Digital Transformationเพราะเหตุใด Digitization ไม่ตอบโจทย์ Digital Transformation
เพราะเหตุใด Digitization ไม่ตอบโจทย์ Digital TransformationIMC Institute
 
IT Trends 2019: Putting Digital Transformation to Work
IT Trends 2019: Putting Digital Transformation to WorkIT Trends 2019: Putting Digital Transformation to Work
IT Trends 2019: Putting Digital Transformation to WorkIMC Institute
 
มูลค่าตลาดดิจิทัลไทย 3 อุตสาหกรรม
มูลค่าตลาดดิจิทัลไทย 3 อุตสาหกรรมมูลค่าตลาดดิจิทัลไทย 3 อุตสาหกรรม
มูลค่าตลาดดิจิทัลไทย 3 อุตสาหกรรมIMC Institute
 
IT Trends eMagazine Vol 4. No.11
IT Trends eMagazine  Vol 4. No.11IT Trends eMagazine  Vol 4. No.11
IT Trends eMagazine Vol 4. No.11IMC Institute
 
แนวทางการทำ Digital transformation
แนวทางการทำ Digital transformationแนวทางการทำ Digital transformation
แนวทางการทำ Digital transformationIMC Institute
 
บทความ The New Silicon Valley
บทความ The New Silicon Valleyบทความ The New Silicon Valley
บทความ The New Silicon ValleyIMC Institute
 
นิตยสาร IT Trends ของ IMC Institute ฉบับที่ 10
นิตยสาร IT Trends ของ  IMC Institute  ฉบับที่ 10นิตยสาร IT Trends ของ  IMC Institute  ฉบับที่ 10
นิตยสาร IT Trends ของ IMC Institute ฉบับที่ 10IMC Institute
 
แนวทางการทำ Digital transformation
แนวทางการทำ Digital transformationแนวทางการทำ Digital transformation
แนวทางการทำ Digital transformationIMC Institute
 
The Power of Big Data for a new economy (Sample)
The Power of Big Data for a new economy (Sample)The Power of Big Data for a new economy (Sample)
The Power of Big Data for a new economy (Sample)IMC Institute
 
บทความ Robotics แนวโน้มใหม่สู่บริการเฉพาะทาง
บทความ Robotics แนวโน้มใหม่สู่บริการเฉพาะทาง บทความ Robotics แนวโน้มใหม่สู่บริการเฉพาะทาง
บทความ Robotics แนวโน้มใหม่สู่บริการเฉพาะทาง IMC Institute
 
IT Trends eMagazine Vol 3. No.9
IT Trends eMagazine  Vol 3. No.9 IT Trends eMagazine  Vol 3. No.9
IT Trends eMagazine Vol 3. No.9 IMC Institute
 
Thailand software & software market survey 2016
Thailand software & software market survey 2016Thailand software & software market survey 2016
Thailand software & software market survey 2016IMC Institute
 
Developing Business Blockchain Applications on Hyperledger
Developing Business  Blockchain Applications on Hyperledger Developing Business  Blockchain Applications on Hyperledger
Developing Business Blockchain Applications on Hyperledger IMC Institute
 
Digital transformation @thanachart.org
Digital transformation @thanachart.orgDigital transformation @thanachart.org
Digital transformation @thanachart.orgIMC Institute
 
บทความ Big Data จากบล็อก thanachart.org
บทความ Big Data จากบล็อก thanachart.orgบทความ Big Data จากบล็อก thanachart.org
บทความ Big Data จากบล็อก thanachart.orgIMC Institute
 
กลยุทธ์ 5 ด้านกับการทำ Digital Transformation
กลยุทธ์ 5 ด้านกับการทำ Digital Transformationกลยุทธ์ 5 ด้านกับการทำ Digital Transformation
กลยุทธ์ 5 ด้านกับการทำ Digital TransformationIMC Institute
 

More from IMC Institute (20)

นิตยสาร Digital Trends ฉบับที่ 14
นิตยสาร Digital Trends ฉบับที่ 14นิตยสาร Digital Trends ฉบับที่ 14
นิตยสาร Digital Trends ฉบับที่ 14
 
Digital trends Vol 4 No. 13 Sep-Dec 2019
Digital trends Vol 4 No. 13  Sep-Dec 2019Digital trends Vol 4 No. 13  Sep-Dec 2019
Digital trends Vol 4 No. 13 Sep-Dec 2019
 
บทความ The evolution of AI
บทความ The evolution of AIบทความ The evolution of AI
บทความ The evolution of AI
 
IT Trends eMagazine Vol 4. No.12
IT Trends eMagazine  Vol 4. No.12IT Trends eMagazine  Vol 4. No.12
IT Trends eMagazine Vol 4. No.12
 
เพราะเหตุใด Digitization ไม่ตอบโจทย์ Digital Transformation
เพราะเหตุใด Digitization ไม่ตอบโจทย์ Digital Transformationเพราะเหตุใด Digitization ไม่ตอบโจทย์ Digital Transformation
เพราะเหตุใด Digitization ไม่ตอบโจทย์ Digital Transformation
 
IT Trends 2019: Putting Digital Transformation to Work
IT Trends 2019: Putting Digital Transformation to WorkIT Trends 2019: Putting Digital Transformation to Work
IT Trends 2019: Putting Digital Transformation to Work
 
มูลค่าตลาดดิจิทัลไทย 3 อุตสาหกรรม
มูลค่าตลาดดิจิทัลไทย 3 อุตสาหกรรมมูลค่าตลาดดิจิทัลไทย 3 อุตสาหกรรม
มูลค่าตลาดดิจิทัลไทย 3 อุตสาหกรรม
 
IT Trends eMagazine Vol 4. No.11
IT Trends eMagazine  Vol 4. No.11IT Trends eMagazine  Vol 4. No.11
IT Trends eMagazine Vol 4. No.11
 
แนวทางการทำ Digital transformation
แนวทางการทำ Digital transformationแนวทางการทำ Digital transformation
แนวทางการทำ Digital transformation
 
บทความ The New Silicon Valley
บทความ The New Silicon Valleyบทความ The New Silicon Valley
บทความ The New Silicon Valley
 
นิตยสาร IT Trends ของ IMC Institute ฉบับที่ 10
นิตยสาร IT Trends ของ  IMC Institute  ฉบับที่ 10นิตยสาร IT Trends ของ  IMC Institute  ฉบับที่ 10
นิตยสาร IT Trends ของ IMC Institute ฉบับที่ 10
 
แนวทางการทำ Digital transformation
แนวทางการทำ Digital transformationแนวทางการทำ Digital transformation
แนวทางการทำ Digital transformation
 
The Power of Big Data for a new economy (Sample)
The Power of Big Data for a new economy (Sample)The Power of Big Data for a new economy (Sample)
The Power of Big Data for a new economy (Sample)
 
บทความ Robotics แนวโน้มใหม่สู่บริการเฉพาะทาง
บทความ Robotics แนวโน้มใหม่สู่บริการเฉพาะทาง บทความ Robotics แนวโน้มใหม่สู่บริการเฉพาะทาง
บทความ Robotics แนวโน้มใหม่สู่บริการเฉพาะทาง
 
IT Trends eMagazine Vol 3. No.9
IT Trends eMagazine  Vol 3. No.9 IT Trends eMagazine  Vol 3. No.9
IT Trends eMagazine Vol 3. No.9
 
Thailand software & software market survey 2016
Thailand software & software market survey 2016Thailand software & software market survey 2016
Thailand software & software market survey 2016
 
Developing Business Blockchain Applications on Hyperledger
Developing Business  Blockchain Applications on Hyperledger Developing Business  Blockchain Applications on Hyperledger
Developing Business Blockchain Applications on Hyperledger
 
Digital transformation @thanachart.org
Digital transformation @thanachart.orgDigital transformation @thanachart.org
Digital transformation @thanachart.org
 
บทความ Big Data จากบล็อก thanachart.org
บทความ Big Data จากบล็อก thanachart.orgบทความ Big Data จากบล็อก thanachart.org
บทความ Big Data จากบล็อก thanachart.org
 
กลยุทธ์ 5 ด้านกับการทำ Digital Transformation
กลยุทธ์ 5 ด้านกับการทำ Digital Transformationกลยุทธ์ 5 ด้านกับการทำ Digital Transformation
กลยุทธ์ 5 ด้านกับการทำ Digital Transformation
 

Recently uploaded

VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXTarek Kalaji
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6DianaGray10
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxMatsuo Lab
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesMd Hossain Ali
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxUdaiappa Ramachandran
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URLRuncy Oommen
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Will Schroeder
 
20230202 - Introduction to tis-py
20230202 - Introduction to tis-py20230202 - Introduction to tis-py
20230202 - Introduction to tis-pyJamie (Taka) Wang
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1DianaGray10
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8DianaGray10
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsSafe Software
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureEric D. Schabell
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDELiveplex
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding TeamAdam Moalla
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Adtran
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024SkyPlanner
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IES VE
 
How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?IES VE
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfJamie (Taka) Wang
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesDavid Newbury
 

Recently uploaded (20)

VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBX
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptx
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptx
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URL
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
 
20230202 - Introduction to tis-py
20230202 - Introduction to tis-py20230202 - Introduction to tis-py
20230202 - Introduction to tis-py
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability Adventure
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
 
How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond Ontologies
 

Java Web Services [2/5]: Introduction to SOAP

  • 1. Topic 2 Introduction to SOAP Assoc.Prof. Dr. Thanachart Numnonda www.imcinstitute.com August 2010
  • 2. Agenda  What is SOAP?  SOAP Structure  SOAP Communication / Encode 2
  • 4. SOAP Definition [W3C]  SOAP is a lightweight protocol intended for exchanging structured information in a decentralized, distributed environment  SOAP uses XML technologies to define an extensible messaging framework providing a message construct that can be exchanged over a variety of underlying protocols  The framework has been designed to be independent of any particular programming model and other implementation specific semantics 4
  • 5. What is SOAP?  Simple Object Access Protocol  Wire protocol similar to – IIOP for CORBA – JRMP for RMI  XML is used for data encoding – “text” based protocol vs. “binary” protocol  Supports XML-based RPC (Remote Procedure Call) 5
  • 6. Do I Need to know how SOAP works in detail as a Java Developer?  Yes – Understanding it will help you to build better application – Example) Understanding how TCP/IP will help you build better TCP/IP application  No – You will mostly likely use high-level API (JAX- WS, JAX-RPC) to build Web applications – How SOAP works is hidden from developers 6
  • 7. Where is SOAP?  SOAP 1.2 is W3C recommendation  SOAP 1.2 Part 1 defines – SOAP envelope – Protocol binding framework  SOAP 1.2 Part 2 defines  SOAP 1.2 becomes a W3C recommendation in 2003. 7
  • 8. SOAP Features  Extensible  Usable over a variety of underlying networking protocols  Independent of programming models 8
  • 9. SOAP Features : Extensible  SOAP is simple by design  SOAP lacks various distributed system features: – security – Routing – Transactions – etc.  SOAP defines a communication framework that allows additional features to be added as layered extensions. 9
  • 10. SOAP Features : Protocol Independent  SOAP can be used over any protocol: – TCP – HTTP – SMTP – etc.  SOAP provides a flexible framework for defining bindings to arbitrary protocols to maintain interoperability.  SOAP provides an explicit binding for HTTP. 10
  • 11. SOAP Features : Model-Independent  Allows for any programming model not tied to RPC.  Defines a model for processing individual, one-way messages, or combine multiple messages into an overall message exchange  Allows for any number of message exchange patterns: request/response, solicit/response, notifications, peer-to-peer 11
  • 14. SOAP Messaging  The SOAP messaging framework defines a suite of XML elements for packaging arbitrary XML messages for transport between systems: – envelope – header – body – fault – etc. 14
  • 15. SOAP Messaging : Example <soapenv:Envelope <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://www.webserviceX.NET/"> xmlns:web="http://www.webserviceX.NET/"> <soapenv:Header/> <soapenv:Header/> <soapenv:Body> <soapenv:Body> <web:GetQuote> <web:GetQuote> <!--Optional:--> <!--Optional:--> <web:symbol>goog</web:symbol> <web:symbol>goog</web:symbol> </web:GetQuote> </web:GetQuote> </soapenv:Body> </soapenv:Body> </soapenv:Envelope>;; </soapenv:Envelope> 15
  • 16. SOAP Namespaces  All XML elements belong to the following namespaces:  SOAP 1.1 - http://schemas.xmlsoap.org/soap/envelope  SOAP 1.2 - http://www.w3.org/2003/05/soap-envelope 16
  • 17. SOAP Message Envelope  Embedded Information – Namespaces – Encoding information  Header – Optional – Can be handled by intermediaries  Body – Mandatory – Handled only by ultimate receiver 17
  • 18. SOAP Envelope : Embedded Information  Envelop is always the root element of a SOAP message:  The namespace is specified in the envelope for: – defining the envelope elements – controlling the SOAP version <soap:Envelope <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope /"> xmlns:soap="http://www.w3.org/2003/05/soap-envelope /"> <soap:Header>...</soap:Header> <soap:Header>...</soap:Header> <soap:Body>...</soap:Body> <soap:Body>...</soap:Body> </soap:Envelope> </soap:Envelope> 18
  • 19. SOAP Header  Provides a mechanism for extending SOAP messages in a decentralized and modular way  Allows to pass control information to the receiving SOAP server.  Used for extension – Context – Authentication – Transaction – Management – Many other higher level semantics 19
  • 20. SOAP Header : Example <soap:Envelope xmlns:soap=“http://www.w3.org/2003/05/soap-envelope”> <soap:Envelope xmlns:soap=“http://www.w3.org/2003/05/soap-envelope”> <soap:Header> <soap:Header> <t:transaction xmlns:t=“http://example.org/transac”> <t:transaction xmlns:t=“http://example.org/transac”> <t:loginTime>10:20:00</t:loginTime> <t:loginTime>10:20:00</t:loginTime> <t:logoutTime>10:21:00</t:logoutTime> <t:logoutTime>10:21:00</t:logoutTime> </t:transaction> </t:transaction> </soap:Header> </soap:Header> ... ... </soap:Envelope> </soap:Envelope> 20
  • 21. SOAP Header : Attributes  SOAP 1.2 provides mechanisms to specify who should deal with headers and what to do with them.  For this purpose it includes attributes: – role – MustUnderstand – relay  Also it is possible to define: – encodingStyle  SOAP 1.1 has actor attribute instead of role, with the same semantic. 21
  • 22. Mandatory/Optional Headers  Headers may be mandatory or optional.  If a header is mandatory: – the receiver must process the header – if the receiver is unable to process the header, it must fail  mustUnderstand attribute indicates if a header is mandatory or optional. 22
  • 23. SOAP Body  The SOAP Body element represents a mechanism for exchanging information intended for the ultimate recipient of the message.  Body represents the message payload – a generic container that includes any number of elements from any namespace.  In the simplest case the body of a SOAP message includes: – message name – reference to a service instance – parameters with values and optional type references 23
  • 24. SOAP Body (cont)  Made of Body blocks (Body entries)  Consumed by Ultimate SOAP receiver  Carry end-to-end information  Applicationdata (XML document) (document style)  RPC method and parameters (rpc style)  SOAP fault 24
  • 25. SOAP Body: Request Example  Request message to transfer funds between bank accounts: soap:Envelope xmlns:soap=“http://www.w3.org/2003/05/soap-envelope” soap:Envelope xmlns:soap=“http://www.w3.org/2003/05/soap-envelope” soap:Body soap:Body x:TransferFunds xmlns:x=“urn:examples-org:banking” x:TransferFunds xmlns:x=“urn:examples-org:banking” x:from983-23456/x:from x:from983-23456/x:from x:to672-24806/x:to x:to672-24806/x:to x:amount1000.00/x:amount x:amount1000.00/x:amount /x:TransferFunds /x:TransferFunds /soap:Body /soap:Body /soap:Envelope /soap:Envelope 25
  • 26. SOAP Body: Response Example soap:Envelope xmlns:soap=“http://www.w3.org/2003/05/soap-envelope” soap:Envelope xmlns:soap=“http://www.w3.org/2003/05/soap-envelope” soap:Body soap:Body x:TransferFundsResponse xmlns:x=“urn:examples-org:banking” x:TransferFundsResponse xmlns:x=“urn:examples-org:banking” x:balances x:balances x:account x:account x:id983-23456/x:id x:id983-23456/x:id x:balance34.98/x:balance x:balance34.98/x:balance /x:account /x:account x:account x:account x:id672-24806/x:id x:id672-24806/x:id x:balance1267.14/x:balance x:balance1267.14/x:balance /x:account /x:account /x:balances /x:balances /x:TransferFundsResponse /x:TransferFundsResponse /soap:Body /soap:Body /soap:Envelope /soap:Envelope 26
  • 27. SOAP Fault  The Fault element is used to represent errors:  processing errors  errors understanding a mandatory header  all abnormal situations  Faults are specified within the body of a SOAP message. 27
  • 28. SOAP Fault: Example soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/ soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/ soap:Body soap:Body soap:Fault soap:Fault soap:Code soap:Code soap:Valuesoap:Sender/soap:Value soap:Valuesoap:Sender/soap:Value /soap:Code /soap:Code soap:ReasonInsufficient funds/soap:Reason soap:ReasonInsufficient funds/soap:Reason soap:Detail soap:Detail x:TransferError xmlns:x=urn:examplesorg:banking x:TransferError xmlns:x=urn:examplesorg:banking x:sourceAccount22-342439/x:sourceAccount x:sourceAccount22-342439/x:sourceAccount x:transferAmount100.00/x:transferAmount x:transferAmount100.00/x:transferAmount x:currentBalance89.23/x:currentBalance x:currentBalance89.23/x:currentBalance /x:TransferError /x:TransferError /soap:Detail /soap:Detail /soap:Fault /soap:Fault /soap:Body /soap:Body /soap:Envelope /soap:Envelope 28
  • 29. SOAP Communication / Encode 29
  • 30. SOAP Communication Styles  SOAP enables two communication styles:  Document-style – The message has no fixed structure, so the interacting applications must agree beforehand on this structure.  RPC-style – Synchronous method invocation - pre-defined message structure. 30
  • 31. RPC Style  RPC-style is a synchronous invocation of an operation returning a result:  One SOAP message encapsulates the request. – The body of the request message contains the actual call including the name of the procedure being invoked and the input parameters.  Another SOAP message encapsulates the response. – The body of the response contains the result and output parameters.  The two interacting applications agree upon the RPC method signature. 31
  • 32. Document Style  Also known as a message-oriented style: – a request is an XML document – an optional response is also an XML document  Two interacting applications agree beforehands upon the structure of the documents exchanged, then use SOAP messages to transport them.  Very flexible communication style that provides the best interoperability, using synchronous or asynchronous communication. 32
  • 33. SOAP Document Style: Example soap:Envelope soap:Envelope xmlns:soap=“http://www.w3.org/2003/05/soap-envelope” xmlns:soap=“http://www.w3.org/2003/05/soap-envelope” xmlns:xsd=“http://www.w3.org/2001/XMLSchema” xmlns:xsd=“http://www.w3.org/2001/XMLSchema” soap:Body soap:Body orgNS:returnBalance orgNS:returnBalance xmlns:orgNS=“http://myOrganization.com/” xmlns:orgNS=“http://myOrganization.com/” soap:encodingStyle=“http://www/w3.org/2003/05/soap-encoding” soap:encodingStyle=“http://www/w3.org/2003/05/soap-encoding” orgNS:balance orgNS:type=“xsd:float”1235.95 orgNS:balance orgNS:type=“xsd:float”1235.95 /orgNS:balance /orgNS:balance /orgNS:returnBalance /orgNS:returnBalance /soap:Body /soap:Body /soap:Envelope /soap:Envelope 33
  • 34. Data Model and Encoding  In order to be able to send Java and others programming language objects inside SOAP envelopes, SOAP defines:  SOAP Data Model - an abstract representation of the data structures such as the ones handled by Java or C#  SOAP Encoding - a set or rules to map the data model into XML for sending the data inside SOAP envelopes 34
  • 35. Data Model  The SOAP data model represents data structures as connected graphs, where nodes represent values and edges represent labels. 35
  • 36. Encoding  SOAP encoding describes how the SOAP data model is written with XML.  SOAP encoding is identified by the URI http://www.w3.org/2003/05/soap-encoding.  When serializing XML using encoding rules, processors should use the encodingStyle attribute to indicate the SOAP encoding in use.  The encodingStyle attribute can appear in: – message headers – message bodies – Detail sub-element of Fault 36
  • 37. Encoding Example soapenv:Envelope soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/ xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/ xmlns:xsd=http://www.w3.org/2001/XMLSchema xmlns:xsd=http://www.w3.org/2001/XMLSchema xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance soapenv:Body soapenv:Body ns1:downloadFileResponse ns1:downloadFileResponse soapenv:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/ soapenv:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/ xmlns:ns1=http://soapinterop.org/ xmlns:ns1=http://soapinterop.org/ downloadFileReturn downloadFileReturn xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/ xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/ xsi:type=soapenc:base64“ xsi:type=soapenc:base64“ TW9..QogDQo= TW9..QogDQo= /downloadFileReturn /downloadFileReturn /ns1:downloadFileResponse /ns1:downloadFileResponse /soapenv:Body /soapenv:Body /soapenv:Envelope /soapenv:Envelope 37
  • 38. SOAP Processing Model  SOAP defines a processing model that outlines rules for processing a SOAP message as it travels from a SOAP sender to a SOAP receiver.  The model allows for architectures with multiple intermediary nodes: 38
  • 39. Resources  Some contents are borrowed from the presentation slides of Sang Shin, Java™ Technology Evangelist, Sun Microsystems, Inc.  Web Services and Java, Elsa Estevez, Tomasz Janowski and Gabriel Oteniya, UNU-IIST, Macau 39
  • 40. Thank you thananum@gmail.com www.facebook.com/imcinstitute www.imcinstitute.com 40