I'm using Camel 2.12 and have a standalone Camel instance.

One of the routes is an http endpoint that expects a post body containing a
SOAP envelope that then needs to unmarshall the soap, marshall it into Json
and hand it off to another endpoint that expects Json:

ServiceInterfaceStrategy strategy =  new
ServiceInterfaceStrategy(MyService.class, true);
SoapJaxbDataFormat soapDataFormat = new
SoapJaxbDataFormat("com.foo.bar.listings", strategy);
        
        from("jetty:http://0.0.0.0:2018";)
        .unmarshal(soapDataFormat)
        .marshal().json(JsonLibrary.Jackson)
        .setHeader(Exchange.CONTENT_TYPE, constant("application/json"))
        .setHeader(Exchange.HTTP_METHOD, constant("POST"))
        .to("direct:dbUpdate");

Hoewever on startup my Camel does this:

14:40:12.059 [main] INFO  o.a.camel.impl.DefaultCamelContext - Apache Camel
2.12.1 (CamelContext: camel-1) uptime 0.618 seconds
14:40:12.059 [main] INFO  o.a.camel.impl.DefaultCamelContext - Apache Camel
2.12.1 (CamelContext: camel-1) is shutdown in 0.007 seconds
14:40:12.060 [main] INFO  org.apache.camel.main.MainSupport - Apache Camel
2.12.1 stopping
Exception in thread "main" org.apache.camel.FailedToCreateRouteException:
Failed to create route route2 at: >>>
Unmarshal[org.apache.camel.model.dataformat.SoapJaxbDataFormat@2495561] <<<
in route: Route(route2)[[From[jetty:http://0.0.0.0:2018]] -> [process[...
because of Failed to set property: elementNameStrategy on:
org.apache.camel.dataformat.soap.SoapJaxbDataFormat@4babe507. Reason:
java.lang.IllegalArgumentException: Could not find a suitable setter for
property: elementNameStrategy as there isn't a setter method with same type:
java.lang.Class nor type conversion possible: The argument for
setElementNameStrategy should be subClass of
org.apache.camel.dataformat.soap.name.ElementNameStrategy
        at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:912)
        at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:177)
        at
org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:770)
        at
org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1914)
        at
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1670)
        at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1544)
        at
org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
        at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1512)
        at org.apache.camel.main.Main.doStart(Main.java:109)
        at
org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
        at org.apache.camel.main.MainSupport.run(MainSupport.java:148)
        at com.disney.prometheus.Driver.startDriver(Driver.java:35)
        at com.disney.prometheus.Driver.main(Driver.java:46)

What am I missing?




--
View this message in context: 
http://camel.465427.n5.nabble.com/SOAP-tp5746679.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to