Re: [Dev] Xpath expression to fetch a property which has space in name

2016-05-11 Thread Praneesha Chandrasiri
hi Rajith, I added the above information under a topic named "Converting spaces" in docs of ESB 4.9.0 and above, as for example in [1]. Also, I added a comment in the JIRA in [2]. Thanks for the support! [1] https://docs.wso2.com/display/ESB500/JSON+Support#JSONSupport-Convertingapayloadbetween

Re: [Dev] Xpath expression to fetch a property which has space in name

2016-05-10 Thread Rajith Vitharana
Hi All, This can be avoided by using "synapse.commons.json.buildValidNCNames" to value "true" in /repository/conf/synapse.properties file, This will replace space in the json to "JsonReader_32" value. So sample would be as follows input Json - { "abc nnn": "value1" } output XML - value1 A

Re: [Dev] Xpath expression to fetch a property which has space in name

2016-05-05 Thread Udara Liyanage
Hi, i think option 1 is better, As I remember earlier ESB versions uses underscore for space. On Thu, May 5, 2016 at 1:53 AM, Rajith Vitharana wrote: > Hi, > > So what would be the best convention to follow > 1 - just throw a error saying can't convert to XML because of the space > character >

Re: [Dev] Xpath expression to fetch a property which has space in name

2016-05-05 Thread Rajith Vitharana
Hi, So what would be the best convention to follow 1 - just throw a error saying can't convert to XML because of the space character 2 - encode that space (will need to support this when converting back to json as well) Thanks, On Tue, Mar 8, 2016 at 9:37 AM, Udara Liyanage wrote: > Hi, > > Ye

Re: [Dev] Xpath expression to fetch a property which has space in name

2016-03-07 Thread Udara Liyanage
Hi, Yes, I also think it is a bug in json to xml conversion. I will create a jira for this. ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev

Re: [Dev] Xpath expression to fetch a property which has space in name

2016-03-07 Thread Rasika Perera
7, 2016 11:34 AM > *To:* Udara Liyanage > *Cc:* WSO2 Developers' List > *Subject:* Re: [Dev] Xpath expression to fetch a property which has space > in name > > > > Hi Udara, > > > > According to the W3C XML 1.0 Specification > <https://www.w3.org/T

Re: [Dev] Xpath expression to fetch a property which has space in name

2016-03-07 Thread Jonathan Marsh
Behalf Of *Rasika Perera *Sent:* Monday, March 07, 2016 11:34 AM *To:* Udara Liyanage *Cc:* WSO2 Developers' List *Subject:* Re: [Dev] Xpath expression to fetch a property which has space in name Hi Udara, According to the W3C XML 1.0 Specification <https://www.w3.org/TR/REC-xml/#sec-co

Re: [Dev] Xpath expression to fetch a property which has space in name

2016-03-07 Thread Rasika Perera
Hi Udara, According to the W3C XML 1.0 Specification you *cannot* have spaces on the XML element name. To be precise; [4a] NameChar::=NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040] [5]Name::=NameSta

Re: [Dev] Xpath expression to fetch a property which has space in name

2016-03-07 Thread Udara Liyanage
Hi, It gives me following error. Below is my synapse configs. ##call external api https://api.peoplehr.net/Query"/> #iterate thru results Sample API

Re: [Dev] Xpath expression to fetch a property which has space in name

2016-03-07 Thread Keerthika Mahendralingam
Hi Udara, Since you are getting JSON response, I think you can use json-eval to get the value form response like, Thanks, On Mon, Mar 7, 2016 at 2:31 PM, Udara Liyanage wrote: > Hi, > > We have an call mediator which calls and external API. API response is > json. Json properties has spaces

Re: [Dev] Xpath expression to fetch a property which has space in name

2016-03-07 Thread Udara Liyanage
Hi, We have an call mediator which calls and external API. API response is json. Json properties has spaces in names. { "Department": "ENGINEERING", "Employee Id": "LK", "First Name": "Udara", } ESB converts this to xml, those xml element names also ha

Re: [Dev] Xpath expression to fetch a property which has space in name

2016-03-07 Thread Udara Liyanage
Hi, Below is the log mediator output. Even the converted xml tag has space in its name. [2016-03-07 14:00:36,587] INFO - LogMediator To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:2b6e4e6d-9180-4083-b06b-d12c08c5178e, Direction: request, Envelop

Re: [Dev] Xpath expression to fetch a property which has space in name

2016-03-06 Thread Udara Liyanage
Hi Thusitha, I already tried that, but negative. On Mon, Mar 7, 2016 at 11:59 AM, Thusitha Thilina Dayaratne < thusit...@wso2.com> wrote: > Hi Udara, > > Did you tried replace the space with "_x0020_"? according to the [1] it > seems work for spaces > [1] - > *http://users.jackrabbit.apache.nar

Re: [Dev] Xpath expression to fetch a property which has space in name

2016-03-06 Thread Thusitha Thilina Dayaratne
Hi Udara, Did you tried replace the space with "_x0020_"? according to the [1] it seems work for spaces [1] - *http://users.jackrabbit.apache.narkive.com/r9aFPfiI/xpath-query-with-space-in-node-name * Thanks

[Dev] Xpath expression to fetch a property which has space in name

2016-03-06 Thread Udara Liyanage
Hi, I am trying to fetch an property value from a json payload similar to below. { "Department": "ABC", "Employee Id": "123", "Work Email": "ud...@wso2.com" }, I could extract Department value by below xpath expression. However when I found difficult