• Post Reply Bookmark Topic Watch Topic
  • New Topic

Webservices Newbie Question

 
Mark Fletcher
Ranch Hand
Posts: 897
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends,
Ive decided to dive into the world of webservices to find out what its all about.
Ive started off by picking up the Oreilly book "Web Services Essentials", but Im having problems executing the first example in the "Chapter 4: Apache SOAP Quick Start", namely the HelloService/HelloClient example.
Before I continue, a bit of info on my environment settings:
Windows 2000 SP2.
Jakarta Tomcat v4.0.3
Sun JDK1.4.0
Ive downloaded the soap.jar from xml.apache.org, the mail.jar and activation.jar from the Sun site as the text recommended. Ive installed the soap.jar in the $CATALINA_HOME\common\lib and the .war file in $CATALINA_HOME\webapps.
Ive been able to access the SOAP admin tool on localhost:8080 and deploy the webservice urn:examples:helloservice.
Ive typed in the HelloClient.java and HelloService.java into my IDE (Forte) and successfully compiled them.
However when I try and run the HelloClient class I get the following error:

Ive checked the SOAP conversation using the TcpTunnelGui tool using the command line:

This is the following converstation, from localhost 8070

And here is the response from localhost 8080

Im at a bit of a loss on how to proceed next. Can anyone suggest any areas to check in fault finding?
Best Regards,
Mark
[ August 05, 2002: Message edited by: Mark Fletcher ]
[ August 05, 2002: Message edited by: Mark Fletcher ]
[ August 05, 2002: Message edited by: Mark Fletcher ]
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you put the compiled HelloService.class file where the SOAP web service (rpcrouter servlet) could find it? ie in the WEB-INF/classes/com/ etc.... directory
Bill
 
Mark Fletcher
Ranch Hand
Posts: 897
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi William,
Thanks for the help and the tip! I placed the package in the $CATALINA_HOME/common/classes directory, restarted the container and the webservice works fine!
Your advice leads me into my next question re: Webservices and best practices. Specifically, who do I deploy a webservice in a package into a Web application and get the rpcrouter to see it? Or do I have to deploy all my webservices in the $CATALINA_HOME/common/classes dir?
Thanks and best regards,
Mark Fletcher
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you should stick to the servlet convention for SOAP web service classes if you are using rpcrouter servlet or any of the other HTTP/servlet based RPC schemes. In other words, use the WEB-INF/classes or lib directories, not the commons/ directories. The only reason to use commons/ is if you have multiple "web applications" using the same classes.
Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!