Lecture Notes for Client-Server Interfaces
3 May 2001 - The Simple Object Access Protocol
- what - an absolute joke
- consider rpc; consider differing host architectures
- consider presentation protocols - xdr, ascii text
- consider xml
- but first, consider sgml
- sgml - standard (or simple) generalized (or generic) mark-up language
- standard - iso 8879
- generalized - applicable to a wide range of information; the dtd
- mark-up - describe structure, not content or presentation
- language - generators, checkers, parsesr
- html is the best-known instance of sgml (sorta)
- now consider xml
- sgml is complicated - description, macros, parsing can be hard
- enter xml - simpler, less general, "the parts of sgml that
microsoft understood."
- dtds are still around; it's still text-based; tags are less unruly;
less emphasis on representation issues
- there are many aligned protocols - style, linking, and so on
- xhtml, mathml defined using xml
- on to xml-rpc
- xml-rpc is the result of confusing transport and presentation protocols
- nominally, xdr is "no good", although why isn't made clear
- xml is much better - oh, and by the way, use http as the transport
- people who can't comprehend xdr certainly won't be able to use it with
http
- hint - use the post method
- xml-rpc components
- identifies supported types - int, bool, string, blob, structs; no
user-defined data structures
- request-response structure - posts mostly
POST /RPC2 HTTP/1.0
User-Agent: Frontier/5.1.2 (WinNT)
Host: betty.userland.com
Content-Type: text/xml
Content-length: 181
- xml call-response structures
-
<methodCall>
<methodName>examples.getStateName</methodName>
<params>
<param>
<value><i4>41</i4></value>
</param>
</params>
</methodCall>
-
<methodResponse>
<params>
<param>
<value><string>South Dakota</string></value>
</param>
</params>
</methodResponse>
- it is unclear of procedure-call naming conventions are defined anywhere
- asynchronous extensions to the rpc model - call and continue;
multi-calls
- simple object access protocol - like xml-rpc, but more
- defines an envelope document to containing requests and responses
- defines extensions to the xml-rpc model
- those who don't know the past are doomed to repeat it, usually as farce
This page last modified on 3 May 2001.