camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mac <>
Subject Re: Camel SoapFault marshalling classcast exception
Date Tue, 03 May 2016 11:37:42 GMT
I just tried on a different server, Tomcat 8.0.33.
Same problem, getting 
java.lang.ClassCastException: cannot be cast to
javax.xml.bind.JAXBElement at Line 195 in Soap11DataFormatAdapter.

It seems to be failing trying decoding
org.xmlsoap.schemas.soap.envelope.Detail.any field. It contains
ElementNSImpl instead of JAXBElement.

I was trying to register a custom JAXB element using a objectfactory class
as follows, that would hopefully handle the unkown 'text' tag:

public class ObjectFactory {
	@XmlElementDecl( name= "text")
    JAXBElement<String> createText(String value) {
        return new JAXBElement<String>(new QName("text"), String.class,

How do I register the objectfactory on top of the route I have configured as

String contextPath = MultiTranRequest.class.getPackage().getName();
ElementNameStrategy elementNameStrategy = new
ServiceInterfaceStrategy(MultiTransactionMSPortType.class, true);

SoapJaxbDataFormat soapJaxbDataFormat = new SoapJaxbDataFormat(contextPath,

Is there a way on to register a global ObjectFactory on the

or is there something else I should be looking at??

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message