Reponse area one item error

This forum contains topics that were moved from Get Satisfaction
Ihor Didevych
Posts: 0
Joined: Wed Nov 19, 2014 7:55 pm

Reponse area one item error

Post by Ihor Didevych »

Hi Hnto,

We are sorry that you had trouble with this issue. We will try to find workaround.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Reponse area one item error

Post by Evgene Karachevtsev »

Hello Hnto,

As Yurii mentioned in the link below
1) This is one of approaches:
prevar onSuccess = function(data){
//Using response.
serviceName.execute({success: onSuccess});/pre
With this code you get the data from response, but you need to make your own mapping.

2) The other way is to parse xml with use of jQuery

3) The last and more efficient way is to:
a) get xml
b) add library to your app
c) launch javascript with used of imported library and parse all to json
d) create Generic REST Service that will return generated json
After this step you will get your normal mapping

Posts: 0
Joined: Sun Aug 02, 2015 2:53 pm

Reponse area one item error

Post by Hein »

Found this on the docs, however it'd be better if these methods can be written in more details. I have to idea when you mean 'launch javascript', and from where? etc...

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Reponse area one item error

Post by Yurii Orishchuk »

Hi Hein,

Here is workaround for this problem:

  1. Add to your service datasource "success" "javascript" event handler before mapping.

  2. Populate this javascript with following JS code:


    //Where "note.tag" is path to your response array. You should replace this part with yours.
    data.note.tag = _.isArray(data.note.tag) ? data.note.tag : [data.note.tag];


    See example of how to get "note.tag" in the code:
    So you should open your success mapping and find "path" to your array and replace with this part "note.tag"


Post Reply