1 / 11

SOAP

SOAP. CPSC 315 – Programming Studio Spring 2008 Project 3, Lecture 2. XML Namespaces. Different XML definitions could define the same element name. If we want to use both, could have conflict. Can distinguish using namespaces. <a:book>…</a:book> <b:book>…</b:book>.

rocio
Download Presentation

SOAP

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SOAP CPSC 315 – Programming Studio Spring 2008 Project 3, Lecture 2

  2. XML Namespaces Different XML definitions could define the same element name. If we want to use both, could have conflict. Can distinguish using namespaces. <a:book>…</a:book> <b:book>…</b:book>

  3. Defining XML Namespaces xmlns attribute in definition of element xmlns:prefixname=“URL” <a:book xmlns:a=http://this.com/adef> Can be defined in first use of element or in XML root element. Can define a “default” No prefix needed, leave off : also

  4. Middleware “Middle” layer between applications and more basic system (OS) Provides a more common interface for distributed applications Allows heterogeneous HW/OS platforms Generally refers to software allowing processes running across network to interact

  5. SOAP Simple Object Access Protocol An XML-based message passing framework. Communicates via HTTP Enables easier communication around firewalls Applications can communicate using SOAP, even if in different languages/operating systems Not the most efficient approach XML HTTP Full SOAP specifications are more generalized, not necessarily as tied to HTTP

  6. SOAP Messages XML Document Envelope element that encompasses document Optional header element Required Body element Optional Fault element Must use SOAP Envelope/Encoding namespaces Envelope: http://schemas.xmlsoap.org/soap/envelope/ http://www.w3.org/2001/12/soap-envelope Encoding: http://schemas.xmlsoap.org/soap/encoding/ http://www.w3.org/2001/12/soap-encoding No references to DTD or XML processing

  7. SOAP Envelope Root element <soap:Envelope xmlns:soap=http://www.w3.org/2001/12/soap-envelope soap:encodingStyle=http://www.w3.org/2001/12/soap-encoding > ... </soap:Envelope>

  8. SOAP Header Idea is to give processing commands SOAP messages might pass through many intermediate SOAP nodes These might process message in various ways Header gives instructions on what the receiving/relay/etc. node needs to do Header itself can change in this process.

  9. SOAP Body The “main” message Must use namespace definitions to specify elements. <soap:Body> <mq:GetTemp xlmns:mq=“http://this.com/temps”> <mq:Location>Bryan</mq:Location> <mq:Date>4/9/08</mq:date> </mq:GetTemp> <soap:Body>

  10. SOAP Faults Occurs within Body element Several subelements possible faultcode VersionMismatch MustUnderstand Client Server Can extend these (e.g. Client.Authentication) faultstring Human-readable explanation faultfactor Who caused the fault to happen detail Application-specific error information

  11. More Information • Official SOAP specifications: http://www.w3.org/TR/soap/ (Discussed version 1.1) http://www.w3.org/TR/2000/NOTE-SOAP-20000508/ • SOAP tutorial: http://www.w3schools.com/soap/default.asp

More Related