Re: Camel xmlJson not working properly?

2017-03-10 Thread Preben.Asmussen
It depends on your needs. I tend to flatten the json structure in the same way that xml2json does in the example above. -- View this message in context: http://camel.465427.n5.nabble.com/Camel-xmlJson-not-working-properly-tp5795194p5795232.html Sent from the Camel - Users mailing list archive

Re: Camel xmlJson not working properly?

2017-03-10 Thread Ranabroto
Did you not miss the InstallKey element name ? Should it not be like below { "Version": "2.0", "ErrorCode": "0", "ErrorMsg": "OK", "Value": {"InstallKey": [{ "CustomerProductId": "5957152", "KeyPoolName": "Standard_EMEA",

Re: Camel xmlJson not working properly?

2017-03-09 Thread Preben.Asmussen
Hi Had the same issue some time ago. I think the resulting json should be an array in both cases since the xml Value element is 0-n. In your first example the resulting json will be a jsonobject, and it should have been an array. example 1 : { "Version": "2.0", "ErrorCode": "0"

Re: camel-xmljson unmarshalling issue Caused by: java.lang.NoClassDefFoundError: Could not initialize class net.sf.json.JsonConfig

2016-11-20 Thread AOladipupo
Hi, Can you share some more details about your use case? For example, is it a maven project? Are you using blueprint or camel-spring-dm? etc Regards, Dipo -- View this message in context: http://camel.465427.n5.nabble.com/camel-xmljson-unmarshalling-issue-Caused-by-java-lang-NoClassDefFoundEr

Re: camel-xmljson unmarhalling issue Caused by: java.lang.NoClassDefFoundError: Could not initialize class net.sf.json.JsonConfig

2016-11-16 Thread Andrea Cosentino
Hello, You've to contact the JBoss Fuse support for problems with JBoss Fuse. This is just the Apache Camel users mailing list. -- Andrea Cosentino -- Apache Camel PMC Member Apache Karaf Committer Apache Servicemix Committer Email: ancosen1...@yahoo.com Twitter

RE: Camel XmlJson Question

2015-08-12 Thread srinit
Hi, Yes. I want to apply namespaces on some element inside soap body. I have {"arg0":"srinivas"} as input and want to get output like below http://service.ws.test.x.com/";> Srinivas I did something like this XmlJsonDataFormat xmlJsonFormat = new Xml

Re: Camel XmlJson Question

2015-08-12 Thread srinit
Hi, Yes. I want to apply namespaces on some element inside soap body. I have {"arg0":"srinivas"} as input and want to get output like below http://service.ws.test.x.com/";> Srinivas I did something like this XmlJsonDataFormat xmlJsonFormat = new

Re: Camel XmlJson Question

2015-07-31 Thread Raul Kripalani
Hey, You have examples of configuration with both Java DSL and the XML-based DSLs in the documentation [1] [2]. And you can also check out the unit tests [3] if you want to see full examples. That is, assuming you are already familiar with Camel. If you are not, you should start with the usual p

RE: Camel XmlJson Question

2015-07-31 Thread Vanshul . Chawla
some elements etc, you need to look at extended parameters. Thanks and Regards, Vanshul Chawla -Original Message- From: srinit [mailto:sree.tallapa...@gmail.com] Sent: Friday, July 31, 2015 3:18 PM To: users@camel.apache.org Subject: RE: Camel XmlJson Question Hi Raul, I went through

RE: Camel XmlJson Question

2015-07-31 Thread srinit
Hi Raul, I went through that page and unable get how I can use that for my case. I don't see any good example for xmljson under Examples section. - Thanks -- View this message in context: http://camel.465427.n5.nabble.com/Camel-XmlJson-Question-tp5770021p5770150.html Sent from the Camel - Us

RE: Camel XmlJson Question

2015-07-31 Thread Raul Kripalani
Hi, Have you tried using the camel-xmljson data format instead of custom code? Take a look at the link provided above. Raúl. On 31 Jul 2015 08:18, "srinit" wrote: > I am trying to xml <==> json using following code > > @Override > public void xml2json(String xml) throws JSONException {

RE: Camel XmlJson Question

2015-07-31 Thread srinit
I am trying to xml <==> json using following code @Override public void xml2json(String xml) throws JSONException { JSONObject xmlJSONObj = XML.toJSONObject(xml); String jsonPrettyPrintString = xmlJSONObj .toString(PRETTY_PRIN

RE: Camel XmlJson Question

2015-07-28 Thread Vanshul . Chawla
http://camel.apache.org/xmljson.html This gives examples also. You just need to set dataFormat and use a process ref for xmljson. It gives default element names. In case you need to change the element names, you need to use expended properties. import org.json.JSONException; import org.json.JSO

Re: camel xmljson add @ signs to the json output. how to remove the @ signs

2015-01-28 Thread Raul Kripalani
Hey guys, It's me who developed this component, but in Camel we can only go as far as the Jsonlib library goes. Jsonlib prefixes XML attributes with '@' when converting them into JSON properties [1]. I think this is correct: without some kind of differentiation, you wouldn't be able to cycle back

Re: camel xmljson add @ signs to the json output. how to remove the @ signs

2015-01-13 Thread Vinny
Do the component developers follow this list? I'd love to see a switch as well. Issue tracker for components ? On Wed Nov 26 2014 at 1:44:01 AM Claus Ibsen wrote: > Hi > > Did you get in contact with the xmjson team about the issue and if > they are willing to add a flag to turn this on/off etc?

Re: camel xmljson add @ signs to the json output. how to remove the @ signs

2014-11-25 Thread Claus Ibsen
Hi Did you get in contact with the xmjson team about the issue and if they are willing to add a flag to turn this on/off etc? On Tue, Nov 18, 2014 at 9:18 AM, Claus Ibsen wrote: > Hi > > Ah great to know it was hardcoded. I would suggest to ask them to add > an option so you can turn that off. A

Re: camel xmljson add @ signs to the json output. how to remove the @ signs

2014-11-18 Thread Claus Ibsen
Hi Ah great to know it was hardcoded. I would suggest to ask them to add an option so you can turn that off. As there are use cases where you only need a one way transformation. They could also consider different strategies how to control this mapping. So there is a default strategy that does as

Re: camel xmljson add @ signs to the json output. how to remove the @ signs

2014-11-18 Thread salemi
Hi Clause, I looked at their json-lib code and based on what I read they need to have the @ sign for the attributes and # for the text elements. They need those "annotations" to be able to covert a json properly back to xml. The @ and # signs are hard coded in their code. Do you think I should as

Re: camel xmljson add @ signs to the json output. how to remove the @ signs

2014-11-14 Thread Claus Ibsen
Hi See http://camel.apache.org/source.html Though if you are familiar with github you can also find it there. Which IMHO is much easier https://github.com/apache/camel And the component is here https://github.com/apache/camel/tree/master/components/camel-xmljson On Fri, Nov 14, 2014 at 6:12 PM

Re: camel xmljson add @ signs to the json output. how to remove the @ signs

2014-11-14 Thread salemi
where can I find the source code for this? - Alireza Salemi -- View this message in context: http://camel.465427.n5.nabble.com/camel-xmljson-add-signs-to-the-json-output-how-to-remove-the-signs-tp5759013p5759147.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel xmljson add @ signs to the json output. how to remove the @ signs

2014-11-13 Thread Claus Ibsen
Hi No sorry I dont know how to remove those. You are welcome to dive into the source code and see if there is something we can add. Sounds like we should add some option to remove the @. I wonder if they are there so the component can reverse from json, and then know that if its a @foo then that

Re: camel xmljson add @ signs to the json output. how to remove the @ signs

2014-11-13 Thread salemi
Hi Claus, I am using Camel version 2.14.0. As far as xmljson goes I have used the follwoing parameter tor turn that off without a luck Do you know how turn off the @ sign for xml attributes? Thanks, Ali - Alireza Salemi -- View this message in context: http://camel.465427.n5.nabble

Re: camel xmljson add @ signs to the json output. how to remove the @ signs

2014-11-12 Thread Claus Ibsen
Hi What version of Camel do you use? And have you configured the xmljson data format in any way? The @ is because the xml value is from an xml attribute. I wonder if there is a way to turn that off in the xmljson library as yeah that is not needed in the json output. On Thu, Nov 13, 2014 at 12:

Re: Camel-XmlJson dataformat and ASLV2

2014-09-25 Thread Christian Müller
Hi Charlie! It's not complaint with the Apache rules [1]. We will fix this asap. [1] http://www.apache.org/legal/3party.html#category-x Best, Christian - Software Integration Specialist Apache Member V.P. Apache Camel | Apache Camel PMC Member | Apache Camel committer Apache In

Re: Camel-XmlJson dataformat and ASLV2

2014-09-24 Thread Charlie Mordant
So, I misunderstood that page on the Apache2 license: http://www.apache.org/legal/resolved.html Can it be updated to reflect that we can use some third party licensed code as dependencies (only) in our ASLV2 projects without breaking the rules? Should I fill a Jira in the Legal commity space? Bes

Re: Camel-XmlJson dataformat and ASLV2

2014-09-23 Thread Christian Müller
Thanks for reporting Charlie! This is not indeed not complaint with the Apache rules. We will fix this soon. Best, Christian - Software Integration Specialist Apache Member V.P. Apache Camel | Apache Camel PMC Member | Apache Camel committer Apache Incubator PMC Member https://w

Re: camel-xmljson convert POJO to XML

2014-01-13 Thread Henryk Konsek
Hi Roman, > but the main thing I have to do is to set vaiable *enabled* as > an attribute of *username* and I have no idea how. LibJson [1] (which is used by camel-xmljson [2] under the hood) will convert JSON pair into XML attribute if the name of the attribute starts with @. Your JSON serialize

RE: camel-xmljson

2013-06-04 Thread Surendra
Thanks Raul. Saved me ton of time. Appreciate your help. Date: Tue, 4 Jun 2013 03:06:33 -0700 From: ml-node+s465427n5733786...@n5.nabble.com To: surendrapam...@hotmail.com Subject: Re: camel-xmljson Hi Surendra, My tests show that the underlying json-lib is very sensitive to

Re: camel-xmljson

2013-06-04 Thread Raul Kripalani
> Date: Mon, 3 Jun 2013 08:53:18 -0700 > From: ml-node+s465427n5733722...@n5.nabble.com > To: surendrapam...@hotmail.com > Subject: Re: camel-xmljson > > > > I'll take a look at it later. > > > Regards, > > > *Raúl Kripalani* > > Enterprise

RE: camel-xmljson

2013-06-03 Thread Surendra
Thank you. Date: Mon, 3 Jun 2013 08:53:18 -0700 From: ml-node+s465427n5733722...@n5.nabble.com To: surendrapam...@hotmail.com Subject: Re: camel-xmljson I'll take a look at it later. Regards, *Raúl Kripalani* Enterprise Architect, Open Source Integration specialist, Pr

Re: camel-xmljson

2013-06-03 Thread Raul Kripalani
I'll take a look at it later. Regards, *Raúl Kripalani* Enterprise Architect, Open Source Integration specialist, Program Manager | Apache Camel Committer http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani http://blog.raulkr.net | twitter: @raulvk On Mon, Jun 3, 2013 at 4:0

Re: camel-xmljson

2013-06-03 Thread Surendra
Did anybody came across this issue? any clues? -- View this message in context: http://camel.465427.n5.nabble.com/camel-xmljson-tp5733645p5733712.html Sent from the Camel - Users mailing list archive at Nabble.com.