camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ritwick <>
Subject Issue with Camel
Date Mon, 30 Jun 2014 21:33:46 GMT
I am new to Camel and am facing an issue with a route I need to setup. It
will be great if someone can either guide me to the correct forum or better
still rectify the issue I am facing. 
Here is what I need to do - expose a restlet endpoint to accept data; use
this data as input to an external SOAP web service and send back the
response in JSON format back to the caller... 
Here is what I have done...however, I am getting the following error while
Camel tries to call the Web Service...can anyone guide me here? Thanks. 

2014-06-30 14:09:24,987 [tlet-1846031557] WARN  PhaseInterceptorChain         
- Interceptor for
has thrown exception, unwinding now 
java.lang.ClassCastException: ClassCastException invoking cannot be cast to java.lang.String 

public class IntegrationTest extends CamelTestSupport { 

    public void integTest() throws Exception { 
    //trying to simulate the rest service call... 
"Body does not matter here", "data",

    protected RouteBuilder createRouteBuilder() throws Exception { 
        return new RouteBuilder() { 
            public void configure() throws Exception { 
            System.out.println("In Counfigure"); 

        String cxfEndpoint =
        + "wsdlURL=" 
        + "serviceName={http://www.webserviceX.NET/}CurrencyConvertor&" 
        + "portName={http://www.webserviceX.NET/}CurrencyConvertorSoap&" 
        + "dataFormat=MESSAGE"; 
        XmlJsonDataFormat xmlJsonFormat = new XmlJsonDataFormat(); 
        SoapJaxbDataFormat soap = new SoapJaxbDataFormat("net.webservicex",
new ServiceInterfaceStrategy(CurrencyConvertorSoap.class, true)); 

         GsonDataFormat gson = new GsonDataFormat(ConversionRate.class); 

                                .process(new Processor() { 
                                        public void process(Exchange
exchange) throws Exception { 
                                                String data = (String)
URLDecoder.decode((String) exchange.getIn().getHeader("data"), "UTF-8"); 
                                                // get the mail body as a

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

View raw message