Presentation is loading. Please wait.

Presentation is loading. Please wait.

SOAP. Service Broker Basic SOAP Message Exchange Service Consumer Service Provider http transport SOAP message WSDL describing service SOAP message http.

Similar presentations


Presentation on theme: "SOAP. Service Broker Basic SOAP Message Exchange Service Consumer Service Provider http transport SOAP message WSDL describing service SOAP message http."— Presentation transcript:

1 SOAP

2 Service Broker Basic SOAP Message Exchange Service Consumer Service Provider http transport SOAP message WSDL describing service SOAP message http transport client service registry find publish DESCRIBE INVOKE SOAP SenderSOAP Receiver SOAP Sender SOAP Receiver

3 SOAP Body SOAP Message SOAP header SOAP envelope Header block Header data Header data Header data Body child element

4 SOAP Building Blocks A SOAP message is an XML document with the following elements –A required envelope Identifies XML document as a SOAP message –An optional header Contains header information –A required body element with call and response information –An optional fault element Information about errors that could occur

5 Sample SOAP Message 1 2001-06-22T14:00:00-05:00 Pick up Mary at school at 2pm

6 SOAP Envelope Element Required field – tells that this XML document is a SOAP message Encoding style attribute – used to define data types used in the document ... Message information goes here...

7 SOAP Header Contains application specific information (e.g. authentication, payment, etc.) Optional field, but if present, must be the first child of the envelope element 234......

8 SOAP Header – Contd. The previous example contains –A Trans element, which is an actor –mustUnderstand attribute of 1 –A value of 234, which denotes an encoding style Actor attribute –Message may pass multiple nodes – we need to denote who needs to act on it mustUnderstand – whether a header entry is madatory or optional for the recipient to process

9 SOAP Body Actual message Apples

10 Response 1.90

11 SOAP Fault Element Error message from a SOAP message is carried inside a fault element Must appear as a child element of the body element Has the following subelements: –Faultcode - identifies the fault –Faultstring – human readable explanation of the fault –Fault-factor – what caused the fault –Details -- application specific information

12 A More Involved Example buyer seller message broker RFQ QuoteResponse Award

13 Conversational SOAP Message Exchange: A Request – 101 http://bigco.example.org/RFQ 17 – http://bigco.example.org/RFQ – SanDisk – SecureDigital memory – 1GB – – 100 –

14 Conversational Exchange: A Response – http://bigco.example.org/RFQ env:mustUnderstand=“true”>101 2470 1 17 – http://bigco.example.org/RFQ – KingMax – SecureDigital memory – 1GB – 9000KB/s – Memories Unlimited – KM-SD1000 – 100 –

15 Conversational Exchange: Completion 2470 1 17 http://bigco.example.org/RFQ KM-SD1000 50

16 Remote Procedure Calls To invoke RPC –Address of target SOAP node –Method name –Identities and values of arguments –Separation of arguments identifying target of RPC versus data Plus values of properties for binding (e.g. GET, POST) –Optional header data

17 RPC Invocation 5 http://shippingservice.org/transactionhttp://shippingservice.org/encoding http://shippingservice.org http://bigco.example.org/RFQ 2470 17 500g

18 RPC Result 5 http://shippingservice.org/transactionhttp://paymentservice.org/encoding http://shippingservice.org s:status confirmed $20.00

19 SOAP Faults Place faults inside env:Body elements In single env:Fault env:Node identifies node which generated fault Absence indicates “ultimate recipient” env:Code env:Value env:Subcode env:Reason env:Text env:Detail Application specific

20 SOAP Fault Example env:Sender rpc:BadArguments Processing error Chyba zpracování Unknown destination 999

21 SOAP Processing Model SOAP messages are sent from one sender node passing through zero or more intermediaries Three roles –next: each SOAP intermediary or end destination must act in this role –none: SOAP nodes must not act in this role –ultimateReceiver: destination acts in this role Header blocks targeted to specific roles using Role attribute If mustUnderstand=“true” SOAP receiver must understand or generate SOAP fault Header blocks processed by intermediaries are generally removed before forwarding –Override with relay attribute –Allows targeting of headers to specific intermediaries (but mustUnderstand would then generally be turned off)

22 SOAP Processing: Header Blocks, MustUnderstand and Relay...............

23 SOAP Remoting Architecture Server object implementation application level Client application code Server skeleton XML unmarshaller Client stub XML marshaller TCP/IP socket remoting architecture level wire protocol level http protocol http server http server body envelope header


Download ppt "SOAP. Service Broker Basic SOAP Message Exchange Service Consumer Service Provider http transport SOAP message WSDL describing service SOAP message http."

Similar presentations


Ads by Google