Hi Guys,
I am new to Camel Integration. Please help me to resolve this issue. We are doing a HoneyComp Architecture Project and For Integrating each cell we are using Camel Inetgration. I Facing below issue while doing Camel Webservice. I have implemented apache-camel-2.9.0/examples/camel-example-cxf Provider program Sucessfully,here we are passing as in Message Mode. In My case i have to pass a List of Java Bean Object . I Made the dispatch type as List :- Dispatch<List> dispatch = service.createDispatch(portName, List.class,Service.Mode.PAYLOAD); Calling the invoke method by passing List dispatch.invoke(<<List<flightQuery>>); On Consumer Part :- public class GreeterProvider implements Provider<List> { @Override public List invoke(List request) { // TODO Auto-generated method stub throw new UnsupportedOperationException("Placeholder method"); } EndPoint Defined as Follows :- <cxf:cxfEndpoint id="soapMessageEndpoint" serviceClass="org.emirates.schedule.webservice.GreeterProvider" address="http://localhost:8080/schedule/services/CamelSourceImpl" <http://localhost:8080/schedule/services/CamelSourceImpl%22> wsdlURL="wsdl/CamelSourceImpl.wsdl" endpointName="s:CamelSourceImpl" serviceName="s:CamelSourceImplService" xmlns:s="http://webservice.schedule.emirates.org"/> <http://webservice.schedule.emirates.org%22/%3E> Camel Context on Sping Context file:- <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"> <http://camel.apache.org/schema/spring%22%3E> <route> <from uri="cxf:bean:soapMessageEndpoint"/> <to uri="bean:testBean?method=processSOAP"/> </route> </camelContext> I am facing below issue while Invoking. Can any one please help me on this regard? Send out the request: Hello Camel!! WARN : org.apache.cxf.phase.PhaseInterceptorChain - Interceptor for {http://webservice.schedule.emirates.org <http://webservice.schedule.emirates.org> }CamelSourceImplService#{http://cxf.apache.org/jaxws/dispatch <http://cxf.apache.org/jaxws/dispatch> }Invoke has thrown exception, unwinding now java.lang.ClassCastException: com.emirates.common.dataobject.FlightQuery cannot be cast to javax.xml.transform.Source at org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDat aWriter.java:83) at org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDat aWriter.java:50) at org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDat aWriter.java:46) at org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts( AbstractOutDatabindingInterceptor.java:119) at org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInter ceptor.java:68) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC hain.java:263) at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:533) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319) at org.apache.cxf.endpoint.ClientImpl.invokeWrapped(ClientImpl.java:354) at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:381) at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:241) at org.emirates.availability.proxy.JMSLowFareAvailabilityServiceProxy.getLo wfareAvailabilities(JMSLowFareAvailabilityServiceProxy.java:76) at org.emirates.shopping.services.BudgetBasedAvailabilityServiceImpl.getLow FareAvailability(BudgetBasedAvailabilityServiceImpl.java:45) at org.emirates.shopping.FlightDetailController.onSearch(FlightDetailContro ller.java:89) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.inv okeHandlerMethod(HandlerMethodInvoker.java:176) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAd apter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAd apter.handle(AnnotationMethodHandlerAdapter.java:424) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherS ervlet.java:790) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherSe rvlet.java:719) at org.springframework.web.servlet.FrameworkServlet.processRequest(Framewor kServlet.java:669) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet .java:585) at javax.servlet.http.HttpServlet.service(HttpServlet.java:641) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:304) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:224) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:175) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator Base.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :164) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929 ) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:4 05) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:27 9) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(Abs tractProtocol.java:515) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.j ava:300) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) javax.xml.ws.soap.SOAPFaultException: com.emirates.common.dataobject.FlightQuery cannot be cast to javax.xml.transform.Source at org.apache.cxf.jaxws.DispatchImpl.mapException(DispatchImpl.java:285) at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:388) at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:241) at org.emirates.availability.proxy.JMSLowFareAvailabilityServiceProxy.getLo wfareAvailabilities(JMSLowFareAvailabilityServiceProxy.java:76) at org.emirates.shopping.services.BudgetBasedAvailabilityServiceImpl.getLow FareAvailability(BudgetBasedAvailabilityServiceImpl.java:45) at org.emirates.shopping.FlightDetailController.onSearch(FlightDetailContro ller.java:89) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.inv okeHandlerMethod(HandlerMethodInvoker.java:176) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAd apter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAd apter.handle(AnnotationMethodHandlerAdapter.java:424) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherS ervlet.java:790) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherSe rvlet.java:719) at org.springframework.web.servlet.FrameworkServlet.processRequest(Framewor kServlet.java:669) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet .java:585) at javax.servlet.http.HttpServlet.service(HttpServlet.java:641) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:304) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:224) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:175) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator Base.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :164) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929 ) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:4 05) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:27 9) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(Abs tractProtocol.java:515) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.j ava:300) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.ClassCastException: com.emirates.common.dataobject.FlightQuery cannot be cast to javax.xml.transform.Source at org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDat aWriter.java:83) at org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDat aWriter.java:50) at org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDat aWriter.java:46) at org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts( AbstractOutDatabindingInterceptor.java:119) at org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInter ceptor.java:68) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC hain.java:263) at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:533) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319) at org.apache.cxf.endpoint.ClientImpl.invokeWrapped(ClientImpl.java:354) at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:381) ... 33 more Thanks Sony