axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bengali Bengali <bengalis...@gmail.com>
Subject ClassCastException
Date Tue, 11 Oct 2005 14:13:55 GMT
Hi,
I get the following exception
java.lang.ClassCastException: java.lang.String
when I invoke a simple Webservice which accepts a string has input parameter
Below you'll find the stacktrace.
==========================
The WSDL part
==========================
<?xml version="1.0" encoding="UTF-8"?>
<definitions targetNamespace="urn:soap.snakeoil.com<http://soap.snakeoil.com>"
xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="
http://xml.apache.org/xml-soap"
xmlns:impl="urn:soap.snakeoil.com<http://soap.snakeoil.com>"
xmlns:intf="urn:soap.snakeoil.com <http://soap.snakeoil.com>" xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="
http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="
http://www.w3.org/2001/XMLSchema">

<message name="loginRequest">

<part name="loginData" type="xsd:string"/>

</message>

<message name="loginResponse">

<part name="loginReturn" type="xsd:string"/>

</message>

<portType name="LoginFacade">

<operation name="login" parameterOrder="loginData">

<input message="impl:loginRequest" name="loginRequest"/>

<output message="impl:loginResponse" name="loginResponse"/>

</operation>

</portType>

<binding name="LoginFacadeSoapBinding" type="impl:LoginFacade">

<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/<http://schemas.xmlsoap.org/soap/http%22/>
>

<operation name="login">

<soap:operation soapAction=""/>

<input name="loginRequest">

<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:soap.snakeoil.com <http://soap.snakeoil.com>" use="encoded"/>

</input>

<output name="loginResponse">

<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:soap.snakeoil.com <http://soap.snakeoil.com>" use="encoded"/>

</output>

</operation>

</binding>

<service name="LoginFacadeService">

<port binding="impl:LoginFacadeSoapBinding" name="LoginFacade">

<soap:address location="
http://localhost:8080/ws/PresentationWeb/LoginFacade"/<http://localhost:8080/ws/PresentationWeb/LoginFacade%22/>
>

</port>

</service>

</definitions>
==========================
The HTTP SOAP request:
==========================
POST http://localhost:8080/ws/PresentationWeb/LoginFacade HTTP/1.0
Accept: */*
Accept-Language: fr
Referer:
http://localhost:8080/ws/Infrastructure/RTInfra/LTR/Framework/Buttons.htm
soapaction: ""
Content-Type: text/xml; charset=UTF-8
Pragma: no-cache
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR
1.1.4322)
Host: localhost:8080
Content-Length: 1673
Proxy-Connection: Keep-Alive
Cookie: JSESSIONID=C0FEBB86788FA150BBF483C08E71F2FA

<?xml version='1.0' encoding='utf-8'?>
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/" xmlns="" xmlns:xsd="
http://www.w3.org/2001/XMLSchema" xmlns:apachesoap="
http://xml.apache.org/xml-soap"
xmlns:impl="urn:soap.snakeoil.com<http://soap.snakeoil.com>"
xmlns:intf="urn:soap.snakeoil.com <http://soap.snakeoil.com>" xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="
http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" xmlns:SOAP-ENV="
http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header><SOAP-ENV:Header><StartHeader xmlns='
http://www.openuri.org/2002/04/soap/conversation/'<http://www.openuri.org/2002/04/soap/conversation/%27>><conversationID>40220086789952336812</conversationID></StartHeader></SOAP-ENV:Header></SOAP-ENV:Header>

<SOAP-ENV:Body>
<mswsb:login xmlns:mswsb="urn:soap.snakeoil.com <http://soap.snakeoil.com>"
xmlns="">
<loginData
xsi:type="xsd:string">&lt;LoginData&gt;&lt;&lt;/LoginData&gt;</loginData></mswsb:login></SOAP-ENV:Body>
</SOAP-ENV:Envelope>


==========================
StackTrace:
==========================

faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.lang.ClassCastException<http://xml.apache.org/axis/%7DstackTrace:java.lang.ClassCastException>:
java.lang.String
at org.apache.axis.message.EnvelopeBuilder.startElement(EnvelopeBuilder.java
:77)
at org.apache.axis.encoding.DeserializationContext.startElement(
DeserializationContext.java:1048)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement
(AbstractSAXParser.java:533)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement
(XMLNSDocumentScannerImpl.java:330)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook
(XMLNSDocumentScannerImpl.java:779)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch
(XMLDocumentFragmentScannerImpl.java:1794)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument
(XMLDocumentFragmentScannerImpl.java:368)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(
XML11Configuration.java:834)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(
XML11Configuration.java:764)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java
:148)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(
AbstractSAXParser.java:1242)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
at org.apache.axis.encoding.DeserializationContext.parse(
DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
at org.apache.axis.server.AxisServer.initSOAPConstants(AxisServer.java:345)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:279)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at org.apache.axis.transport.http.AxisServletBase.service(
AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:105)
at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:856)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection
(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)

{http://xml.apache.org/axis/}hostname:ldewavrin<http://xml.apache.org/axis/%7Dhostname:ldewavrin>

java.lang.ClassCastException: java.lang.String
at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:324)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at org.apache.axis.transport.http.AxisServletBase.service(
AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:105)
at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:856)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection
(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.ClassCastException: java.lang.String
at org.apache.axis.message.EnvelopeBuilder.startElement(EnvelopeBuilder.java
:77)
at org.apache.axis.encoding.DeserializationContext.startElement(
DeserializationContext.java:1048)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement
(AbstractSAXParser.java:533)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement
(XMLNSDocumentScannerImpl.java:330)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook
(XMLNSDocumentScannerImpl.java:779)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch
(XMLDocumentFragmentScannerImpl.java:1794)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument
(XMLDocumentFragmentScannerImpl.java:368)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(
XML11Configuration.java:834)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(
XML11Configuration.java:764)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java
:148)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(
AbstractSAXParser.java:1242)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
at org.apache.axis.encoding.DeserializationContext.parse(
DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
at org.apache.axis.server.AxisServer.initSOAPConstants(AxisServer.java:345)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:279)
... 18 more

Mime
View raw message