You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Suganya <su...@gmail.com> on 2015/10/02 14:06:56 UTC
Re: curl
Hi Asaf, Claus,
thanks for your replies.
" did not work and i tried few other escape stuffs as well but none seem
to work.
The only way that i was able to pass the json is by using a temporary file.
<setHeader headerName="CamelExecCommandArgs">
<simple>--silent --sslv3 --verbose --cacert {{cacertFile}} --key
{{keyFile}} --cert {{certFile}} -H Content-Type:application/json -u {{user}}
-X POST {{host}}/tenants -d @/003/temp.json</simple>
</setHeader>
<to uri="exec:curl"/>
*In my case, the JSON needs to be framed dynamically. Its not a static json
content. *
*Any idea on how to frame the JSON content dynamically in camel ?*
I have this as the json string --
<setHeader headerName="JSON1">
<xpath resultType="java.lang.String">/response/JSONString</xpath>
</setHeader>
*I get this above JSON string from one of the external components.
how to write this string to the file and rewrite it everytime?*
--
View this message in context: http://camel.465427.n5.nabble.com/curl-tp5771624p5772180.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: curl
Posted by Suganya <su...@gmail.com>.
I tried below,
<setBody><simple>testingsimple></setBody>
<to uri="file:/003/?fileName=temp.json" />
but getting the below error stating
caught: org.apache.camel.language.bean.RuntimeBeanExpressionException:
Failed to invoke method: .stdout on null due to:
org.apache.camel.language.bean.RuntimeBeanExpressionException: Failed to
invoke method: stdout on null due to:
org.apache.camel.component.bean.MethodNotFoundException: Method with name:
stdout not found on bean: testing of type: java.lang.String.
Exchange[Message: testing]:
org.apache.camel.language.bean.RuntimeBeanExpressionException: Failed to
invoke method: .stdout on null due to:
org.apache.camel.language.bean.RuntimeBeanExpressionException: Failed to
invoke method: stdout on null due to:
org.apache.camel.component.bean.MethodNotFoundException: Method with name:
stdout not found on bean: testing of type: java.lang.String.
Exchange[Message: testing]
Please help me out. I tried many other stuffs as well but none seem to work.
--
View this message in context: http://camel.465427.n5.nabble.com/curl-tp5771624p5772195.html
Sent from the Camel - Users mailing list archive at Nabble.com.