Thanks Yashwanth. It seems like this is an issue in Axiom 1.2.14, because both 
the SOAPFault11Impl and OMElementImpl are classes in Axiom 1.2.14. Does this 
mean this a bug?

Sumit

From: Yashwanth Rajaram -X (yrajaram - ZENSAR TECHNOLOGIES INC at Cisco) 
[mailto:yraja...@cisco.com]
Sent: Tuesday, March 12, 2013 1:35 PM
To: java-user@axis.apache.org
Subject: RE: java.lang.ClassCastException: 
org.apache.axiom.om.impl.llom.OMElementImpl cannot be cast to 
org.apache.axiom.soap.SOAPFaultDetail

Sumit, I think you might have to do something like this:


SOAPFaultDetail detail = 
OMAbstractFactory.getSOAP11Factory().createSOAPFaultDetail();

detail.addChild(getFirstChildWithName(SOAP11Constants.QNAME_FAULT_DETAIL));

Sincerely, Yashwanth
Technical Architect, EBIS

From: Shah, Sumit (CGI Federal) [mailto:sumit.s...@cgifederal.com]
Sent: Tuesday, March 12, 2013 8:16 AM
To: java-user@axis.apache.org<mailto:java-user@axis.apache.org>
Subject: java.lang.ClassCastException: 
org.apache.axiom.om.impl.llom.OMElementImpl cannot be cast to 
org.apache.axiom.soap.SOAPFaultDetail

Hi,

I am running into the following ClassCastException running Axis2 1.6.2 and 
Axiom 1.2.14 (I have also included the axiom-compat jar for backwards 
compatibility). I noticed a similar issue reported for Synapse/Carbon 
https://wso2.org/jira/browse/CARBON-13759. I am not sure if these are related.


java.lang.ClassCastException: org.apache.axiom.om.impl.llom.OMElementImpl 
cannot be cast to org.apache.axiom.soap.SOAPFaultDetail

Its occurring here in the SOAP11FaultImpl:

public SOAPFaultDetail getDetail() {
        return (SOAPFaultDetail) 
getFirstChildWithName(SOAP11Constants.QNAME_FAULT_DETAIL);
}

I see that getFirstChildWithName() currently returns an OMELement, however the 
cast above fails. I would appreciate any suggestions.

Thanks
Sumit
  • java.la... Shah, Sumit (CGI Federal)
    • RE... Yashwanth Rajaram -X (yrajaram - ZENSAR TECHNOLOGIES INC at Cisco)
      • ... Shah, Sumit (CGI Federal)
        • ... Andreas Veithen
          • ... Shah, Sumit (CGI Federal)
            • ... Andreas Veithen
              • ... Shah, Sumit (CGI Federal)

Reply via email to