camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From camelraj <rajesh.thodukul...@gmail.com>
Subject Re: Isssue using POJO data format with Camel
Date Mon, 13 Aug 2012 23:13:46 GMT
Thank you . I created route like this but I got ctuck as I am getting error
while invoking web service..any idea ?

Route
-----

<import resource=*"classpath:META-INF/cxf/cxf.xml"*/>

<import resource=*"classpath:META-INF/cxf/cxf-servlet.xml"*/>

<import resource=*"classpath:META-INF/cxf/cxf-extension-soap.xml"*/>

<bean id=*"processor1"* class=*"camel.router.Processor1"*/>

<bean id=*"processor"* class=*"camel.SomeProcessor"*/>

<cxf:cxfEndpoint id=*"routerEndpoint"* address=*"
http://localhost:8080/hello-ws/HelloWorld"* serviceClass=*
"demo.spring.service.HelloWorld"*/>

<camelContext id=*"test_context"* xmlns=*"
http://camel.apache.org/schema/spring"*>

<dataFormats>

<jaxb id=*"jaxb"* contextPath=*"pojo"*/>

</dataFormats>

<route>

<from uri=*"file:C:\data\inbox?noop=true"*/>

<unmarshal ref=*"jaxb"*/>

<process ref=*"processor"*/>

<setHeader headerName=*"operationName"*>

<constant>echo</constant>

</setHeader>

<to uri=*"cxf:bean:routerEndpoint"*/>

</route>

</camelContext>


Exception from Tomcat
-----------------------------------


