Presentation is loading. Please wait.

Presentation is loading. Please wait.

Copyright 2001, ActiveState XML Protocols. Copyright 2001, ActiveState Protocol Definition A set of formal rules describing how to transmit data, especially.

Similar presentations

Presentation on theme: "Copyright 2001, ActiveState XML Protocols. Copyright 2001, ActiveState Protocol Definition A set of formal rules describing how to transmit data, especially."— Presentation transcript:

1 Copyright 2001, ActiveState XML Protocols

2 Copyright 2001, ActiveState Protocol Definition A set of formal rules describing how to transmit data, especially across a network. High level protocols deal with –data formatting, –Including syntax of messages, –character sets, –sequencing of messages etc.

3 Copyright 2001, ActiveState Protocol Background Protocols build on each other (e.g.): –XML-RPC (remote procedures) builds on –HTTP (web) which builds on –TCP (reliability, connections) which builds on –IP (routing, packets) which builds on –Ethernet (sends bits over wires)

4 Copyright 2001, ActiveState Why XML Protocols? An XML-based protocol automatically inherits: –A large code-base of XML parsers and other tools –A mechanism for representing structured information –Unicode support

5 Copyright 2001, ActiveState Why So Many XML Protocols? Different tradeoffs. Often independently invented. Some will merge. Some will fall into disuse. Welcome to the cutting edge!

6 Copyright 2001, ActiveState Web Services Vision In the future, we want computers to talk to each other more and more… about more and more complicated stuff! Automated purchases, auctions, research etc.

7 Copyright 2001, ActiveState Web Services and Protocols We are going to have to be able to create new protocols more quickly than ever before! XML allows us to create a new data representation vocabulary quickly Protocol frameworks build on XML to do the same thing for protocols.

8 Copyright 2001, ActiveState Protocol Frameworks XML is a markup language …but a specific vocabulary like XHTML or VoxML is also called a markup language Similarly, SOAP and other protocol frameworks are generic protocols that can be used to build more specific protocols

9 Copyright 2001, ActiveState Comparison Criteria Good criteria come from this W3C web page: protocol-matrix

10 Copyright 2001, ActiveState Comparing Sync/Async Synchronous: sender and receiver are alternately in the listening or sending mode – like a traffic light. Asynchronous: information can arrive any time – like a corner with no stop sign

11 Copyright 2001, ActiveState Examples Synchronous: Web site contacted…waiting for reply. Asynchronous: telephone call. Synchronous: That will be $5.00. Heres your food. Asynchronous: Alert: Your stock just tanked!

12 Copyright 2001, ActiveState Comparing Extensibility Some protocols are problem-domain specific. Others are meant to be the generalized basis of other protocols. All of them are designed with some primary domain in mind: that often explains why they are different.

13 Copyright 2001, ActiveState Comparing Data Typing If the protocol is intended to be a basis for others: –Are data-types inline or out-of-line? –Can you directly represent arbitrary data structures? Type definitions are not strictly necessary but they ease the integration of protocols with programming languages and databases

14 Copyright 2001, ActiveState Comparing Associated Schemas Is there a schema for the protocol interactions themselves? Can you refer to a data typing schema?

15 Copyright 2001, ActiveState Comparing Packaging Explicit support for packaging non-XML information? You can always embed Base-64 information in XML but that is inefficient. Some protocols describe how to handle multiple parts and refer between parts using links.

16 Copyright 2001, ActiveState Jabber Jabber is designed for XML-Based Instant Messaging Its creators promote it as a basis for all sorts of XML-based messaging. Any XML namespaces can be used within it! e.g. BizTalk messages embedded in Jabber streams.

17 Copyright 2001, ActiveState Jabber

18 Copyright 2001, ActiveState Jabber & Instant Messaging Jabber is in-use today but is not (yet?) as popular as proprietary messaging systems. Jabbers primary distinguishing characteristic is its open architecture.

19 Copyright 2001, ActiveState Jabber Specs Namespace-based extensibility Defines long-lived XML streams Primarily Async Doesnt define any type system Can be used for Remote Procedure Calls (with a little extra code)

20 Copyright 2001, ActiveState Jabber Streams single, persistent XML stream running on a single socket (entire long-lived session is conducted)

21 Copyright 2001, ActiveState Jabber Identity Things in Jabber with identities are known as entities: –Users –Chatrooms –Proprietary message systems (ICQ) –…

22 Copyright 2001, ActiveState Jabber Messages Testing This is just a test message – subject line – text of the message (arbitrary XML) – register a Jabber extension – error message – some identifying string

23 Copyright 2001, ActiveState Jabber Info/Query Info/query is a way of doing RPC-like things in Jabber You send out an info/query request with an iq element. The iq element is sent out If there is a result, it comes back through another iq element

24 Copyright 2001, ActiveState Info/Query types Outgoing: –get – get some information –set – set a value Returning: –result – a return value –error – the query failed

25 Copyright 2001, ActiveState Jabber Extension Jabber is somewhat informally specified. If you define a protocol based on Jabber, it isnt clear how you would specify –types, –expected responses, –etc.

26 Copyright 2001, ActiveState Jabber Info

