DocumentLiteral vs. RPCEncoded SOAP - PowerPoint PPT Presentation


PPT – DocumentLiteral vs. RPCEncoded SOAP PowerPoint presentation | free to view - id: 145c1c-ZjUzM


The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
About This Presentation

DocumentLiteral vs. RPCEncoded SOAP


'A simple messaging framework for transferring information ... Schemas are good for describing the 'shape' of an XML document, but data types may be overkill ... – PowerPoint PPT presentation

Number of Views:130
Avg rating:3.0/5.0
Slides: 15
Provided by: wwwdi


Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: DocumentLiteral vs. RPCEncoded SOAP

Document/Literal vs. RPC/Encoded SOAP
  • Dan Gunter
  • Lawrence Berkeley National Laboratory

Background - What is SOAP?
  • Simple Object Access Protocol, but..
  • Not really Simple
  • Doesnt really Access Objects
  • Not really a Protocol
  • What is it really?
  • A simple messaging framework for transferring
    information specified in the form of an XML
    infoset between an initial SOAP sender and an
    ultimate SOAP receiver (SOAP 1.2 Primer)
  • SOAP 1.2 will not spell out the acronym.

Very Brief history of SOAP
  • From an article by Don Box 1
  • 1998 XML had no type system (no XML Schema),
    SOAP focused on providing one
  • Dave Winer invents XML-RPC using original SOAP
    type system
  • 1999-2000 SOAP adds support for arrays and
    references XML Schema still in flux
  • 2001-? SOAP also adopts XSD, providing two type
  • Present SOAP Encoding is going away..

What is WSDL?
  • Web Services Description Language
  • Describes the message exchanges supported by Web
    Services in an abstract way
  • May be bound to different underlying
    transports, e.g. SOAP/HTTP, REST/HTTP, SMTP, …
  • Most software I know of supports the SOAP/HTTP

What is RPC/Encoded?
  • Remote Procedure Call style invocation
  • Changes the Fault elements slightly
  • (WSDL 1.2) Each element in the input document
    is a parameter
  • Top-level structure MUST be a sequence (no
  • SOAP Encoding
  • Serialization of XML adds ID and HREF to allow a
    directed graph (not just a tree)
  • Resulting XML document may no longer validate
    against the XML Schema

RPC/Encoded WSDL (1.1)
  • Input
  • ltwsdlmessage name"DistanceInput"gt
  • ltwsdlpart name"p1" type"tnsPoint" /gt
  • ltwsdlpart name"p2" type"tnsPoint" /gt
  • lt/wsdlmessagegt
  • Output
  • ltwsdlmessage name"DistanceOutput"gt
  • ltwsdlpart name"result type"xsdfloat/gt
  • lt/wsdlmessagegt

Perhaps XSD ltelementsgt in WSDL 2.0
RPC/Encoded SOAP
  • Input
  • ltsoapEnvelope
  • ltsoapBody soapencodingStyle
  • "http//
  • ltnsDistance
  • ltp1 HREF"id1"/gt
  • ltp2 HREF"id1"/gt
  • lt/nsDistancegt
  • ltnsPoint id"id1"gt
  • ltxgt10lt/xgt
  • ltygt20lt/ygt
  • lt/nsPointgt
  • lt/soapBodygt
  • lt/soapEnvelopegt

Hmm, doesnt look much like a sequence of integer
What is Document/Literal?
  • Document-style invocation
  • Input is any XML document
  • Output, if present, is another one
  • Both are described with XML Schema (in theory,
    other schema languages are supported)
  • Literal encoding
  • The schema can validate the XML in the SOAP

Document/Literal WSDL (1.1) theory, non-XSD schema languages can be used
  • Input
  • ltrncDistancegt
  • distance p1 Point , p2 Point
  • Point x xsdfloat, y xsdfloat
  • lt/rncDistancegt
  • ltwsdlmessage name"DistanceInput"gt
  • ltwsdlpart namebody" typerncDistance" /gt
  • lt/wsdlmessagegt
  • Output
  • ltwsdlmessage name"DistanceOutput"gt
  • ltwsdlpart name"result" type"xsdfloat" /gt
  • lt/wsdlmessagegt

Document/Literal SOAP
  • Input
  • ltsoapEnvelopegt
  • ltsoapBodygt
  • ltnsdistancegt
  • ltp1gt
  • ltxgt10lt/xgt ltygt20lt/ygt
  • lt/p1gt
  • ltp2gt
  • ltxgt100lt/xgt ltygt200lt/ygt
  • lt/p2gt
  • lt/nsdistancegt
  • lt/soapBodygt
  • lt/soapEnvelopegt

Contents of soapBody will validate against the
Schemas and Interoperability
  • Schema validation provides a starting point
  • Platform-independent, widely-implemented
  • Note Schema validation is imperfect
  • Slow as molasses
  • Schemas can be brittle (especially if the schema
    has a lot of datatype information)
  • Message validity ! Semantic validity
  • Versioning not automatic
  • But Better than eyeballing it!

What does this mean for NM-WG?
  • Schemas have 3 uses
  • Contracts Agreeing on structure of data
  • Tooling Generate code stubs
  • Validation Did I get what I wanted?
  • The WG is dealing with 1
  • In its full sense, 3 includes constraints not
    expressible with schemas need informal or formal
    specifications for this
  • E.g., if user is requesting a UDP measurement,
    ignore TCP parameters

Additional thoughts..
  • Schemas are good for describing the shape of an
    XML document, but data types may be overkill
  • Especially if youre using a language like Perl
    or Python
  • Many useful constraints are still hard to
  • If packetType is UDP, ignore numStreams
  • Note that data-types may inadvertently make life
  • Need something like XSLT to evaluate
    co-occurrence constraints?
  • All the tools are, at best, first-generation

  • http//