Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "SOAP CPSC 315 – Programming Studio Spring 2008 Project 3, Lecture 2."— 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. …

3 Defining XML Namespaces xmlns attribute in definition of element xmlns:prefixname=“URL” 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- envelopehttp://www.w3.org/2001/12/soap- envelope soap:encodingStyle=http://www.w3.org/2001/12/so ap-encodinghttp://www.w3.org/2001/12/so ap-encoding >...

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. Bryan 4/9/08

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


Download ppt "SOAP CPSC 315 – Programming Studio Spring 2008 Project 3, Lecture 2."

Similar presentations


Ads by Google