You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Tootell, James" <jc...@anteon.com> on 2005/08/26 19:17:11 UTC

ClassCastException After Upgrade From Axis 1.1 to 1.2.1

All:

I wrote a webservice client a year ago using a combination of Axis 1.1
to handle transmissions and Castor 0.9.7 to handle un/marshalling.  We
recently decided to upgrade to Axis 1.2RC3 and forgo the use of Castor.
I ran WSDL2Java and regenerated all the stub code and supporting classes
and got no compile errors.  At runtime though I consistently get the
following error:

<code>
; nested exception is: 
java.lang.ClassCastException
AxisFault
faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode: 
faultString: java.lang.ClassCastException
faultActor: 
faultNode: 
faultDetail: 
{http://xml.apache.org/axis/}stackTrace:java.lang.ClassCastException
at
org.apache.axis.message.SOAPFaultBuilder.onEndChild(SOAPFaultBuilder.jav
a:299)
at
org.apache.axis.encoding.DeserializationContext.endElement(Deserializati
onContext.java:1090)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source) at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
Source) at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis
patcher.dispatch(Unknown Source) at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno
wn Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at
org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at
javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at
org.apache.axis.encoding.DeserializationContext.parse(DeserializationCon
text.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
at
org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java
:796)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.j
ava:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
...
</code>

My call is failing before I even get it to the wire.  I even upgraded
again from 1.2RC3 to 1.2.1 Final thinking maybe it was a bug in Axis but
still no joy.  I've also tried using newer versions of Xerces but to no
avail.  

The service I'm trying to access is a document-style service.  I have
another 1.2.1 client that accesses an RPC-style service just fine.  This
leads me to believe their might be something wrong in the schemas
supporting the document-style service's WSDL but everything validates
and compiles flawlessly.  Does anyone have any ideas why I'm getting
this error?

Also, I tried inspecting the raw SOAP message just prior to calling
_call.invoke() and _call.getMessageContext()'s .getCurrentMessage() and
getRequestMessage() always return null.  Is this normal?  I wouldn't
think it would be.
 

Thanks in advance, 

Jim Tootell
System Design, Development, 
     & Integration Department
Anteon  Corporation
2251 San Diego Ave.
Suite A240
San Diego, CA  92110
(619) 542-0240 x123
mailto:jctootell@anteon.com 

 

There are 10 kinds of people: 
  those who understand binary and those who don't.