1 / 48

CSCI 599: Beyond Web Browsers

CSCI 599: Beyond Web Browsers. Professor Shahram Ghandeharizadeh Computer Science Department Los Angeles, CA 90089. eXtensible Markup Language (XML). XML: A World-Wide-Web Consortium (W3C) standard. Enables you to create your own tags.

jemima
Download Presentation

CSCI 599: Beyond Web Browsers

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. CSCI 599: Beyond Web Browsers Professor Shahram Ghandeharizadeh Computer Science Department Los Angeles, CA 90089

  2. eXtensible Markup Language (XML) • XML: • A World-Wide-Web Consortium (W3C) standard. • Enables you to create your own tags. • Emerging as a standard for interoperability among applications that wish to exchange data. • Separates content (document) from presentation (style sheet).

  3. XML Terminology • An XML element is made up of a start tag, an end tag, and data in between: • <class>csci599</class> • Tags without text can contain the end marker at the end of the start tag, I.e., <class></class> is equivalent to: <class /> • An element may contain one or more attributes: • <class type=“Seminar”>csci599</class> • An attribute is a name-value pair separated by ‘=‘ • Attribute values must be enclosed in quotation marks. • Document Type Definition (DTD): defines the tags contained in your document, what tags contain other tags, number and sequence of tags, the attributes your tags may have, and optionally, the values those attributes may have. Describes data within the tags! “class” is a tag!

  4. XML Name Space (xmlns) • Collection of names used as element or attribute names in an XML document. • Qualifies element names on the Web to avoid conflicts between elements with the same name. • A name space is identified by a globally unique URI (across the Internet). • Name spaces are declared in 2 ways: • Explicit • Implicit

  5. Explicit xmlns <BOOKS> <bk:BOOK xmlns:bk=“urn:BookLovers.org:BookInfo” xmlns:money=“urn:Finance.Money”> <bk:TITLE>Web Services</bk:TITLE> <bk:PRICE money:currency=“US DOLLAR”>22.95</bk:PRICE> </bk:BOOK> </BOOKS>

  6. Explicit xmlns <BOOKS> <bk:BOOK xmlns:bk=“urn:BookLovers.org:BookInfo” xmlns:money=“urn:Finance.Money”> <bk:TITLE>Web Services</bk:TITLE> <bk:PRICE money:currency=“US DOLLAR”>22.95</bk:PRICE> </bk:BOOK> </BOOKS> Declares “bk” and “money” to be shorthand for the full names of their respective namespaces. Bk and money are name spaces.

  7. Explicit xmlns <BOOKS> <bk:BOOK xmlns:bk=“urn:BookLovers.org:BookInfo” xmlns:money=“urn:Finance.Money”> <bk:TITLE>Web Services</bk:TITLE> <bk:PRICE money:currency=“US DOLLAR”>22.95</bk:PRICE> </bk:BOOK> </BOOKS> This is the namespace value for “bk” variable!

  8. Explicit xmlns <BOOKS> <bk:BOOK xmlns:bk=“urn:BookLovers.org:BookInfo” xmlns:money=“urn:Finance:Money”> <bk:TITLE>Web Services</bk:TITLE> <bk:PRICE money:currency=“US DOLLAR”>22.95</bk:PRICE> </bk:BOOK> </BOOKS> All elements/attributes beginning with “bk:” or “money:” are considered to be from the namespace “urn:BookLovers.org:BookInfo” or “urn:Finance:Money”

  9. Explicit xmlns <BOOKS> <bk:BOOK xmlns:bk=“urn:BookLovers.org:BookInfo” xmlns:money=“urn:Finance:Money”> <bk:TITLE>Web Services</bk:TITLE> <bk:PRICE money:currency=“US DOLLAR”>22.95</bk:PRICE> </bk:BOOK> </BOOKS> This is the bk namespace prefix qualifying the TITLE tag!

  10. Explicit xmlns <BOOKS> <bk:BOOK xmlns:bk=“urn:BookLovers.org:BookInfo” xmlns:money=“urn:Finance:Money”> <bk:TITLE>Web Services</bk:TITLE> <bk:PRICE money:currency=“US DOLLAR”>22.95</bk:PRICE> </bk:BOOK> </BOOKS> What is this?

  11. Explicit xmlns <BOOKS> <bk:BOOK xmlns:bk=“urn:BookLovers.org:BookInfo” xmlns:money=“urn:Finance:Money”> <bk:TITLE>Web Services</bk:TITLE> <bk:PRICE money:currency=“US DOLLAR”>22.95</bk:PRICE> </bk:BOOK> </BOOKS> Price element value!

  12. Explicit xmlns <BOOKS> <bk:BOOK xmlns:bk=“urn:BookLovers.org:BookInfo” xmlns:money=“urn:Finance:Money”> <bk:TITLE>Web Services</bk:TITLE> <bk:PRICE money:currency=“US DOLLAR”>22.95</bk:PRICE> </bk:BOOK> </BOOKS> What is this?

  13. Explicit xmlns <BOOKS> <bk:BOOK xmlns:bk=“urn:BookLovers.org:BookInfo” xmlns:money=“urn:Finance:Money”> <bk:TITLE>Web Services</bk:TITLE> <bk:PRICE money:currency=“US DOLLAR”>22.95</bk:PRICE> </bk:BOOK> </BOOKS> Attribute value!

  14. Implicit xmlns • A namespace without a prefix becomes the default namespace <BOOKS> <BOOK xmlns=“urn:BookLovers.org:BookInfo”> <TITLE>Web Services</TITLE> <PRICE currency=“US DOLLAR”>22.95</PRICE> </BOOK> </BOOKS>

  15. GXA • GXA, Global XML Web Services Architecture • GXA consists of several specifications: • DIME Specification Index Page • WS-Attachments • WS-Coordination • WS-Inspection • WS-Referral • WS-Routing • WS-Security • WS-Transaction

  16. WS-Routing • Stateless, SOAP-based protocol for routing SOAP messages. • With WS-Routing, the entire message path for a SOAP message (as well as its return path) can be described directly in the SOAP envelope. • Designed for: • One-way & two-way messaging • Peer-to-peer conversations • Long running dialogs.

  17. WS-Routing • Why? • SOAP-based specifications are designed to be composed with each other to provide a rich messaging environment. • WS-Routing encpsulates a message path within a SOAP message.

  18. WS-Routing • What is missing from SOAP? • SOAP cannot indicate a message path that organizes a collection of Web Services that act as intermediaries into a sequence. • Example: • SOAP message M generated by A can indicate which part of M is intended for B, C, and D. • A’s SOAP message CANNOT indicate that the intermediaries should be organized as follows: D B C A

  19. Example D B C A <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2001/06/soap-envelope"> <SOAP-ENV:Header> <wsrp:path xmlns:wsrp="http://schemas.xmlsoap.org/rp/"> <wsrp:action>http://www.im.org/chat</wsrp:action> <wsrp:to>soap://D.com/some/endpoint</wsrp:to> <wsrp:fwd> <wsrp:via>soap://B.com</wsrp:via> <wsrp:via>soap://C.com</wsrp:via> </wsrp:fwd> <wsrp:from>soap://A.com/some/endpoint</wsrp:from> <wsrp:id>uuid:84b9f5d0-33fb-4a81-b02b5b760641c1d6</wsrp:id> </wsrp:path> </SOAP-ENV:Header> <SOAP-ENV:Body> ... </SOAP-ENV:Body> </SOAP-ENV:Envelope>

  20. Example D B C A <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2001/06/soap-envelope"> <SOAP-ENV:Header> <wsrp:path xmlns:wsrp="http://schemas.xmlsoap.org/rp/"> <wsrp:action>http://www.im.org/chat</wsrp:action> <wsrp:to>soap://D.com/some/endpoint</wsrp:to> <wsrp:fwd> <wsrp:via>soap://B.com</wsrp:via> <wsrp:via>soap://C.com</wsrp:via> </wsrp:fwd> <wsrp:from>soap://A.com/some/endpoint</wsrp:from> <wsrp:id>uuid:84b9f5d0-33fb-4a81-b02b5b760641c1d6</wsrp:id> </wsrp:path> </SOAP-ENV:Header> <SOAP-ENV:Body> ... </SOAP-ENV:Body> </SOAP-ENV:Envelope> This is the ultimate end point, node D

  21. Example D B C A <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2001/06/soap-envelope"> <SOAP-ENV:Header> <wsrp:path xmlns:wsrp="http://schemas.xmlsoap.org/rp/"> <wsrp:action>http://www.im.org/chat</wsrp:action> <wsrp:to>soap://D.com/some/endpoint</wsrp:to> <wsrp:fwd> <wsrp:via>soap://B.com</wsrp:via> <wsrp:via>soap://C.com</wsrp:via> </wsrp:fwd> <wsrp:from>soap://A.com/some/endpoint</wsrp:from> <wsrp:id>uuid:84b9f5d0-33fb-4a81-b02b5b760641c1d6</wsrp:id> </wsrp:path> </SOAP-ENV:Header> <SOAP-ENV:Body> ... </SOAP-ENV:Body> </SOAP-ENV:Envelope> Forward message path as an ordered list of via elements

  22. Example D B C A <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2001/06/soap-envelope"> <SOAP-ENV:Header> <wsrp:path xmlns:wsrp="http://schemas.xmlsoap.org/rp/"> <wsrp:action>http://www.im.org/chat</wsrp:action> <wsrp:to>soap://D.com/some/endpoint</wsrp:to> <wsrp:fwd> <wsrp:via>soap://B.com</wsrp:via> <wsrp:via>soap://C.com</wsrp:via> </wsrp:fwd> <wsrp:from>soap://A.com/some/endpoint</wsrp:from> <wsrp:id>uuid:84b9f5d0-33fb-4a81-b02b5b760641c1d6</wsrp:id> </wsrp:path> </SOAP-ENV:Header> <SOAP-ENV:Body> ... </SOAP-ENV:Body> </SOAP-ENV:Envelope> The node originating the message, node A

  23. Example D B C A <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2001/06/soap-envelope"> <SOAP-ENV:Header> <wsrp:path xmlns:wsrp="http://schemas.xmlsoap.org/rp/"> <wsrp:action>http://www.im.org/chat</wsrp:action> <wsrp:to>soap://D.com/some/endpoint</wsrp:to> <wsrp:fwd> <wsrp:via>soap://B.com</wsrp:via> <wsrp:via>soap://C.com</wsrp:via> </wsrp:fwd> <wsrp:from>soap://A.com/some/endpoint</wsrp:from> <wsrp:id>uuid:84b9f5d0-33fb-4a81-b02b5b760641c1d6</wsrp:id> </wsrp:path> </SOAP-ENV:Header> <SOAP-ENV:Body> ... </SOAP-ENV:Body> </SOAP-ENV:Envelope> An intermediary that the message must visit, node B

  24. Example D B C A <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2001/06/soap-envelope"> <SOAP-ENV:Header> <wsrp:path xmlns:wsrp="http://schemas.xmlsoap.org/rp/"> <wsrp:action>http://www.im.org/chat</wsrp:action> <wsrp:to>soap://D.com/some/endpoint</wsrp:to> <wsrp:fwd> <wsrp:via>soap://B.com</wsrp:via> <wsrp:via>soap://C.com</wsrp:via> </wsrp:fwd> <wsrp:from>soap://A.com/some/endpoint</wsrp:from> <wsrp:id>uuid:84b9f5d0-33fb-4a81-b02b5b760641c1d6</wsrp:id> </wsrp:path> </SOAP-ENV:Header> <SOAP-ENV:Body> ... </SOAP-ENV:Body> </SOAP-ENV:Envelope> Another intermediary after node B

  25. Processing D B C A <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2001/06/soap-envelope"> <SOAP-ENV:Header> <wsrp:path xmlns:wsrp="http://schemas.xmlsoap.org/rp/"> <wsrp:action>http://www.im.org/chat</wsrp:action> <wsrp:to>soap://D.com/some/endpoint</wsrp:to> <wsrp:fwd> <wsrp:via>soap://B.com</wsrp:via> <wsrp:via>soap://C.com</wsrp:via> </wsrp:fwd> <wsrp:from>soap://A.com/some/endpoint</wsrp:from> <wsrp:id>uuid:84b9f5d0-33fb-4a81-b02b5b760641c1d6</wsrp:id> </wsrp:path> </SOAP-ENV:Header> <SOAP-ENV:Body> ... </SOAP-ENV:Body> </SOAP-ENV:Envelope>

  26. Processing D B C A <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2001/06/soap-envelope"> <SOAP-ENV:Header> <wsrp:path xmlns:wsrp="http://schemas.xmlsoap.org/rp/"> <wsrp:action>http://www.im.org/chat</wsrp:action> <wsrp:to>soap://D.com/some/endpoint</wsrp:to> <wsrp:fwd> <wsrp:via>soap://C.com</wsrp:via> </wsrp:fwd> <wsrp:from>soap://A.com/some/endpoint</wsrp:from> <wsrp:id>uuid:84b9f5d0-33fb-4a81-b02b5b760641c1d6</wsrp:id> </wsrp:path> </SOAP-ENV:Header> <SOAP-ENV:Body> ... </SOAP-ENV:Body> </SOAP-ENV:Envelope>

  27. Processing D B C A <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2001/06/soap-envelope"> <SOAP-ENV:Header> <wsrp:path xmlns:wsrp="http://schemas.xmlsoap.org/rp/"> <wsrp:action>http://www.im.org/chat</wsrp:action> <wsrp:to>soap://D.com/some/endpoint</wsrp:to> <wsrp:fwd> </wsrp:fwd> <wsrp:from>soap://A.com/some/endpoint</wsrp:from> <wsrp:id>uuid:84b9f5d0-33fb-4a81-b02b5b760641c1d6</wsrp:id> </wsrp:path> </SOAP-ENV:Header> <SOAP-ENV:Body> ... </SOAP-ENV:Body> </SOAP-ENV:Envelope>

  28. Processing D B C A <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2001/06/soap-envelope"> <SOAP-ENV:Header> <wsrp:path xmlns:wsrp="http://schemas.xmlsoap.org/rp/"> <wsrp:action>http://www.im.org/chat</wsrp:action> <wsrp:to>soap://D.com/some/endpoint</wsrp:to> <wsrp:fwd> </wsrp:fwd> <wsrp:from>soap://A.com/some/endpoint</wsrp:from> <wsrp:id>uuid:84b9f5d0-33fb-4a81-b02b5b760641c1d6</wsrp:id> </wsrp:path> </SOAP-ENV:Header> <SOAP-ENV:Body> ... </SOAP-ENV:Body> </SOAP-ENV:Envelope>

  29. Processing D B C A • If the value of “to” element does not identify “D” then WS-Routing generates a fault <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2001/06/soap-envelope"> <SOAP-ENV:Header> <wsrp:path xmlns:wsrp="http://schemas.xmlsoap.org/rp/"> <wsrp:action>http://www.im.org/chat</wsrp:action> <wsrp:to>soap://D.com/some/endpoint</wsrp:to> <wsrp:fwd> </wsrp:fwd> <wsrp:from>soap://A.com/some/endpoint</wsrp:from> <wsrp:id>uuid:84b9f5d0-33fb-4a81-b02b5b760641c1d6</wsrp:id> </wsrp:path> </SOAP-ENV:Header> <SOAP-ENV:Body> ... </SOAP-ENV:Body> </SOAP-ENV:Envelope>

  30. Example D B C A • With rev, WS-Routing builds a reverse path <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2001/06/soap-envelope"> <SOAP-ENV:Header> <wsrp:path xmlns:wsrp="http://schemas.xmlsoap.org/rp/"> <wsrp:action>http://www.im.org/chat</wsrp:action> <wsrp:to>soap://D.com/some/endpoint</wsrp:to> <wsrp:fwd> <wsrp:via>soap://B.com</wsrp:via> <wsrp:via>soap://C.com</wsrp:via> </wsrp:fwd> <wsrp:rev> </wsrp:rev> <wsrp:from>soap://A.com/some/endpoint</wsrp:from> <wsrp:id>uuid:84b9f5d0-33fb-4a81-b02b5b760641c1d6</wsrp:id> </wsrp:path> </SOAP-ENV:Header> <SOAP-ENV:Body> ... </SOAP-ENV:Body> </SOAP-ENV:Envelope>

  31. Example D B C A <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2001/06/soap-envelope"> <SOAP-ENV:Header> <wsrp:path xmlns:wsrp="http://schemas.xmlsoap.org/rp/"> <wsrp:action>http://www.im.org/chat</wsrp:action> <wsrp:to>soap://D.com/some/endpoint</wsrp:to> <wsrp:fwd> <wsrp:via>soap://C.com</wsrp:via> </wsrp:fwd> <wsrp:rev> <wsrp:via>soap://B.com</wsrp:via> </wsrp:rev> <wsrp:from>soap://A.com/some/endpoint</wsrp:from> <wsrp:id>uuid:84b9f5d0-33fb-4a81-b02b5b760641c1d6</wsrp:id> </wsrp:path> </SOAP-ENV:Header> <SOAP-ENV:Body> ... </SOAP-ENV:Body> </SOAP-ENV:Envelope>

  32. Example D B C A <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2001/06/soap-envelope"> <SOAP-ENV:Header> <wsrp:path xmlns:wsrp="http://schemas.xmlsoap.org/rp/"> <wsrp:action>http://www.im.org/chat</wsrp:action> <wsrp:to>soap://D.com/some/endpoint</wsrp:to> <wsrp:fwd> </wsrp:fwd> <wsrp:rev> <wsrp:via>soap://C.com</wsrp:via> <wsrp:via>soap://B.com</wsrp:via> </wsrp:rev> <wsrp:from>soap://A.com/some/endpoint</wsrp:from> <wsrp:id>uuid:84b9f5d0-33fb-4a81-b02b5b760641c1d6</wsrp:id> </wsrp:path> </SOAP-ENV:Header> <SOAP-ENV:Body> ... </SOAP-ENV:Body> </SOAP-ENV:Envelope>

  33. Example D B C A • Node D may contact A by: • Setting its <fwd> to the <rev> in order to contact node A • Swap the value of its <to> and <from> <wsrp:path xmlns:wsrp="http://schemas.xmlsoap.org/rp/"> <wsrp:action>http://www.im.org/chat</wsrp:action> <wsrp:to>soap://D.com/some/endpoint</wsrp:to> <wsrp:fwd> </wsrp:fwd> <wsrp:rev> <wsrp:via>soap://C.com</wsrp:via> <wsrp:via>soap://B.com</wsrp:via> </wsrp:rev> <wsrp:from>soap://A.com/some/endpoint</wsrp:from> <wsrp:id>uuid:84b9f5d0-33fb-4a81-b02b5b760641c1d6</wsrp:id> </wsrp:path>

  34. WS-Routing • WS-Routing does not define fan-in or fan-out message path models.

  35. Questions & Answers

  36. WS-Referral • Provides a way to configure how SOAP routers will build a message path • It is a protocol for inserting, deleting, and querying routing entries in a SOAP router. • SOAP router is a web service that: • implements WS-Routing, • Implements WS-Referral specification. • A SOAP router may use WS-Referral to: • Learn about firewalls and other intermediaries • Implement load balancing, etc.

  37. WS-Referral • Key specifications: for, if, go • These can loosely be described as a “for … if … then go via …”: For any SOAP actor name matching the set of SOAP actors listed in the for element If the set of conditions listed in the if element is met and hence the statement is satisfied Then go via one of the SOAP routers listed in the go element

  38. WS-Referral - Example • Example 1 from msdn.micorosoft.com <r:ref xmlns:r=“http://schemas.xmlsoap.org/ws/2001/10/referral”> <r:for> <r:exact>soap://example.org/some.doc</r:exact> <r:prefix>soap://example.org/topics/icebergs</r:prefix> </r:for> <r:if> <r:ttl>43200000</r:ttl> </r:if> <r:go> <r:via>soap://example.com/mirror</r:via> </r:go> <r:refid>uuid:09233523-345b-4351-b623-5dsf35sgs5</r:refId> <r:desc> <r:refAddr>http://example.com/references/2001/10/1234.xml</r:refAddr> </r:desc> </r:ref>

  39. WS-Referral - Example • Example 1 from msdn.micorosoft.com <r:ref xmlns:r=“http://schemas.xmlsoap.org/ws/2001/10/referral”> <r:for> <r:exact>soap://example.org/some.doc</r:exact> <r:prefix>soap://example.org/topics/icebergs</r:prefix> </r:for> <r:if> <r:ttl>43200000</r:ttl> </r:if> <r:go> <r:via>soap://example.com/mirror</r:via> </r:go> <r:refid>uuid:09233523-345b-4351-b623-5dsf35sgs5</r:refId> <r:desc> <r:refAddr>http://example.com/references/2001/10/1234.xml</r:refAddr> </r:desc> </r:ref> For any SOAP actor name matching “soap://example.org/some.doc”

  40. WS-Referral - Example • Example 1 from msdn.micorosoft.com <r:ref xmlns:r=“http://schemas.xmlsoap.org/ws/2001/10/referral”> <r:for> <r:exact>soap://example.org/some.doc</r:exact> <r:prefix>soap://example.org/topics/icebergs</r:prefix> </r:for> <r:if> <r:ttl>43200000</r:ttl> </r:if> <r:go> <r:via>soap://example.com/mirror</r:via> </r:go> <r:refid>uuid:09233523-345b-4351-b623-5dsf35sgs5</r:refId> <r:desc> <r:refAddr>http://example.com/references/2001/10/1234.xml</r:refAddr> </r:desc> </r:ref> For any SOAP actor name matching “soap://example.org/some.doc” or starting with prefix “soap…icebergs”

  41. WS-Referral - Example • Example 1 from msdn.micorosoft.com <r:ref xmlns:r=“http://schemas.xmlsoap.org/ws/2001/10/referral”> <r:for> <r:exact>soap://example.org/some.doc</r:exact> <r:prefix>soap://example.org/topics/icebergs</r:prefix> </r:for> <r:if> <r:ttl>43200000</r:ttl> </r:if> <r:go> <r:via>soap://example.com/mirror</r:via> </r:go> <r:refid>uuid:09233523-345b-4351-b623-5dsf35sgs5</r:refId> <r:desc> <r:refAddr>http://example.com/references/2001/10/1234.xml</r:refAddr> </r:desc> </r:ref> For any SOAP actor name matching “soap://example.org/some.doc” or starting with prefix “soap…icebergs”, if this referral is less than 12 hours old

  42. WS-Referral - Example • Example 1 from msdn.micorosoft.com <r:ref xmlns:r=“http://schemas.xmlsoap.org/ws/2001/10/referral”> <r:for> <r:exact>soap://example.org/some.doc</r:exact> <r:prefix>soap://example.org/topics/icebergs</r:prefix> </r:for> <r:if> <r:ttl>43200000</r:ttl> </r:if> <r:go> <r:via>soap://example.com/mirror</r:via> </r:go> <r:refid>uuid:09233523-345b-4351-b623-5dsf35sgs5</r:refId> <r:desc> <r:refAddr>http://example.com/references/2001/10/1234.xml</r:refAddr> </r:desc> </r:ref> For any SOAP actor name matching “soap://example.org/some.doc” or starting with prefix “soap…icebergs”, if this referral is less than 12 hours old then go via “soap…mirror”

  43. WS-Referral - Example • Change prefix to a node destination <r:ref xmlns:r=“http://schemas.xmlsoap.org/ws/2001/10/referral”> <r:for> <r:exact>soap://example.org/some.doc</r:exact> <r:prefix>soap://b.org</r:prefix> </r:for> <r:if> <r:ttl>43200000</r:ttl> </r:if> <r:go> <r:via>soap://example.com/mirror</r:via> </r:go> <r:refid>uuid:09233523-345b-4351-b623-5dsf35sgs5</r:refId> <r:desc> <r:refAddr>http://example.com/references/2001/10/1234.xml</r:refAddr> </r:desc> </r:ref> For any SOAP actor name matching “soap://example.org/some.doc” or starting with prefix “soap://b.org”, if this referral is less than 12 hours old then go via “soap…mirror”

  44. WS-Referral - Example • Assume node A either produces or receives the following for routing: <S:Envelope xmlns:S=“http://www.w3.org/2001/09/soap-envelope”> <S:Header> <m:path xmlns:m=“http://schemas.xmlsoap.org/rp/”> <m:action>http://www.notification.org/update<m:action> <m:to>soap://b.org</m:to> <m:from>soap://a.org</m:from> <m:id>mid:1000@a.org</m:id> </m:path> </S:Header> <S:Body> </S:Body> </S:Envelope> • With the WS-Referral statement from the previous slide

  45. WS-Referral - Example • We have a match on the prefix, changing message to: <S:Envelope xmlns:S=“http://www.w3.org/2001/09/soap-envelope”> <S:Header> <m:path xmlns:m=“http://schemas.xmlsoap.org/rp/”> <m:action>http://www.notification.org/update<m:action> <m:to>soap://b.org</m:to> <m:fwd> <m:via>soap://example.com/mirror</m:via> </m:fwd> <m:from>soap://a.org</m:from> <m:id>mid:1000@a.org</m:id> </m:path> </S:Header> <S:Body> </S:Body> </S:Envelope>

  46. WS-Referral • Each WS-Referral statement must have a unique identifier, refId: • Two logically equivalent WS-Referral statements should have the same refId. • Two logically different WS-Referral statements must have different refId. • One may: • Register a WS-Referral statement with another SOAP router • Query to request one or more WS-Referral statement from another SOAP router

  47. Questions & Answers

  48. Questions & Answers

More Related