27 Copyright 2001, ActiveState XML-RPC Request/response-type (sync) protocol Deployed and in use! The original XML-based RPC protocol Still the easiest way to do cross- language, cross-platform RPC!

28 Copyright 2001, ActiveState XML-RPC Specs Based on HTTP Supports a fixed set of hard-coded types and data structures. Does not directly support more structured types.

29 Copyright 2001, ActiveState XML-RPC HTTP Header POST /RPC2 HTTP/1.0 User-Agent: Some Client Software Host: Content-Type: text/xml Content-length: 181

30 Copyright 2001, ActiveState Example Message getStateName 41

31 Copyright 2001, ActiveState methodCall There is always one methodCall element. It always contains methodName element. There is typically a params sub-element. The params element always contains one or more param elements. Each param has a value. Parameters are not named.

32 Copyright 2001, ActiveState Basic Value Types or –four-byte signed integer (e.g. –12) –0 (false) or 1 (true) –ASCII string (e.g. hello world) –double-precision signed floating point number (e.g )

33 Copyright 2001, ActiveState More Basic Types –date/time –(e.g T14:08:55) –base64-encoded binary –(e.g. eW91IGNhbid0IHJlYWQgdGhpcyE=)

34 Copyright 2001, ActiveState Structures lowerBound 18 upperBound 139

35 Copyright 2001, ActiveState Arrays 12 Egypt 0 -31

36 Copyright 2001, ActiveState Extensibility XML-RPC is extensible in that you can define different method names and they can have different parameters New data types and data structures are not supported. Namespaces are not supported.

37 Copyright 2001, ActiveState SOAP In use (e.g. at ActiveState!) Can be used synchronously or async Type names can be inline or out-of-line Namespace-based extensibility Higher level protocols definable in Web Services Description Language Types come from W3C Schemas

38 Copyright 2001, ActiveState What Does SOAP Define? Standard expression for –message envelopes –headers –bodies Standard encoding rules for structured data RPC mechanism

39 Copyright 2001, ActiveState SOAP Generality You may –use any XML content as payload. –use SOAP in a sync RPC model or any other model. –Use SOAP object encoding with or without envelopes and RPC.

40 Copyright 2001, ActiveState Scope SOAP leaves various issues to other specs: –datatypes (XML schemas) –discovery (UDDI) –service description (WSDL) –security (SSL, https, …)

41 Copyright 2001, ActiveState SOAP HTTP Header POST /StockQuote HTTP/1.1 Host: Content-Type: text/xml; charset="utf-8" Content-Length: nnnn SOAPAction: "Some-URI"

42 Copyright 2001, ActiveState SOAP XML Header MarkH DickH Beer

43 Copyright 2001, ActiveState SOAP Body The SOAP body is syntactically just like the header. Wed, 20 Sep 2000 …

44 Copyright 2001, ActiveState SOAP Information Encoding Header and body entries are arbitrary XML. XML has no data types or data structures other than string and tree. SOAP defines some conventions that allow a few more data structures.

45 Copyright 2001, ActiveState SOAP Types & Structures Simple value – a primitive type Compound value – structured type Arrays – compound values indexed by position Structs – compound values indexed by role name … a little more complicated than it seems…

46 Copyright 2001, ActiveState SOAP Types SOAP does not define primitive types. You may use XML Schema or other. Elements can be type-declared –out of line in a schema or –inline using xsi:type attributes

47 Copyright 2001, ActiveState Service Description Web Service Description Language (WSDL) describes Web Services With WSDL, web service providers can formally describe what services they provide. WSDL is a sort of schema for protocols. Somewhat similar to IDL for COM/CORBA

48 Copyright 2001, ActiveState WSDL Deployment WSDL is not widely deployed yet In particular, hampered dependence on W3C XML Schema Definition Language (XSDL or XML Schemas) WSDL may not be widely deployed until schemas are.

49 Copyright 2001, ActiveState UDDI UDDI defines –vocabulary for registering organizations according to the services they provide. –SOAP messages for publishing this information. –SOAP messages for querying repositories.

50 Copyright 2001, ActiveState XP: XML Protocol Activity The goal of XML Protocol is to develop technologies which allow two or more peers to communicate in a distributed environment, using XML as its encapsulation language Formally standardizing SOAP

51 Copyright 2001, ActiveState ebXML Message Service An extension to SOAP for electronic business –Security –reliability

52 Copyright 2001, ActiveState WebDAV Not a general-purpose generic protocol Designed specifically for web-based content management With WebDAV, it would be possible to directly edit pages on the web (with appropriate permissions)

53 Copyright 2001, ActiveState BizTalk Built on SOAP BizTalk is basically a higher-level protocol specific to business commerce BizTalk is controlled by Microsoft. Many see it as a competitor to ebXML.

54 Copyright 2001, ActiveState Summary Most new protocols will be based upon XML. Some, like WebDAV, use XML directly Others build on generic XML Protocol frameworks like SOAP and the ebXML Messaging Service Either way: XML Protocols are here to stay!

55 Copyright 2001, ActiveState Resources (thats me!) Services/index.html

Download ppt "Copyright 2001, ActiveState XML Protocols. Copyright 2001, ActiveState Protocol Definition A set of formal rules describing how to transmit data, especially."

Similar presentations

Ads by Google