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
- You should have a J2SE SDK. I used JDK 1.3.1 from Sun on a Windows 2000 machine.
- You should have a Servlet container. I used Jakarta Tomcat 4.0.1.
- 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.
- Register with Google at http://www.google/apis to get a KEY.
You will need this to run this example.
- Get the MyGoogle application download from
http://www.pankaj-k.net/sdwest2002/google.zip.
- Unzip
google.zip
in webapps/cocoon/mount
directory. This way,
the application specific sitemap will be auto-mounted.
- Replace the text
YOURGOOGLEKEY
in file google.xsp
with your
Google Key.
- Point your browser to
http://localhost:8080/cocoon/mount/google/
.
Troubleshooting Tips
- Make sure that Your Servlet Container is working fine. Do this by pointing your
browser at
http://localhost:8080
.
- 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.
- 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.