Message Transformation for JSON

2013-12-08 Thread madusanka
Hi,

We can transform the XML format using XSLT. Likewise is there a way to
transform JSON format?



--
View this message in context: 
http://camel.465427.n5.nabble.com/Message-Transformation-for-JSON-tp5744433.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: ActiveMQ asyncConsumer problem

2013-12-08 Thread hollow1351
hm, I noticed that sometimes camel starts to consume messages in multiple
threads, 2 or 3 (I set 10 concurrent consumers), but more often in 1. it
seems there is not enough time to init consumers pool before route starts. I
add an asyncDelayed of 1 second to the route and now it works correct, but
looks like a trick. is it another way to say camel to start consuming only
when all consumers completely initialized?



--
View this message in context: 
http://camel.465427.n5.nabble.com/ActiveMQ-asyncConsumer-problem-tp5744405p5744434.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Message Transformation for JSON

2013-12-08 Thread Dharmendra Patel
Hi there,
Can you please clarify the source and target data format.


On Mon, Dec 9, 2013 at 3:12 AM, madusanka wrote:

> Hi,
>
> We can transform the XML format using XSLT. Likewise is there a way to
> transform JSON format?
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Message-Transformation-for-JSON-tp5744433.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: Message Transformation for JSON

2013-12-08 Thread madusanka
Hi,

source and target data formats are also JSON



--
View this message in context: 
http://camel.465427.n5.nabble.com/Message-Transformation-for-JSON-tp5744433p5744490.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: stupid pipeline question

2013-12-08 Thread Willem Jiang
Can you double check if the message body can be converted rightly?
I think you can enable the trace[1] and check the log to see what is wrong.

[1]http://camel.apache.org/tracer.html

-- 
Willem Jiang
Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
          http://jnn.iteye.com (Chinese)
Twitter: willemjiang 
Weibo: 姜宁willem


On December 7, 2013 at 7:21:33 AM, tapdur (tapdu...@gmail.com) wrote:
>
>hi all
>
>when i use a route with cxfEndpoint like this it works fine
>
>
>
>
>
>the to response is well returned in the grom response.
>
>however, if i want to insert a mapper before and/or after the to uri i lost
>the body, why ???
>
>
>
>
>
>
>
>>
>
>
>may i use transform ? to return a com.a.response to the from messasge ?
>
>
>thx a lot
>
>bruno
>
>
>
>
>--
>View this message in context: 
>http://camel.465427.n5.nabble.com/stupid-pipeline-question-tp5744415.html
>Sent from the Camel - Users mailing list archive at Nabble.com.
>



Re: CXF EndPoint Vs Processor

2013-12-08 Thread Willem Jiang
It’s dependence on do you want to hold the reference of client invocation proxy 
and how do you prepare the request for invocation.
The processor way provides you a way to integrate the web service invocation 
code within camel route, you need to take care of everything yourself.
You don’t need create the web service proxy yourself if you use the cxf 
endpoint .


-- 
Willem Jiang
Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
          http://jnn.iteye.com (Chinese)
Twitter: willemjiang 
Weibo: 姜宁willem


On December 7, 2013 at 11:42:41 AM, trilochan237 
(kartheektrilochan...@gmail.com) wrote:
>
>Hi,
>
>Can someone tell me which is the best approach for calling an external
>webservice?
>After going through the examples from camel website i got to know that a
>call can be made from the processor and also by creating a CXFEndpoint.
>
>
>
>--
>View this message in context: 
>http://camel.465427.n5.nabble.com/CXF-EndPoint-Vs-Processor-tp5744417.html
>Sent from the Camel - Users mailing list archive at Nabble.com.
>



Re: Passing multiple parameters to CXF endpoint

2013-12-08 Thread Willem Jiang
You can use Spring to configure the CXF endpoint like this

http://www.springframework.org/schema/beans";
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
       xmlns:cxf="http://camel.apache.org/schema/cxf";
       xmlns:http-conf="http://cxf.apache.org/transports/http/configuration";
       xsi:schemaLocation="
       http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd
       http://camel.apache.org/schema/cxf 
http://camel.apache.org/schema/cxf/camel-cxf.xsd
       http://cxf.apache.org/transports/http/configuration 
http://cxf.apache.org/schemas/configuration/http-conf.xsd
       http://camel.apache.org/schema/spring 
http://camel.apache.org/schema/spring/camel-spring.xsd
    ">
 
   

   

   http://localhost:9000/CxfTimeoutTest/SoapContext/SoapPort";
    serviceClass="org.apache.hello_world_soap_http.Greeter”/>




The camel route can be 
from(“dirt:start”).to(“cxf:bean:sprintEndpoint”)

-- 
Willem Jiang
Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
          http://jnn.iteye.com (Chinese)
Twitter: willemjiang 
Weibo: 姜宁willem


On December 7, 2013 at 11:36:36 AM, trilochan237 
(kartheektrilochan...@gmail.com) wrote:
>
>Hi Willem,
>
>If i use the client program example from camel cxf examples and set the
>content type in HTTPClientPolicy,
>but could you please tell me how to set the same in Exchange type when
>calling the webservice by creating a CXFendpoint
>
>
>*CLient Program:-*
>
>JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
>.
>.
>.
>Client client = ClientProxy.getClient(port);
>HTTPConduit http = (HTTPConduit) client.getConduit();
>HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
>* httpClientPolicy.setContentType("application/soap+xml");*
>http.setClient(httpClientPolicy);
>
>...
>..
>client.retrieve(arg1,arg2,arg3);
>
>
>
>*Cxf Endpoint:-*
>
>from("direct:test").process(new Processor(){
>public void processor(Exchange exchange)
>{
>Object[] objectarray=new Object[3];
>.
>.
>.
>exchange.getOut().setBody(objarry);
>}
>}).to("cxf://http://10.103.91.55:/FinEdge-General/xrmServices/2011/Organization.svc?serviceClass=com.hcl.flsl.integration.msdn.crmwcf.IOrganizationService&defaultOperationName=Retrieve";)
>
>
>
>
>--
>View this message in context: 
>http://camel.465427.n5.nabble.com/Passing-multiple-parameters-to-CXF-endpoint-tp5744345p5744416.html
>Sent from the Camel - Users mailing list archive at Nabble.com.
>