9.1 What Are Web Services?


In a general sense, web services are programs you can access over the Web. In their broadest definition, tools like Google, Amazon, Mapquest, and other web-based applications are certainly web services. More typically, web services, as opposed to the regular Web, are about program-to-program communication. Web sites can make information available to other programs, and many are using XML to spare the other programs the difficulties of processing HTML. Over the last three years, web services has developed into a specialty of its own, built on a protocol called SOAP.

SOAP formerly the Simple Object Access Protocol, but now an acronym without an official expansion uses an XML vocabulary and a set of rules for sending XML over HTTP. ( HTTP, the HyperText Transfer Protocol, is the protocol at the heart of the Web, most commonly used to transfer HTML from servers to clients.) SOAP is most frequently used as a framework for sending remote procedure calls (RPC) between programs, and that's how the examples in this chapter will use it. The Microsoft Office Web Services Toolkit creates code that makes Word or Excel a client application, capable of calling SOAP-based services on other computers.

There are two other layers to the web services supported by Office. Web Services Description Language (WSDL) provides a machine-readable description of a web service, identifying things like the methods it supports and the parameters and return values for those methods. Given a WSDL file, an application (or a programmer) can determine how to interact with a web service. The Microsoft Office Web Services Toolkit uses WSDL files to create its code. If the WSDL file is written correctly, the resulting code will be able to interact with the SOAP-based web service smoothly.

The WSDL file will tell the Toolkit what code to create, but there's still one problem: the Toolkit needs to know where to find the WSDL file. UDDI (Universal Description, Discovery, and Integration) is designed to help with this problem by providing a common framework for describing and organizing web services in public or private directories. UDDI servers store information describing services and their providers, helping developers to find services they trust and can use.

There are other ways to provide and use web services. XML-RPC, described at http://xmlrpc.com/, preceded SOAP and provides support for function calls over HTTP. Microsoft Office doesn't provide direct support for XML-RPC.


You can also use HTTP calls to send XML between clients and servers without using SOAP, in what is often called Representational State Transfer, or REST. For more on REST, see http://internet.conveyor.com/RESTwiki/moin.cgi/FrontPage. It's probably easiest to think of REST much as you think of the Web; it uses basic HTTP functionality to exchange information between programs and servers much the same way that browsers use HTTP to exchange information between browsers and servers. You can use some REST-based services in Office by combining HTTP calls with the built-in XML functionality described in earlier chapters, or through VBA.



Office 2003 XML
Office 2003 XML
ISBN: 0596005385
EAN: 2147483647
Year: 2003
Pages: 135

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net