tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "feilong" <feil...@dfki.de>
Subject Exception in Tomcat under Soap
Date Sun, 14 Nov 2004 20:47:24 GMT
Hallo all,
I am a beginner with programming web-service with 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message