MyGoogle: A Simple Cocoon Application that Uses Google's SOAP API

Author: Pankaj Kumar, Date: Apr. 23, 2002.

Brief description

This is a simple Cocoon application that uses Google's SOAP API to perform Web search. It uses google.xsp, a simple XSP page postedby Ugo Cei to the Cocoon mailing list. This XSP uses SOAP logicsheet to construct and issue SOAP requests and accept SOAP response.

You can find more information about Cocoon, Web Services and this example in My presentation at SD West 2002 on Cocoon

Steps to Run this Application

  1. You should have a J2SE SDK. I used JDK 1.3.1 from Sun on a Windows 2000 machine.
  2. You should have a Servlet container. I used Jakarta Tomcat 4.0.1.
  3. Download Apache Cocoon from Cocoon site and deploy it to the Servlet container. This should create the cocoon subdirectory within webapps directory in home directory of jakarta-tomcat.
  4. Register with Google at http://www.google/apis to get a KEY. You will need this to run this example.
  5. Get the MyGoogle application download from http://www.pankaj-k.net/sdwest2002/google.zip.
  6. Unzip google.zip in webapps/cocoon/mount directory. This way, the application specific sitemap will be auto-mounted.
  7. Replace the text YOURGOOGLEKEY in file google.xsp with your Google Key.
  8. Point your browser to http://localhost:8080/cocoon/mount/google/.

Troubleshooting Tips

  1. Make sure that Your Servlet Container is working fine. Do this by pointing your browser at http://localhost:8080.
  2. make sure that you have correctly deployed Cocoon. Do this by pointing your browser at http://localhost:8080/cocoon. You should get the Cocoon welcome page.
  3. If it still gives problems, try to identify the problem by looking at error messages. Almost all software components, including JDK, Tomcat, Cocoon and Google SOAP API, are likely to change with time.