Page 1 of 2

Mapping REST service (XML) response to various text labels

Posted: Mon May 28, 2012 1:33 pm
by ScottIncz

Hi
I am querying a device that returns this xml

I have setup a rest xml service that returns this in tiggzi when i populate the response.

parameters
@lastmodified
parameter
@id
@value

I'm not sure how to pick out the individual lines and map them to various labels.

Any advice on getting for example some of the 'values' for arbitery 'id's to labels on one of the mobile app's screens?

Thanks


Mapping REST service (XML) response to various text labels

Posted: Mon May 28, 2012 1:37 pm
by ScottIncz

The XML has been removed in the above post. I will add it as an image. Image


Mapping REST service (XML) response to various text labels

Posted: Mon May 28, 2012 3:12 pm
by maxkatz

You would map the fields in standard way... select the response parameter, then connect it (by dragging) to a label on a page. Is that the question..?

If you can post a screen shot of the mapping editor, with the connections you want to make, that would help.


Mapping REST service (XML) response to various text labels

Posted: Mon May 28, 2012 3:46 pm
by ScottIncz

The question is how to map the response parameters @id and @value to six different labels. How do you map from those two to six different labels. That is not one to one mapping with the arrows.


Mapping REST service (XML) response to various text labels

Posted: Mon May 28, 2012 4:31 pm
by maxkatz

You can map one response parameter to multiple components:
http://help.tiggzi.com/documentation/...


Mapping REST service (XML) response to various text labels

Posted: Mon May 28, 2012 4:34 pm
by ScottIncz

OK! How do you select which xml id/value pair goes to which text label?


Mapping REST service (XML) response to various text labels

Posted: Mon May 28, 2012 4:41 pm
by maxkatz

You need to map one id/value pair to multiple text labels..?


Mapping REST service (XML) response to various text labels

Posted: Mon May 28, 2012 9:48 pm
by ScottIncz

If you look at the xml above you will see that the has several different id and values. When you test the connection it succeds in pulling back the xml above, but when you click the 'populate response structure' button, it fills it in as

parameters
|@lastmodified
..parameter
..|@id
..|@value
(ignore the .. and | above they are there to illustrate how the response structure looks on screen when populated by tiggzi.
So... How do you get a different response strucutre or use that one to map the various different lines from the xml to different text labels.
I hope that is clearer.
thanks.


Mapping REST service (XML) response to various text labels

Posted: Mon May 28, 2012 10:01 pm
by maxkatz

I think the structure is correct because you get an array of id/value. You would like to map the first id (system.internet.dhcp.ip) to say label A and second id (system.internet.dhcp.sm) to say label B?


Mapping REST service (XML) response to various text labels

Posted: Mon May 28, 2012 10:21 pm
by ScottIncz

Correct, but map the values to labels rather than IDs. So in the case of the first in the list, with the id of system.ethernet.dhcp.ip, have the label have a text value of 192.168.5.140 and so on.