camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sonyvgeorge <sony.s...@emirates.com>
Subject Issue Facing with Camel Webservice
Date Tue, 28 Feb 2012 05:46:36 GMT
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&lt;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"
                   wsdlURL="wsdl/CamelSourceImpl.wsdl"
                   endpointName="s:CamelSourceImpl"
                   serviceName="s:CamelSourceImplService"
                   xmlns:s="http://webservice.schedule.emirates.org"/>

Camel Context on Sping Context file:-
	
	<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
	
                   <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}CamelSourceImplService#{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(XMLStreamDataWriter.java:83)
	at
org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:50)
	at
org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:46)
	at
org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:119)
	at
org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68)
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.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.getLowfareAvailabilities(JMSLowFareAvailabilityServiceProxy.java:76)
	at
org.emirates.shopping.services.BudgetBasedAvailabilityServiceImpl.getLowFareAvailability(BudgetBasedAvailabilityServiceImpl.java:45)
	at
org.emirates.shopping.FlightDetailController.onSearch(FlightDetailController.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.invokeHandlerMethod(HandlerMethodInvoker.java:176)
	at
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436)
	at
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:424)
	at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
	at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
	at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.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(ApplicationFilterChain.java:304)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
	at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.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:405)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:279)
	at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
	at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java: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.getLowfareAvailabilities(JMSLowFareAvailabilityServiceProxy.java:76)
	at
org.emirates.shopping.services.BudgetBasedAvailabilityServiceImpl.getLowFareAvailability(BudgetBasedAvailabilityServiceImpl.java:45)
	at
org.emirates.shopping.FlightDetailController.onSearch(FlightDetailController.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.invokeHandlerMethod(HandlerMethodInvoker.java:176)
	at
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436)
	at
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:424)
	at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
	at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
	at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.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(ApplicationFilterChain.java:304)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
	at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.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:405)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:279)
	at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
	at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java: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(XMLStreamDataWriter.java:83)
	at
org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:50)
	at
org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:46)
	at
org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:119)
	at
org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68)
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.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

--
View this message in context: http://camel.465427.n5.nabble.com/Issue-Facing-with-Camel-Webservice-tp5520899p5520899.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message