[
https://issues.apache.org/jira/browse/CAMEL-11099?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Zoran Regvart resolved CAMEL-11099.
-----------------------------------
Resolution: Fixed
Assignee: Zoran Regvart
Fix Version/s: 2.19.0
Merged to master from [PR#1589|https://github.com/apache/camel/pull/1589]
> 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
> Assignee: Zoran Regvart
> Priority: Minor
> Fix For: 2.19.0
>
>
> 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)