Chapter 2. XML Protocols: XML-RPC and SOAP

Before we can explore the available APIs for processing XML documents with Java, we're going to need a few good examples. Throughout most of this book, the examples will focus on XML protocols. These are XML applications used for machine-to-machine exchange of information across the Internet over HTTP. In this chapter I'll show you how such documents move from one machine to another, and how you can use Java to interpose yourself in the process. However, because this is not a book about network programming, I will be careful to keep all the details of network transport separate from the generation and processing of XML documents. When working with an XML document, it's unimportant whether it came from a file, a network socket, a string, or something else.

Three such XML protocol applications are of particular interest. The first is a very straightforward application called RSS, used to exchange headlines and abstracts between different Web news sites. It is available in two versions, RSS 0.9.1, which is based on an early working draft of the Resource Description Framework (RDF); and RSS 1.0, which is based on the final W3C recommendation of RDF [http://www.w3org.TR/1999/REC-rdf-syntax-19990222] Both variants are used on the Web today.

The second XML application I'll investigate in some detail is XML-RPC. This application supports remote procedure calls across the Internet by passing method names and arguments embedded in an XML document over HTTP. The third example XML application is a more complex implementation of this idea called SOAP. Whereas XML-RPC uses only elements, SOAP adds attributes and namespaces as well. SOAP even lets the body of the message be an XML element from some other vocabulary, so it opens up a host of other interesting possibilities.

Processing XML with Java. A Guide to SAX, DOM, JDOM, JAXP, and TrAX
Processing XML with Javaв„ў: A Guide to SAX, DOM, JDOM, JAXP, and TrAX
ISBN: 0201771861
EAN: 2147483647
Year: 2001
Pages: 191

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: