Chapter 3: Working with Web Service Data


Overview

All Web services rely on some form of eXtensible Markup Language (XML) to receive requests and send information. Even the Simple Object Access Protocol (SOAP) is simply a way to package information within an XML envelope, and the result looks similar to the XML that you see used in other places. This chapter isn't going to drown you in XML terminology, and it certainly won't make you an expert, but it does contain helpful information on using XML with Google Web Services.

You do need to understand some XML basics to get anything out of Google Web Services. The first section of the chapter helps you understand these basics, including the single format that Google uses to return data from requests. You'll receive enough information in this section to work with the examples in the book. However, once you start working with XML, you might find that you want to know more, so the section also includes a listing of resources (including tutorials) that you can use to increase your XML knowledge.

Note  

Because Google doesn't directly support the XML over HTTP technique of making a request, obtaining a direct view of XML in your browser is impossible . To view the XML, you normally need to write an application to capture and view the SOAP message. You can also view the raw return values using a debugger for your favorite application program. As an alternative, you can view the sample SOAP messages that Google provides.

XML isn't necessarily easy for the average human to read ”it includes text mixed with tags in such a way that you can see the structure if you look hard enough, but the data isn't easy to interpret. The eXtensible Stylesheet Language Transformations (XSLT) technology can transform XML into a readable Web page. Again, this section won't make you an expert, but you'll leave the section with enough information to create basic reports and informational layouts. Like the XML section, this XSLT section contains additional information on where you can learn more about XSLT.

The SOAP section of the chapter helps you understand how SOAP works, especially how it differs from straight XML. Most serious developers consider SOAP the best way to transfer data between systems today because you gain functionality. For example, SOAP supports the Web Services Description Language (WSDL), which many IDEs can turn directly into programming information for the developer. Instead of having to learn to write complex strings to request data, the developer concentrates on the data requirements and lets the IDE perform the complex part of the task.

Finally, this chapter discusses two essential issues. The first is the problem of maintaining privacy with Web service applications. Generally, you shouldn't run into too many privacy issues with Google Web Services because you're receiving data, not sending it anywhere . However, you can run into user privacy issues because the requests your application makes reflect user needs and tastes. The second is the problem of security. Your application isn't trading sensitive information, but others might glean information about your company based on the research you perform. Consequently, keeping the request, response, and search information private is important.




Mining Google Web Services
Mining Google Web Services: Building Applications with the Google API
ISBN: 0782143334
EAN: 2147483647
Year: 2004
Pages: 157

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