12/08/13 16:09:30 WARN phase.PhaseInterceptorChain: Interceptor for {
http://service.spring.demo/}HelloWorldImplService#{http://service.spring.demo/}echohas
thrown exception, unwinding now
*

java.lang.NullPointerException
*

at org.apache.cxf.service.invoker.AbstractInvoker.invoke(*
AbstractInvoker.java:56*)

at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(*
ServiceInvokerInterceptor.java:58*)

at java.util.concurrent.Executors$RunnableAdapter.call(*Executors.java:441*)

at java.util.concurrent.FutureTask$Sync.innerRun(*FutureTask.java:303*)

at java.util.concurrent.FutureTask.run(*FutureTask.java:138*)

at org.apache.cxf.workqueue.SynchronousExecutor.execute(*
SynchronousExecutor.java:37*)

at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(*
ServiceInvokerInterceptor.java:107*)

at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(*
PhaseInterceptorChain.java:262*)

at org.apache.cxf.transport.ChainInitiationObserver.onMessage(*
ChainInitiationObserver.java:122*)

at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(*
AbstractHTTPDestination.java:211*)

at org.apache.cxf.transport.servlet.ServletController.invokeDestination(*
ServletController.java:213*)

at org.apache.cxf.transport.servlet.ServletController.invoke(*
ServletController.java:193*)

at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(*
CXFNonSpringServlet.java:129*)

at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(*
AbstractHTTPServlet.java:187*)

at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(*
AbstractHTTPServlet.java:110*)

at javax.servlet.http.HttpServlet.service(*HttpServlet.java:637*)

at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(*
AbstractHTTPServlet.java:166*)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(*
ApplicationFilterChain.java:290*)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(*
ApplicationFilterChain.java:206*)

at org.apache.catalina.core.StandardWrapperValve.invoke(*
StandardWrapperValve.java:233*)

at org.apache.catalina.core.StandardContextValve.invoke(*
StandardContextValve.java:191*)

at org.apache.catalina.core.StandardHostValve.invoke(*
StandardHostValve.java:127*)

at org.apache.catalina.valves.ErrorReportValve.invoke(*
ErrorReportValve.java:102*)

at org.apache.catalina.core.StandardEngineValve.invoke(*
StandardEngineValve.java:109*)

at org.apache.catalina.connector.CoyoteAdapter.service(*
CoyoteAdapter.java:291*)

at org.apache.coyote.http11.Http11Processor.process(*
Http11Processor.java:859*)

at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(*
Http11Protocol.java:602*)

at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(*JIoEndpoint.java:489*)

at java.lang.Thread.run(*Thread.java:662*)


Exception while running Test
--------------------------------------------


/08/13 16:09:28 INFO jaxb.JaxbDataFormat: Creating JAXBContext with
contextPath: pojo and ApplicationContextClassLoader:
java.net.URLClassLoader@171bc3f

12/08/13 16:09:28 INFO factory.ReflectionServiceFactoryBean: Creating
Service {http://service.spring.demo/}HelloWorldService from class
demo.spring.service.HelloWorld

12/08/13 16:09:28 INFO spring.SpringCamelContext: Route: route1 started and
consuming from: Endpoint[file://C:%5Cdata%5Cinbox?noop=true]

12/08/13 16:09:28 INFO spring.SpringCamelContext: Total 1 routes, of which
1 is started.

12/08/13 16:09:28 INFO spring.SpringCamelContext: Apache Camel 2.10.0
(CamelContext: test_context) started in 1.140 seconds

Here

Request :James

12/08/13 16:09:30 WARN file.GenericFileOnCompletion: Rollback file
strategy:
org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy@1020230for
file: GenericFile[C:\data\inbox\message1.xml]

12/08/13 16:09:30 ERROR processor.DefaultErrorHandler: Failed delivery for
(MessageId: ID-USPHXRGA1-L-TM-2762-1344899367638-0-3 on ExchangeId:
ID-USPHXRGA1-L-TM-2762-1344899367638-0-2). Exhausted after delivery
attempt: 1 caught: org.apache.cxf.binding.soap.SoapFault: Fault occurred
while processing.

org.apache.cxf.binding.soap.SoapFault: Fault occurred while processing.

at
org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(
*Soap11FaultInInterceptor.java:75*)

at
org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(
*Soap11FaultInInterceptor.java:46*)

at
org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(
*Soap11FaultInInterceptor.java:35*)

at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(*
PhaseInterceptorChain.java:262*)

at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(
*AbstractFaultChainInitiatorObserver.java:107*)

at
org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(
*CheckFaultInterceptor.java:69*)

at
org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(
*CheckFaultInterceptor.java:34*)

at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(*
PhaseInterceptorChain.java:262*)

at org.apache.cxf.endpoint.ClientImpl.onMessage(*ClientImpl.java:783*)

at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(
*HTTPConduit.java:1667*)

at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream$1.run(*
HTTPConduit.java:1525*)

at org.apache.cxf.workqueue.AutomaticWorkQueueImpl$3.run(*
AutomaticWorkQueueImpl.java:371*)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(*
ThreadPoolExecutor.java:886*)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(*
ThreadPoolExecutor.java:908*)

at java.lang.Thread.run(*Thread.java:662*)


On Mon, Aug 13, 2012 at 2:02 PM, michal.warecki [via Camel] <
ml-node+s465427n5717275h45@n5.nabble.com> wrote:

> So, you should first read from the queue i.e.:
> <from uri="activemq:foo"/>
>
> next unmarshall xml i.e.:
>
> <unmarshal>
>       <jaxb contextPath="com.test.test"/>
> </unmarshal>
>
> next send message to cxf web service i.e.:
>
> <setHeader headerName="operationName">
>     <constant>operationTest</constant>
> </setHeader>
> <setHeader headerName="operationNamespace">
>     <constant>http://test.test.com/</constant>
> </setHeader>
>
> <to uri="cxf:bean:serviceEndpoint..." />
>
> Try to rummage a bit of the Camel documentation for examples.
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/Isssue-using-POJO-data-format-with-Camel-tp5717266p5717275.html
>  To unsubscribe from Isssue using POJO data format with Camel, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5717266&code=cmFqZXNoLnRob2R1a3VsYXRoQGdtYWlsLmNvbXw1NzE3MjY2fC0yMDE2NTc1MzY1>
> .
> NAML<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://camel.465427.n5.nabble.com/Isssue-using-POJO-data-format-with-Camel-tp5717266p5717278.html
Sent from the Camel Development mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message