Presentation is loading. Please wait.

Presentation is loading. Please wait.

Apache Axis2 SOAP Primer. Agenda What is SOAP? Characteristics SOAP message structure Header blocks Fault notification Exercises.

Similar presentations


Presentation on theme: "Apache Axis2 SOAP Primer. Agenda What is SOAP? Characteristics SOAP message structure Header blocks Fault notification Exercises."— Presentation transcript:

1 Apache Axis2 SOAP Primer

2 Agenda What is SOAP? Characteristics SOAP message structure Header blocks Fault notification Exercises

3 What is SOAP? Provides the definition of the XML-based information which can be used for exchanging structured and typed information between peers in a decentralized, distributed environment Specification: http://www.w3.org/TR/soap/http://www.w3.org/TR/soap/ Initial Sender Intermediary Ultimate Receiver

4 Characteristics A SOAP message is formally specified as an XML infoset  "on-the-wire" representation can be anything SOAP describes a stateless, one-way message exchange mechanism between a SOAP sender and a SOAP receiver But applications can create more complex interaction patterns on top of this one-way exchange mechanism  request/response  request/multiple responses  back-and-forth conversations

5 SOAP Message Structure Envelope Header (Optional)‏ Header Block 1 Header Block 2 Body

6 Example SOAP Message 100.0 SOAP 1.2: http://www.w3.org/2003/05/soap-envelope

7 Example SOAP Message 2 <exh:client xmlns:exh="..." soapenv:mustUnderstand="true"> AS223@12 100.0

8 Header Blocks Each header block may contain an optional “role” attribute  Any URI can be the value Some predefined roles  Next http://www.w3.org/2003/05/soap-envelope/role/next  Ultimate Receiver http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver  None http://www.w3.org/2003/05/soap-envelope/role/none  Empty (“”)‏

9 Header Blocks (Cont.)‏ A header block may contain “mustUnderstand” attribute  true: Targeted node must process the header  false: Targeted node may process the header A header block may contain “relay” attribute  true: Header block targeted at the node must be relayed if it is not processed  false: Header block targeted at the node is not forwarded if it is not processed

10 Fault Notification SOAP fault notification mechanism is based on fault details put inside SOAP body soapenv:Receiver Undeclared namespace prefix "ns1"

11 Fault Notification (Cont.)‏ Nested fault details can be placed inside “Subcode”............

12 Fault Notification (Cont.)‏ The node that generated the fault The role played by the node that generated the fault

13 Exercises In Module 01 (“Introduction to Web Services With Apache Axis2”), we used TCPMon to intercept and inspect SOAP messages between a SOAP client and server.  Capture the communication between TemperatureConverterClient and Server.  Attempt to resend the request and make sure server responds properly.  Add an arbitrary SOAP header block and try.  Set the “role” attribute of the header so that the message is targeted at the next SOAP node. Resend the message.  Set the “mustUnderstand” attribute to “true” and try.  Carefully note if there are differences between responses and HTTP headers in each case.


Download ppt "Apache Axis2 SOAP Primer. Agenda What is SOAP? Characteristics SOAP message structure Header blocks Fault notification Exercises."

Similar presentations


Ads by Google