Details
-
Type:
Bug
-
Status: Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 2.19.0
-
Component/s: camel-soap
-
Labels:None
-
Estimated Complexity:Unknown
Description
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 :
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)
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
Attachments
Issue Links
- links to