Java Reference
In-Depth Information
Summary
HTML was designed primarily for humans to access web sites. If a web site is designed
for computers to access it, usually XML and web services are used. This chapter shows how
to access a variety of web services.
Many web services make use of Simple Object Access Protocol (SOAP). SOAP is an
XML based protocol that specifies how a web service server and client should communicate.
Most SOAP web services include a Web Service Definition Language (WSDL) file that pro-
vides information to the program on how to access the web service.
Apache AXIS can be used to quickly create a set of classes to access any SOAP based
web service. AXIS includes a simple utility named wsdl2java that can quickly create Java
class files for any web service that provides a WSDL file.
The Google Search API is a very commonly used web service. It is based on SOAP;
however, Google provides a set of classes you can download and use. The Google Search API
allows you to easily construct and submit search requests to the Google search engine.
You can also construct Hybrid bots. A hybrid bot makes use of both web services and
traditional HTML parsing. The Google search API is commonly used to construct hybrid
bots. You can submit a search term to Google, then use a traditional HTML bot to scan all of
the results returned from Google.
Three recipes were presented in this chapter. The first showed how to use the Google
Search API to display information about all of the sites linking to a particular site. The sec-
ond recipe showed how to use the AXIS framework to utilize a web service. The third recipe
showed how to create a hybrid bot that used both the Google Search API, as well as a tradi-
tional HTML bot.
The next chapter will discuss Real-time Site Syndication (RSS). RSS is an XML format
that allows you to keep up with new content on web sites.
Search WWH ::




Custom Search