camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Fullarton (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CAMEL-11099) Unhandled ClassCastException if fault detail is not JaxbElement
Date Sun, 02 Apr 2017 23:59:41 GMT
Daniel Fullarton created CAMEL-11099:
----------------------------------------

             Summary: Unhandled ClassCastException if fault detail is not JaxbElement
                 Key: CAMEL-11099
                 URL: https://issues.apache.org/jira/browse/CAMEL-11099
             Project: Camel
          Issue Type: Bug
          Components: camel-soap
            Reporter: Daniel Fullarton
            Priority: Minor


Hi,

I've been having some issues with handling some SOAP faults that come in with a detail message
that is undefined in their WSDL, the result is that they end up as xerces dom elements rather
than JAXBElements.

I end up with a pretty ugly message that looks like this : 
{noformat}
java.lang.ClassCastException: com.sun.org.apache.xerces.internal.dom.ElementNSImpl cannot
be cast to javax.xml.bind.JAXBElement
	at org.apache.camel.dataformat.soap.Soap11DataFormatAdapter.createExceptionFromFault(Soap11DataFormatAdapter.java:195)
	at org.apache.camel.dataformat.soap.Soap11DataFormatAdapter.doUnmarshal(Soap11DataFormatAdapter.java:170)
	at org.apache.camel.dataformat.soap.SoapJaxbDataFormat.unmarshal(SoapJaxbDataFormat.java:287)
	at org.apache.camel.processor.UnmarshalProcessor.process(UnmarshalProcessor.java:69)
	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:460)
	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
{noformat}

It's pretty had to intercept this in the pipeline, so at the moment I've handled parsing the
response myself rather than the soap dataformat, but I would like to avoid this in the future
as it does require a bit of custom code.

I'll create a PR that demonstrates what I believe is a reasonable workaround.

Cheers,
Daniel




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message