You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by apatel <ap...@asg.bellsouth.net> on 2013/05/10 16:08:15 UTC

Setting Body in restlet route without to does not work

Below route does not return body, because route don't have any <to url


<route id="testLanguageFile" xmlns="http://camel.apache.org/schema/spring"
trace="true">
  <from uri="restlet:/myRestfulService/1.0/operationA?restletMethod=get"/>
  <setBody>
    <groovy>"Restful test" </groovy>
  </setBody>
 
</route>


Below route does return body, because route does have  <to uri="mock:result"
/>

<route id="testLanguageFile" xmlns="http://camel.apache.org/schema/spring"
trace="true">
  <from uri="restlet:/myRestfulService/1.0/operationA?restletMethod=get"/>
  <setBody>
    <groovy>"Restful test" </groovy>
  </setBody>
  
   <to uri="mock:result" />
</route>

I know <to url set exchange in to exchange out, but why camel-restlet
component default set exchange.out= exchange.in? 

 




--
View this message in context: http://camel.465427.n5.nabble.com/Setting-Body-in-restlet-route-without-to-does-not-work-tp5732285.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Setting Body in restlet route without to does not work

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Yeah its the same problem in servlet. Thanks for reporting. I have
logged a ticket
https://issues.apache.org/jira/browse/CAMEL-6350

On Fri, May 10, 2013 at 11:23 PM, apatel <ap...@asg.bellsouth.net> wrote:
> Appreciated for your help! Same issue occurred in servlet route also.
>
>
> Below route doen't return body
>
> <route id="testLanguageFile" xmlns="http://camel.apache.org/schema/spring"
> trace="true">
>   <from uri="servlet:/myServletService/1.0/operationA"/>
>
>   <setBody>
>     <groovy>"Servlet test" </groovy>
>   </setBody>
>
> </route>
>
> Below route returns body Servlet test
>
> <route id="testLanguageFile" xmlns="http://camel.apache.org/schema/spring"
> trace="true">
>   <from uri="servlet:/myServletService/1.0/operationA"/>
>
>   <setBody>
>    <groovy>"Servlet test" </groovy>
>   </setBody>
>    <to uri="mock:result" />
> </route>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Setting-Body-in-restlet-route-without-to-does-not-work-tp5732285p5732306.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Setting Body in restlet route without to does not work

Posted by apatel <ap...@asg.bellsouth.net>.
Appreciated for your help! Same issue occurred in servlet route also.


Below route doen't return body

<route id="testLanguageFile" xmlns="http://camel.apache.org/schema/spring"
trace="true">
  <from uri="servlet:/myServletService/1.0/operationA"/>
   
  <setBody>
    <groovy>"Servlet test" </groovy>
  </setBody>
   
</route>

Below route returns body Servlet test

<route id="testLanguageFile" xmlns="http://camel.apache.org/schema/spring"
trace="true">
  <from uri="servlet:/myServletService/1.0/operationA"/>
   
  <setBody>
   <groovy>"Servlet test" </groovy>
  </setBody>
   <to uri="mock:result" />
</route>




--
View this message in context: http://camel.465427.n5.nabble.com/Setting-Body-in-restlet-route-without-to-does-not-work-tp5732285p5732306.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Setting Body in restlet route without to does not work

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Yeah its a little bug I have logged a ticket
https://issues.apache.org/jira/browse/CAMEL-6349

On Fri, May 10, 2013 at 4:08 PM, apatel <ap...@asg.bellsouth.net> wrote:
>
> Below route does not return body, because route don't have any <to url
>
>
> <route id="testLanguageFile" xmlns="http://camel.apache.org/schema/spring"
> trace="true">
>   <from uri="restlet:/myRestfulService/1.0/operationA?restletMethod=get"/>
>   <setBody>
>     <groovy>"Restful test" </groovy>
>   </setBody>
>
> </route>
>
>
> Below route does return body, because route does have  <to uri="mock:result"
> />
>
> <route id="testLanguageFile" xmlns="http://camel.apache.org/schema/spring"
> trace="true">
>   <from uri="restlet:/myRestfulService/1.0/operationA?restletMethod=get"/>
>   <setBody>
>     <groovy>"Restful test" </groovy>
>   </setBody>
>
>    <to uri="mock:result" />
> </route>
>
> I know <to url set exchange in to exchange out, but why camel-restlet
> component default set exchange.out= exchange.in?
>
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Setting-Body-in-restlet-route-without-to-does-not-work-tp5732285.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Setting Body in restlet route without to does not work

Posted by Claus Ibsen <cl...@gmail.com>.
What version of Camel do you use?

On Fri, May 10, 2013 at 4:08 PM, apatel <ap...@asg.bellsouth.net> wrote:
>
> Below route does not return body, because route don't have any <to url
>
>
> <route id="testLanguageFile" xmlns="http://camel.apache.org/schema/spring"
> trace="true">
>   <from uri="restlet:/myRestfulService/1.0/operationA?restletMethod=get"/>
>   <setBody>
>     <groovy>"Restful test" </groovy>
>   </setBody>
>
> </route>
>
>
> Below route does return body, because route does have  <to uri="mock:result"
> />
>
> <route id="testLanguageFile" xmlns="http://camel.apache.org/schema/spring"
> trace="true">
>   <from uri="restlet:/myRestfulService/1.0/operationA?restletMethod=get"/>
>   <setBody>
>     <groovy>"Restful test" </groovy>
>   </setBody>
>
>    <to uri="mock:result" />
> </route>
>
> I know <to url set exchange in to exchange out, but why camel-restlet
> component default set exchange.out= exchange.in?
>
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Setting-Body-in-restlet-route-without-to-does-not-work-tp5732285.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen