You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@xml.apache.org by "Das, Kuntal" <Ku...@Schwab.com> on 2001/05/25 22:41:15 UTC

Illegal argument Exception.....

Hi all,
      I NEVER GOT ANY ANSWER TO MY PROBLEMS from the SOAP-mailing list, i.e.
SOAP@DISCUSS.DEVELOP.COM, and that's why I thought that maybe I can get some
help here. Please forgive me if I'm in the wrong place with the wrong
question. Thanks ....
      Here's the scenario. I have a remote SOAP method which takes three
string
values as parameters, and returns an Element. And here's where I get this
exception :

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

org.xml.sax.SAXParseException: The markup in the document following the
root ele
ment must be well-formed.
        at org.apache.xerces.framework.XMLParser.reportError
(XMLParser.java:1056
)
        at
org.apache.xerces.framework.XMLDocumentScanner$TrailingMiscDispatcher
.dispatch(XMLDocumentScanner.java, Compiled Code)
        at org.apache.xerces.framework.XMLDocumentScanner.parseSome
(XMLDocumentS
canner.java, Compiled Code)
        at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:948)
        at org.apache.soap.util.xml.XercesParserLiaison.read
(XercesParserLiaison
.java:85)
        at org.apache.soap.rpc.Call.invoke(Call.java:157)
        at AccountSignOnClient.main(AccountSignOnClient.java:64)
************ SOAPException caught *************
Caught SOAPException (SOAP-ENV:Protocol): <h1>Error: 500</h1>
<h2>Location: /soap/servlet/rpcrouter</h2><b>Internal Servlet
Error:</b><br><pre
>javax.servlet.ServletException: Error building response envelope
        at org.apache.soap.server.http.RPCRouterServlet.doPost
(RPCRouterServlet.
java:345)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.tomcat.core.ServletWrapper.doService
(ServletWrapper.java:4
04)
        at org.apache.tomcat.core.Handler.service(Handler.java:286)
        at org.apache.tomcat.core.ServletWrapper.service
(ServletWrapper.java:372
)
        at org.apache.tomcat.core.ContextManager.internalService
(ContextManager.
java:797)
        at org.apache.tomcat.core.ContextManager.service
(ContextManager.java:743
)
        at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnectio
n(HttpConnectionHandler.java:210)
        at org.apache.tomcat.service.TcpWorkerThread.runIt
(PoolTcpEndpoint.java:
416)
        at org.apache.tomcat.util.ThreadPool$ControlRunnable.run
(ThreadPool.java
:498)
        at java.lang.Thread.run(Thread.java:479)
</pre>
<b>Root cause:</b>
<pre>java.lang.IllegalArgumentException: No Serializer found to serialize
a 'org
.w3c.dom.Element' using encoding
style 'http://schemas.xmlsoap.org/soap/encoding
/'.
        at org.apache.soap.util.xml.XMLJavaMappingRegistry.querySerializer
(XMLJa
vaMappingRegistry.java:125)
        at org.apache.soap.encoding.SOAPMappingRegistry.querySerializer
(SOAPMapp
ingRegistry.java:297)
        at org.apache.soap.encoding.soapenc.ParameterSerializer.marshall
(Paramet
erSerializer.java:98)
        at org.apache.soap.rpc.RPCMessage.marshall(RPCMessage.java:260)
        at org.apache.soap.Body.marshall(Body.java:141)
        at org.apache.soap.Envelope.marshall(Envelope.java:180)
        at org.apache.soap.server.http.RPCRouterServlet.doPost
(RPCRouterServlet.
java:343)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.tomcat.core.ServletWrapper.doService
(ServletWrapper.java:4
04)
        at org.apache.tomcat.core.Handler.service(Handler.java:286)
        at org.apache.tomcat.core.ServletWrapper.service
(ServletWrapper.java:372
)
        at org.apache.tomcat.core.ContextManager.internalService
(ContextManager.
java:797)
        at org.apache.tomcat.core.ContextManager.service
(ContextManager.java:743
)
        at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnectio
n(HttpConnectionHandler.java:210)
        at org.apache.tomcat.service.TcpWorkerThread.runIt
(PoolTcpEndpoint.java:
416)
        at org.apache.tomcat.util.ThreadPool$ControlRunnable.run
(ThreadPool.java
:498)
        at java.lang.Thread.run(Thread.java:479)
</pre>

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Any help is appreciated....

Thanks
Kuntal


Thanks,
Kuntal Das
Charles Schwab & Co., Inc.
Wireless Technology
45 Fremont, SF
Email : kuntal.das@schwab.com
Phone : (415)667-4322
Live life to the brim.................



Thanks,
Kuntal Das
Charles Schwab & Co., Inc.
Wireless Technology
45 Fremont, SF
Email : kuntal.das@schwab.com
Phone : (415)667-4322
Live life to the brim.................



Re: Illegal argument Exception.....

Posted by Scott Nichol <sn...@computer.org>.
You must (1) write [de-]serializer for the Element class, (2) register it on
the server via the deployment descriptor for the service and (3) register it
on the client by adding it to the registry you create.  The Address Book
example shows how to do all these, but for classes other than the Element
class.

Alternatively, you may want to use an encoding other than SOAP.

Finally, I highly encourage you to read the source code.  While finding the
answer to your current issue, you might also find the answers to the dozen
issues most likely to follow.

Scott

----- Original Message -----
From: "Das, Kuntal" <Ku...@Schwab.com>
To: <so...@xml.apache.org>; <so...@xml.apache.org>
Sent: Friday, May 25, 2001 4:41 PM
Subject: Illegal argument Exception.....


> Hi all,
>       I NEVER GOT ANY ANSWER TO MY PROBLEMS from the SOAP-mailing list,
i.e.
> SOAP@DISCUSS.DEVELOP.COM, and that's why I thought that maybe I can get
some
> help here. Please forgive me if I'm in the wrong place with the wrong
> question. Thanks ....
>       Here's the scenario. I have a remote SOAP method which takes three
> string
> values as parameters, and returns an Element. And here's where I get this
> exception :
>
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> org.xml.sax.SAXParseException: The markup in the document following the
> root ele
> ment must be well-formed.
>         at org.apache.xerces.framework.XMLParser.reportError
> (XMLParser.java:1056
> )
>         at
> org.apache.xerces.framework.XMLDocumentScanner$TrailingMiscDispatcher
> .dispatch(XMLDocumentScanner.java, Compiled Code)
>         at org.apache.xerces.framework.XMLDocumentScanner.parseSome
> (XMLDocumentS
> canner.java, Compiled Code)
>         at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:948)
>         at org.apache.soap.util.xml.XercesParserLiaison.read
> (XercesParserLiaison
> .java:85)
>         at org.apache.soap.rpc.Call.invoke(Call.java:157)
>         at AccountSignOnClient.main(AccountSignOnClient.java:64)
> ************ SOAPException caught *************
> Caught SOAPException (SOAP-ENV:Protocol): <h1>Error: 500</h1>
> <h2>Location: /soap/servlet/rpcrouter</h2><b>Internal Servlet
> Error:</b><br><pre
> >javax.servlet.ServletException: Error building response envelope
>         at org.apache.soap.server.http.RPCRouterServlet.doPost
> (RPCRouterServlet.
> java:345)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at org.apache.tomcat.core.ServletWrapper.doService
> (ServletWrapper.java:4
> 04)
>         at org.apache.tomcat.core.Handler.service(Handler.java:286)
>         at org.apache.tomcat.core.ServletWrapper.service
> (ServletWrapper.java:372
> )
>         at org.apache.tomcat.core.ContextManager.internalService
> (ContextManager.
> java:797)
>         at org.apache.tomcat.core.ContextManager.service
> (ContextManager.java:743
> )
>         at
> org.apache.tomcat.service.http.HttpConnectionHandler.processConnectio
> n(HttpConnectionHandler.java:210)
>         at org.apache.tomcat.service.TcpWorkerThread.runIt
> (PoolTcpEndpoint.java:
> 416)
>         at org.apache.tomcat.util.ThreadPool$ControlRunnable.run
> (ThreadPool.java
> :498)
>         at java.lang.Thread.run(Thread.java:479)
> </pre>
> <b>Root cause:</b>
> <pre>java.lang.IllegalArgumentException: No Serializer found to serialize
> a 'org
> .w3c.dom.Element' using encoding
> style 'http://schemas.xmlsoap.org/soap/encoding
> /'.
>         at org.apache.soap.util.xml.XMLJavaMappingRegistry.querySerializer
> (XMLJa
> vaMappingRegistry.java:125)
>         at org.apache.soap.encoding.SOAPMappingRegistry.querySerializer
> (SOAPMapp
> ingRegistry.java:297)
>         at org.apache.soap.encoding.soapenc.ParameterSerializer.marshall
> (Paramet
> erSerializer.java:98)
>         at org.apache.soap.rpc.RPCMessage.marshall(RPCMessage.java:260)
>         at org.apache.soap.Body.marshall(Body.java:141)
>         at org.apache.soap.Envelope.marshall(Envelope.java:180)
>         at org.apache.soap.server.http.RPCRouterServlet.doPost
> (RPCRouterServlet.
> java:343)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at org.apache.tomcat.core.ServletWrapper.doService
> (ServletWrapper.java:4
> 04)
>         at org.apache.tomcat.core.Handler.service(Handler.java:286)
>         at org.apache.tomcat.core.ServletWrapper.service
> (ServletWrapper.java:372
> )
>         at org.apache.tomcat.core.ContextManager.internalService
> (ContextManager.
> java:797)
>         at org.apache.tomcat.core.ContextManager.service
> (ContextManager.java:743
> )
>         at
> org.apache.tomcat.service.http.HttpConnectionHandler.processConnectio
> n(HttpConnectionHandler.java:210)
>         at org.apache.tomcat.service.TcpWorkerThread.runIt
> (PoolTcpEndpoint.java:
> 416)
>         at org.apache.tomcat.util.ThreadPool$ControlRunnable.run
> (ThreadPool.java
> :498)
>         at java.lang.Thread.run(Thread.java:479)
> </pre>
>
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> Any help is appreciated....
>
> Thanks
> Kuntal
>
>
> Thanks,
> Kuntal Das
> Charles Schwab & Co., Inc.
> Wireless Technology
> 45 Fremont, SF
> Email : kuntal.das@schwab.com
> Phone : (415)667-4322
> Live life to the brim.................
>
>
>
> Thanks,
> Kuntal Das
> Charles Schwab & Co., Inc.
> Wireless Technology
> 45 Fremont, SF
> Email : kuntal.das@schwab.com
> Phone : (415)667-4322
> Live life to the brim.................
>
>
>