Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSCI 599: Beyond Web Browsers Professor Shahram Ghandeharizadeh Computer Science Department Los Angeles, CA 90089.

Similar presentations


Presentation on theme: "CSCI 599: Beyond Web Browsers Professor Shahram Ghandeharizadeh Computer Science Department Los Angeles, CA 90089."— Presentation transcript:

1 CSCI 599: Beyond Web Browsers Professor Shahram Ghandeharizadeh Computer Science Department Los Angeles, CA 90089

2 eXtensible Markup Language (XML) 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: An XML element is made up of a start tag, an end tag, and data in between:  csci599  csci599  Tags without text can contain the end marker at the end of the start tag, I.e., is equivalent to:  Tags without text can contain the end marker at the end of the start tag, I.e., is equivalent to: An element may contain one or more attributes: An element may contain one or more attributes:  csci599  csci599  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. 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. 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. 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). A name space is identified by a globally unique URI (across the Internet). Name spaces are declared in 2 ways: Name spaces are declared in 2 ways: 1. Explicit 2. Implicit

5 Explicit xmlns <BOOKS> Web Services Web Services 22.95 22.95 </bk:BOOK></BOOKS>

6 Explicit xmlns <BOOKS> Web Services Web Services 22.95 22.95 </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> Web Services Web Services 22.95 22.95 </bk:BOOK></BOOKS> This is the namespace value for “bk” variable!

8 Explicit xmlns <BOOKS> Web Services Web Services 22.95 22.95 </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> Web Services Web Services 22.95 22.95 </bk:BOOK></BOOKS> This is the bk namespace prefix qualifying the TITLE tag!

10 Explicit xmlns <BOOKS> Web Services Web Services 22.95 22.95 </bk:BOOK></BOOKS> What is this?

11 Explicit xmlns <BOOKS> Web Services Web Services 22.95 22.95 </bk:BOOK></BOOKS> Price element value!

12 Explicit xmlns <BOOKS> Web Services Web Services 22.95 22.95 </bk:BOOK></BOOKS> What is this?

13 Explicit xmlns <BOOKS> Web Services Web Services 22.95 22.95 </bk:BOOK></BOOKS> Attribute value!

14 Implicit xmlns A namespace without a prefix becomes the default namespace A namespace without a prefix becomes the default namespace<BOOKS> Web Services Web Services 22.95 22.95 </BOOK></BOOKS>

15 GXA GXA, Global XML Web Services Architecture GXA, Global XML Web Services Architecture GXA consists of several specifications: 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. 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. 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: Designed for:  One-way & two-way messaging  Peer-to-peer conversations  Long running dialogs.

17 WS-Routing Why? 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. WS-Routing encpsulates a message path within a SOAP message.

18 WS-Routing What is missing from SOAP? 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: 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: A BC D

19 Example <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2001/06/soap-envelope"> xmlns:SOAP-ENV="http://www.w3.org/2001/06/soap-envelope"> http://www.im.org/chat soap://D.com/some/endpoint http://www.im.org/chat soap://D.com/some/endpoint soap://B.com soap://C.com soap://B.com soap://C.com soap://A.com/some/endpoint uuid:84b9f5d0-33fb-4a81- b02b5b760641c1d6 soap://A.com/some/endpoint uuid:84b9f5d0-33fb-4a81- b02b5b760641c1d6 </wsrp:path></SOAP-ENV:Header>... </SOAP-ENV:Envelope> A BC D

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

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

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

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

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

25 Processing <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2001/06/soap-envelope"> xmlns:SOAP-ENV="http://www.w3.org/2001/06/soap-envelope"> http://www.im.org/chat soap://D.com/some/endpoint http://www.im.org/chat soap://D.com/some/endpoint soap://B.com soap://C.com soap://B.com soap://C.com soap://A.com/some/endpoint uuid:84b9f5d0-33fb-4a81- b02b5b760641c1d6 soap://A.com/some/endpoint uuid:84b9f5d0-33fb-4a81- b02b5b760641c1d6 </wsrp:path></SOAP-ENV:Header>... </SOAP-ENV:Envelope> A BC D

