Page 1 of 2

REST service - not creating list

Posted: Tue May 28, 2013 4:26 pm
by Kapow36

Hello Everyone!
I am very new to Appery (so I assume I am doing everything wrong).
Lately I've been testing the REST service feature using a http request for a website other than Twitter or Facebook etc. The request works flawlessly (the test comes back great and it creates the automatic response), but it won't set list titles like I want it to. I've included an image of the mapping I've done, and below is the test response (with some characters excluded of course). If someone could steer me in the right direction it would be greatly appreciated.

{
"ROWCOUNT":2,
"COLUMNS":[
"FAMILYID",
"MEMBERID",
"FAMILY",
"EMAIL"
],
"DATA":{
"FAMILYID":[
144874,
145129
],
"MEMBERID":[
####,

],
"FAMILY":[
"John Doe Family",
"TDiaz"
],
"EMAIL":[
"a href="mailto:email@gmail.com" rel="nofollow"email@gmail.com/a",
"a href="mailto:email@live.com" rel="nofollow"email@live.com/a"
]
}
}
Image


REST service - not creating list

Posted: Tue May 28, 2013 4:30 pm
by Maryna Brodina

Hello! You can use < code < /code tag to post the code. Also waiting for the screenshot:)


REST service - not creating list

Posted: Tue May 28, 2013 4:38 pm
by Kapow36

screenshot should be attached...
I've added it again on this one

Image


REST service - not creating list

Posted: Tue May 28, 2013 6:11 pm
by Kapow36

Ummmm... I don't know how this became "answered"
I just came back and refreshed the page to see if anyone posted anything new...
I don't want to create a new thread that will clutter the forum, but I might have to


REST service - not creating list

Posted: Tue May 28, 2013 6:13 pm
by Maryna Brodina

I'll update this post.


REST service - not creating list

Posted: Tue May 28, 2013 6:27 pm
by Kapow36

thanks!


REST service - not creating list

Posted: Tue May 28, 2013 7:57 pm
by Maryna Brodina

You code and mapping on the screenshot looks correct. Could you clarify please what exactly doesn't work? Also please check if you invoke the service. Check are the any errors in console?


REST service - not creating list

Posted: Tue May 28, 2013 8:16 pm
by Kapow36

I have it set so that the service is invoked when the page loads, and what happens is that the list is not updated at all (I get a blank list when the screen loads).

I just checked the console and it is giving
code
Uncaught SyntaxError: Unexpected token : dev&#46;homeschool-life&#46;com&#47;cfc&#47;mobile&#47;family&#46;cfc?callback=jQuery182015732860751450062_1369771819575&method=getFamilies&memberID=1223:1
/code


REST service - not creating list

Posted: Tue May 28, 2013 8:35 pm
by Maryna Brodina

You have incorrect request parameters. If you'll follow the link from error message - you'll get an error The MEMBERID argument passed to the getFamilies function is not of type numeric. In memberID you send 1223:1 - it's not a number. Perhaps it should be 1223. Please check where you form memberID. I deleted your last comment because it contains private information.


REST service - not creating list

Posted: Tue May 28, 2013 9:49 pm
by Kapow36

Hmmm, seems that I had the data type as jsonp instead of json (a cause of my messing around a bit) that fixed the added text. Now, it is sending the correct address, but it gives a new error.
code
XMLHttpRequest cannot load "the address was here"&#46; Origin http:&#47;&#47;appery&#46;io is not allowed by Access-Control-Allow-Origin&#46;
/code