Thank for the solution Scott but now I have another problem:

I want to deploy a service. I executed the following operations:

- deploying with Apache SOAP using a deployment descriptor file named
CallCounterService.dd

<isd:service
   xmlns:isd="http://xml.apache.org/xml-soap/deployment";
   id="urn:CallCounterService">

   <isd:provider type="java"
         scope="Application"
         methods="doSomething getCount">
     <isd:java class="javasoap.book.ch4.MethodCounter"
         static="false"/>
   </isd:provider>
   <isd:faultListener>
   org.apache.soap.server.DOMFaultListener
   </isd:faultListener>
   <isd:mappings>
   </isd:mappings>
</isd:service>

- invoking the getCount method using this java file named CallCounterApp

package javasoap.book.ch4;
import java.net.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;
public class GetCountApp {
   public static void main(String[] args)
      throws Exception {

      URL url =
        new URL(
          "http://localhost:8080/soap/servlet/rpcrouter";);

      Call call = new Call();
      call.setTargetObjectURI("urn:CallCounterService");
      call.setMethodName("getCount");
      try {
         Response resp = call.invoke(url, "");
         Parameter ret = resp.getReturnValue();
         Object value = ret.getValue();
         System.out.println("Result is " + value);
      }
      catch (SOAPException e) {
         System.err.println("Caught SOAPException (" +
                         e.getFaultCode() + "): " +
                         e.getMessage());
      }
   }
}

but I received this exception:

Caught SOAPException (SOAP-ENV:Protocol): Unsupported response content type
&quo
t;text/html; charset=ISO-8859-1&quot;, must be: &quot;text/xml&quot;.
Response w
as:
&lt;html&gt;&lt;head&gt;&lt;title&gt;Apache Tomcat/4.1.30 - Error
report&lt;/tit
le&gt;&lt;STYLE&gt;&lt;!--H1{font-family : sans-serif,Arial,Tahoma;color :
white
;background-color : #0086b2;} H3{font-family : sans-serif,Arial,Tahoma;color
: w
hite;background-color : #0086b2;} BODY{font-family :
sans-serif,Arial,Tahoma;col
or : black;background-color : white;} B{color : white;background-color :
#0086b2
;} HR{color : #0086b2;} --&gt;&lt;/STYLE&gt;
&lt;/head&gt;&lt;body&gt;&lt;h1&gt;
HTTP Status 500 - &lt;/h1&gt;&lt;HR size=&quot;1&quot;
noshade&gt;&lt;p&gt;&lt;b
&gt;type&lt;/b&gt; Exception
report&lt;/p&gt;&lt;p&gt;&lt;b&gt;message&lt;/b&gt;
 &lt;u&gt;&lt;/u&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;description&lt;/b&gt;
&lt;u&gt;T
he server encountered an internal error () that prevented it from fulfilling
thi
s request.&lt;/u&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;exception&lt;/b&gt;
&lt;pre&gt;j
avax.servlet.ServletException: Error building response envelope:
java.lang.NullP
ointerException
        at
org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.
java:418)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:247)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:193)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:256)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

        at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:
2422)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:180)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
        at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatche
rValve.java:171)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:641)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:163)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:641)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:174)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

        at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:19
9)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:828)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:700)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:584)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:683)
        at java.lang.Thread.run(Thread.java:534)
&lt;/pre&gt;&lt;/p&gt;&lt;HR size=&quot;1&quot; noshade&gt;&lt;h3&gt;Apache
Tomc
at/4.1.30&lt;/h3&gt;&lt;/body&gt;&lt;/html&gt;

In the Tomcat window a message appears:
SOAP Service Manager: Unable to read 'DeployedServices.ds': assuming fresh
start

HOW CAN I RESOLVE THE PROBLEM????
----- Original Message ----- 
From: "Scott Nichol" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 10, 2004 7:34 PM
Subject: Re: problem with ServiceManagerClient


You do not have an XML parser in the classpath for your client.

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: "Francesco Dipalo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 10, 2004 4:13 AM
Subject: problem with ServiceManagerClient



My web server is Apache Tomcat 4.1.30 and I have Apache Soap 2.3.1 as web
app. When I try:
java org.apache.soap.server.ServiceManagerClient
http://localhost:8080/soap/servlet/rpcrouter list
I receive this exception:

Exception in thread "main" java.lang.NoClassDefFoundError: org/w3c/dom/Node
        at
org.apache.soap.server.ServiceManagerClient.<init>(ServiceManagerClient.java
:81)
        at
org.apache.soap.server.ServiceManagerClient.main(ServiceManagerClient.java:2
16)

Why?




 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f

 Sponsor:
 Vuoi acquistare con sconti esclusivi? Con EmailConto Risparmio puoi
scontare fino al 20% i tuoi acquisti!
* Prova subito la convenienza cliccando qui.
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?midf7&d-6


 

 

 --

 Email.it, the professional e-mail, gratis per te: http://www.email.it/f

 

 Sponsor:

 La tua casella di posta ti va "stretta" prova i 100 MB di Email.it PRO è proprio mega!

 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=1625&d=11-611-6

Reply via email to