Hi
I recently started with SOAP and I'm already in deep problems
:-)
In short:
{mandrake}[classes]$ java org.apache.soap.server.ServiceManagerClient
http://localhost:2507/mysoap/servlet/msgrouter list
Ouch, the call failed:
Fault Code = SOAP-ENV:Server
Fault String = Exception while handling service request:
org.apache.soap.server.ServiceManager.list(org.apache.soap.Envelope,org.apache.soap.rpc.SOAPContext,org.apache.soap.rpc.SOAPContext)
-- no signature match
So, no signature match for list(env, req, req), and that's
true: there's no such a method.
What could be wrong? Somehow I think that
org/apache/soap/util/MethodUtils is misinterpretting the error
message.
Here's some detailed explanation:
I'm using SOAP-2.2 with Tomcat 4.0 and/or Resin 2.0.3 on
Linux, JDK 1.3.0 by IBM (tried Sun's JDK 1.2.2 as well). Soap
is 2.2 although I tried with 2.1 and 2001-11-26 nightly build
with the same result. Xerces is 1.4.4 (tried with 1.2.3,
1.2.0). Classpath is clean, no signs of soap anywhere except
soap-2.2
So, simple SOAP-RPC example from www.onjava.com works just
fine, servlet is working, and my client is communicating using
SOAP. TcpTunnelGui shows messages and everything is just fine:
{mandrake}[resin]$ java org.apache.soap.server.ServiceManagerClient
http://localhost:2507/mysoap/servlet/rpcrouter list
Deployed Services:
urn:cd-catalog
{mandrake}[classes]$ java javaxml2.CDLister
http://localhost:2507/mysoap/servlet/rpcrouter
Listing current CD catalog.
'Vespertine' by Bjork, on One Little Indian
'Back On Top' by Van Morrison, on Epic
'Asylum Years' by Tom Waits, on Asylum Records
'Muy Divertido' by Marc Ribot, on Atlantic
Etc..
But, when I tried with MessageRouterServlet, I cannot make it
deploy or list or anything else. Here's the message:
{mandrake}[classes]$ java org.apache.soap.server.ServiceManagerClient
http://localhost:2507/mysoap/servlet/msgrouter list
Ouch, the call failed:
Fault Code = SOAP-ENV:Server
Fault String = Exception while handling service request:
org.apache.soap.server.ServiceManager.list(org.apache.soap.Envelope,org.apache.soap.rpc.SOAPContext,org.apache.soap.rpc.SOAPContext)
-- no signature match
(Don't be confused by the servlet mapping, everything is set
up properly, I hope, at least I have a message from
http://localhost:2507/mysoap/servlet/msgrouter saying it
accepts POST only).
I tried to narrow down the exception and discovered it happens
in MethodUtils.getEntryPoint (which is not surprizing).
Here's the stack trace (ignore line numbers in MethodUtils,
they are shifted by 5 or 6, since I added printStackTrace()
statement)
java.lang.NoSuchMethodException:
org.apache.soap.server.ServiceManager.list(org.apache.soap.Envelope,org.apache.soap.rpc.SOAPContext,org.apache.soap.rpc.SOAPContext)
-- no signature match
at java.lang.Throwable.<init>(Throwable.java:96)
at java.lang.Exception.<init>(Exception.java:44)
at
java.lang.NoSuchMethodException.<init>(NoSuchMethodException.java:41)
at
org.apache.soap.util.MethodUtils.getEntryPoint(MethodUtils.java:201)
at org.apache.soap.util.MethodUtils.getMethod(MethodUtils.java:557)
at org.apache.soap.util.MethodUtils.getMethod(MethodUtils.java:537)
at
org.apache.soap.server.MessageRouter.invoke(MessageRouter.java:54)
at
org.apache.soap.providers.MsgJavaProvider.invoke(MsgJavaProvider.java:125)
at
org.apache.soap.server.http.MessageRouterServlet.doPost(MessageRouterServlet.java:268)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:165)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
at
com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:82)
at com.caucho.server.http.Invocation.service(Invocation.java:277)
at
com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:129)
at
com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:216)
at
com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:158)
at com.caucho.server.TcpConnection.run(TcpConnection.java:140)
at java.lang.Thread.run(Thread.java:498)
I'm trying different combinations and in every case rpcrouter
is working good (listing, deploying etc) while msgrouter
always fails.
I'll try implementing (again) a simple list(env, req, req)
method which just calls list() in ServiceManager but I
remember doing it already and then I got IOException (I think,
don't have stack trace).
Oops, it looks like I actually have it:
java.io.IOException: Message is empty!
at java.lang.Throwable.<init>(Throwable.java:96)
at java.lang.Exception.<init>(Exception.java:44)
at java.io.IOException.<init>(IOException.java:49)
at
org.apache.soap.rpc.SOAPContext.writeTo(SOAPContext.java:505)
at
org.apache.soap.transport.TransportMessage.save(TransportMessage.java:308)
at
org.apache.soap.server.http.MessageRouterServlet.doPost(MessageRouterServlet.java:317)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:165)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
at
com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:82)
at
com.caucho.server.http.Invocation.service(Invocation.java:277)
at
com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:129)
at
com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:216)
at
com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:158)
at com.caucho.server.TcpConnection.run(TcpConnection.java:140)
at java.lang.Thread.run(Thread.java:498)
and
[2001/11/26 16:14:14] Error building response envelope:
java.io.IOException: Message is empty!
javax.servlet.ServletException: Error building response envelope:
java.io.IOException: Message is empty!
at java.lang.Throwable.<init>(Throwable.java:96)
at java.lang.Exception.<init>(Exception.java:44)
at
javax.servlet.ServletException.<init>(ServletException.java:76)
at
org.apache.soap.server.http.MessageRouterServlet.doPost(MessageRouterServlet.java:336)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:165)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
at
com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:82)
at
com.caucho.server.http.Invocation.service(Invocation.java:277)
at
com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:129)
at
com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:216)
at
com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:158)
at com.caucho.server.TcpConnection.run(TcpConnection.java:140)
at java.lang.Thread.run(Thread.java:498)
which is understandable since something somewhere is trying to
read the Envelope and it doesn't exist.
So, if somebody managed reading this mail until the end, I
hope he/she will at least understand what's the problem.
Thanks!!
--
Davor Cengija
[EMAIL PROTECTED]