26 Processing <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2001/06/soap-envelope"> xmlns:SOAP-ENV="http://www.w3.org/2001/06/soap-envelope"> http://www.im.org/chat soap://D.com/some/endpoint http://www.im.org/chat soap://D.com/some/endpoint <wsrp:via>soap://C.com</wsrp:via> soap://A.com/some/endpoint uuid:84b9f5d0-33fb-4a81- b02b5b760641c1d6 soap://A.com/some/endpoint uuid:84b9f5d0-33fb-4a81- b02b5b760641c1d6 </wsrp:path></SOAP-ENV:Header>... </SOAP-ENV:Envelope> A BC D

27 Processing <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2001/06/soap-envelope"> xmlns:SOAP-ENV="http://www.w3.org/2001/06/soap-envelope"> http://www.im.org/chat soap://D.com/some/endpoint http://www.im.org/chat soap://D.com/some/endpoint soap://A.com/some/endpoint uuid:84b9f5d0-33fb-4a81- b02b5b760641c1d6 soap://A.com/some/endpoint uuid:84b9f5d0-33fb-4a81- b02b5b760641c1d6 </wsrp:path></SOAP-ENV:Header>... </SOAP-ENV:Envelope> A BC D

28 Processing <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2001/06/soap-envelope"> xmlns:SOAP-ENV="http://www.w3.org/2001/06/soap-envelope"> http://www.im.org/chat soap://D.com/some/endpoint http://www.im.org/chat soap://D.com/some/endpoint soap://A.com/some/endpoint uuid:84b9f5d0-33fb-4a81- b02b5b760641c1d6 soap://A.com/some/endpoint uuid:84b9f5d0-33fb-4a81- b02b5b760641c1d6 </wsrp:path></SOAP-ENV:Header>... </SOAP-ENV:Envelope> A BC D

29 Processing If the value of “to” element does not identify “D” then WS-Routing generates a fault 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"> xmlns:SOAP-ENV="http://www.w3.org/2001/06/soap-envelope"> http://www.im.org/chat soap://D.com/some/endpoint http://www.im.org/chat soap://D.com/some/endpoint soap://A.com/some/endpoint uuid:84b9f5d0-33fb-4a81- b02b5b760641c1d6 soap://A.com/some/endpoint uuid:84b9f5d0-33fb-4a81- b02b5b760641c1d6 </wsrp:path></SOAP-ENV:Header>... </SOAP-ENV:Envelope> A BC D

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

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

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

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

34 WS-Routing WS-Routing does not define fan-in or fan-out message path models. 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 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. It is a protocol for inserting, deleting, and querying routing entries in a SOAP router. SOAP router is a web service that: SOAP router is a web service that:  implements WS-Routing,  Implements WS-Referral specification. A SOAP router may use WS-Referral to: 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 Key specifications: for, if, go These can loosely be described as a “for … if … then go via …”: 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 Example 1 from msdn.micorosoft.com 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 Example 1 from msdn.micorosoft.com 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 Example 1 from msdn.micorosoft.com 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 Example 1 from msdn.micorosoft.com 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 Example 1 from msdn.micorosoft.com 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 Change prefix to a node destination 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: Assume node A either produces or receives the following for routing: http://www.w3.org/2001/09/soap-envelope <S:Header> <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 With the WS-Referral statement from the previous slide

45 WS-Referral - Example We have a match on the prefix, changing message to: We have a match on the prefix, changing message to: http://www.w3.org/2001/09/soap-envelope <S:Header> <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: 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: 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


Download ppt "CSCI 599: Beyond Web Browsers Professor Shahram Ghandeharizadeh Computer Science Department Los Angeles, CA 90089."

Similar presentations


Ads by Google