ws-soap-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Nichol" <snicholn...@scottnichol.com>
Subject Re: Soap under Tomcat
Date Mon, 15 Nov 2004 15:31:12 GMT
The error message suggests to me that your CalcService.java is missing the line

     package onjava;

The Java class loader finds the CalcService.class file where it expects based on the deployment
descriptor saying onjava.CalcService, but then discovers that the bytecode in CalcService.class
does not specify the onjava package.

Just to be sure you installed Apache SOAP properly, the instructions for installing under
Tomcat 4.x are at http://cvs.apache.org/viewcvs.cgi/*checkout*/ws-soap/java/docs/install/tomcat.html?rev=1.17.

Scott Nichol

Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message ----- 
From: "feilong" <feilong@dfki.de>
To: <soap-dev@ws.apache.org>
Sent: Sunday, November 14, 2004 5:09 PM
Subject: Soap under Tomcat


Hallo all,
I am a beginner with web-service using soap protocol under Tomcat web server. 
I find a link http://www.onjava.com/pub/a/onjava/2002/02/27/tomcat.html?page=1
which introduce how to use soap in Tomcat and deploy web services and a simple client to call
this web service
I have followed each step what is showed in this article. All run succesfully. only the last
step
java onjava.CalcClient 96 95. I get the following exceptions, but unfortunately I can not
understand such exceptions, I hope someone can indicate the reason for me  
-----------------------------------------------------------
D:\Programs\jakarta-tomcat-4.1.30\webapps\soap\WEB-INF\classes>java onjava.CalcClient 98
92
The call failed:
Fault Code   = SOAP-ENV:Server.Exception:
Fault String = onjava/CalcService (wrong name: CalcService)
----------------------------------------------------------
I put my java servlet classes and source code in
D:\Programs\jakarta-tomcat-4.1.30\webapps\soap\WEB-INF\classes\onjava
I can deploy the CalcService servlet in Tomcat Server.
But when I run the CalcClient, get the error messages above.
I didn't edit \jakarta-tomcat-4.1.30\webapps\soap\WEB-INF\web.xml descriptor file. This web.xml
is automatic generated by soap.war while I run the Tomcat Server first time. I don't know
how can I edit the
soap\WEB-INF\web.xml in this case, i.e new servlet under package soap\WEB-INF\classes\onjava


Another DeploymentDescriptor.xml identifying soap-service 
under webapps\soap\WEB-INF\classes\onjava\ runs correctly since I can deploy this webservice.

The soap\WEB-INF\web.xml looks like following
------------------------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

<web-app>
  <display-name>Apache-SOAP</display-name>
  <description>no description</description>
  <servlet>
    <servlet-name>rpcrouter</servlet-name>
    <display-name>Apache-SOAP RPC Router</display-name>
    <description>no description</description>
   
    <servlet-class>org.apache.soap.server.http.RPCRouterServlet</servlet-class>
   
     
    <init-param>
      <param-name>faultListener</param-name>
      <param-value>org.apache.soap.server.DOMFaultListener</param-value>
    </init-param>
  </servlet>

  <servlet>
    <servlet-name>messagerouter</servlet-name>
    <display-name>Apache-SOAP Message Router</display-name>
    <servlet-class>org.apache.soap.server.http.MessageRouterServlet</servlet-class>
    <init-param>
      <param-name>faultListener</param-name>
      <param-value>org.apache.soap.server.DOMFaultListener</param-value>
    </init-param>
  </servlet>

  <servlet-mapping>
    <servlet-name>rpcrouter</servlet-name>
    <url-pattern>/servlet/rpcrouter</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>messagerouter</servlet-name>
    <url-pattern>/servlet/messagerouter</url-pattern>
  </servlet-mapping>
</web-app>
----------------------------------------------------------
I added new context in tomcat/conf/server.xml
 <Context path="/soap" docBase="soap" debug="0" reloadable="true" />


Thanks in advance
Feilong

Mime
View raw message