Re: JSON to XML Conversion

2015-09-02 Thread Raul Kripalani
I'm not suggesting that you use JAXB. I just wanted you to try defining the JSON to XML data format nested inside the unmarshal. On 2 Sep 2015 02:06, "anish.somadevan" wrote: > Am actually trying to convert a JSON response from an API to XML, and i > don't > think it can be done using JAXB. Pleas

Re: JSON to XML Conversion

2015-09-01 Thread anish.somadevan
This works!! . Thanks a lot Yogesh and Raul for helping me resolve this :) Really appreciate it. PS. Am facing a similar issue related to registry (http://camel.465427.n5.nabble.com/PEM-File-for-Authentication-in-route-td5771084.html#a5771109). It would be really helpful if you can have a look at

Re: JSON to XML Conversion

2015-09-01 Thread anish.somadevan
Am actually trying to convert a JSON response from an API to XML, and i don't think it can be done using JAXB. Please correct me if am wrong. -- View this message in context: http://camel.465427.n5.nabble.com/JSON-to-XML-Conversion-tp5771032p5771141.html Sent from the Camel - Users mailing li

Re: JSON to XML Conversion

2015-09-01 Thread Raul Kripalani
You don't need to use ref. Have a look at the first XML example for the JAXB data format here: http://camel.apache.org/jaxb.html. Raúl. No On 2 Sep 2015 01:25, "anish.somadevan" wrote: > Am not sure if i have implemented it as you said. This is what i have in my > route now, > > http://camel.apa

Re: JSON to XML Conversion

2015-09-01 Thread anish.somadevan
Am not sure if i have implemented it as you said. This is what i have in my route now, http://camel.apache.org/schema/spring";> I still get the same error Failed to create route parseJSON at: >>> Unmarshal[ref:xmljsonWithOptions] <<

Re: JSON to XML Conversion

2015-09-01 Thread Raul Kripalani
Aha! So you are using the XML approach to load your routes. You can define data formats in two places: either (a) inside your Camel Context, which, if you are using exactly this approach [1], is being configured programmatically, or (b) inline inside your marshal / unmarshal XML element. I would

Re: JSON to XML Conversion

2015-09-01 Thread anish.somadevan
I currently have this as the first line in my XML. http://camel.apache.org/schema/spring";> And then i have defined the camelContext tags, When i tried to give camelContext as the first line, I get this error unexpected element (uri:"http://camel.apache.org/schema/spring";, local:

Re: JSON to XML Conversion

2015-09-01 Thread anish.somadevan
Yes, i have it within the camelContext tags. But i get the same error as mentioned earlier, [com.acp.adapter.cameladapter.CamelOutboundAdapter] (Camel (camelAgent) thread #6 - JmsConsumer[ISEEOutboundQueue]) CamelOutboundAdapter exception: Failed to create route parseJSON at: >>> Unmarshal[ref:x

Re: JSON to XML Conversion

2015-08-30 Thread anish.somadevan
Yes, i do have camel-xmljson 2.10.3 JAR in my classpath -- View this message in context: http://camel.465427.n5.nabble.com/JSON-to-XML-Conversion-tp5771032p5771088.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JSON to XML Conversion

2015-08-30 Thread Raul Kripalani
Do you have camel-xmljson in your classpath? Regards, Raúl. On 30 Aug 2015 22:38, "anish.somadevan" wrote: > Hi Yogesh, > > I did define it as you mentoned, and referenced it in my route as given > below, > > > > trimSpaces="true" rootName="newRoot" skipNamespaces="true" >

Re: JSON to XML Conversion

2015-08-28 Thread anish.somadevan
Am using Spring, but i don't have any bean with the name "XmljsonWithOptions". I typically want to do the JSON to XML conversion within the DSL XML. Is there a way to do it? Thanks, Anish -- View this message in context: http://camel.465427.n5.nabble.com/JSON-to-XML-Conversion-tp5771032p577107