camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem jiang <willem.ji...@gmail.com>
Subject Re: CXFRS Producer
Date Tue, 06 Nov 2012 04:47:34 GMT
Hi,

It looks you didn't setup a right REST service request body. It could be a XML or JSON string.
As you are using CamelCxfRsUsingHttpAPI, you need to build up the request body yourself.

-- 
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang 
Weibo: willemjiang





On Tuesday, November 6, 2012 at 12:43 AM, martin11 wrote:

> Hello,I`m trying call REST web service by using cxfrs component and I got
> following exception:
> [mel-1) thread #0 - timer://foo] idationXmlBeanDefinitionReader INFO 
> Loading XML bean definitions from class path resource [META-INF/cxf/cxf.xml]
> [mel-1) thread #0 - timer://foo] idationXmlBeanDefinitionReader INFO 
> Loading XML bean definitions from class path resource
> [META-INF/cxf/camel/cxf-extension-camel.xml] [mel-1) thread #0 -
> timer://foo] DefaultErrorHandler ERROR Failed delivery for
> (MessageId: ID-asgard-60543-1352132871251-0-1 on ExchangeId:
> ID-asgard-60543-1352132871251-0-2). Exhausted after delivery attempt: 1
> caught: org.apache.camel.CamelExecutionException: Exception occurred during
> execution on the exchange: Exchange[Message: GetSubjectRequest]
> org.apache.camel.CamelExecutionException: Exception occurred during
> execution on the exchange: Exchange[Message: GetSubjectRequest] at
> org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1286)[camel-core-2.10.2.jar:2.10.2]

> at
> org.apache.camel.impl.DefaultExchange.setException(DefaultExchange.java:282)[camel-core-2.10.2.jar:2.10.2]

> at
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:64)[camel-core-2.10.2.jar:2.10.2]

> at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[camel-core-2.10.2.jar:2.10.2]

> at
> org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:122)[camel-core-2.10.2.jar:2.10.2]

> at
> org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:298)[camel-core-2.10.2.jar:2.10.2]

> at
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:117)[camel-core-2.10.2.jar:2.10.2]
> What does mean this exception?Here is my camel context:
> <camel:camelContext> <camel:route id="timer-to-rest"> 
> <camel:from uri="timer://foo?fixedRate=true&amp;amp;period=5s"/> 
> <camel:setExchangePattern pattern="InOut"/> <camel:setHeader
> headerName="CamelCxfRsUsingHttpAPI"> 
> <camel:constant>True</camel:constant> </camel:setHeader> 
> <camel:setHeader headerName="CamelHttpMethod"> 
> <camel:constant>POST</camel:constant> </camel:setHeader> 
> <camel:setBody> 
> <camel:constant>GetSubjectRequest</camel:constant> </camel:setBody>

> <camel:to uri="cxfrs://http://192.168.1.93/system/ws-edit/3/call"/> 
> <camel:process ref="processor"/> </camel:route> </camel:camelContext>
> What is the problem? How looks correct XML configuration for REST service?
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/CXFRS-Producer-tp5722162.html
> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).




Mime
View raw message