[
https://jira.jboss.org/jira/browse/JBWS-2651?page=com.atlassian.jira.plug...
]
Darran Lofthouse commented on JBWS-2651:
----------------------------------------
Just double checked the code on this one, we have had similar errors in the past but this
one does still seem to be present.
ClassCast Exception in case of malformed webservice response
------------------------------------------------------------
Key: JBWS-2651
URL:
https://jira.jboss.org/jira/browse/JBWS-2651
Project: JBoss Web Services
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: jbossws-native
Affects Versions: jbossws-native-3.1.1
Environment: Windows XP
JDK 1.6
JBoss 4.2.3 GA
JBossWs 3.1.1
Reporter: Gandulf Kohlweiss
Fix For: jbossws-native-3.2.1
At the moment jbossws throws a ClassCast Exception in case of an illegal webservice
response (missing closing tag, etc...) :
[code]
Caused by: javax.xml.ws.WebServiceException: java.lang.ClassCastException:
org.jboss.ws.core.soap.Te
xtImpl cannot be cast to org.jboss.ws.core.soap.SOAPElementI
mpl
at
org.jboss.ws.core.jaxws.client.ClientImpl.handleRemoteException(ClientImpl.java:404)
at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:314)
at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:172)
at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:152)
at $Proxy311.bookOrders(Unknown Source)
at
com.skidata.dta.server.co.v3_0.classic.impl.BookOrdersHelper.invoke(BookOrdersHelper.java
:46)
... 12 more
Caused by: java.lang.ClassCastException: org.jboss.ws.core.soap.TextImpl cannot be cast
to org.jboss
.ws.core.soap.SOAPElementImpl
at
org.jboss.ws.core.CommonSOAPBinding.getParameterFromMessage(CommonSOAPBinding.java:894)
at
org.jboss.ws.core.CommonSOAPBinding.unbindResponseMessage(CommonSOAPBinding.java:634)
at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:380)
at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:302)
... 16 more
[/code]
It would be helpful to get the actual Parse Excpetion from the xml parser instead of this
classcastexcpetion.
Digging through the code i found out that this might occur because the MessageFectory to
parse the response is initialized with ignoreParseErrors = true. e.g in the
SOAPMessageUnMarshallerHTTP at line 82 (source .3.1.1.GA)
[code]
MimeHeaders mimeHeaders = getMimeHeaders(metadata);
soapMsg = getMessageFactory().createMessage(mimeHeaders, inputStream, true);
[/code]
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira