Kapow36
Posts: 0
Joined: Thu May 23, 2013 4:07 pm

REST service - not creating list

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

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

REST service - not creating list

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

Kapow36
Posts: 0
Joined: Thu May 23, 2013 4:07 pm

REST service - not creating list

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

Image

Kapow36
Posts: 0
Joined: Thu May 23, 2013 4:07 pm

REST service - not creating list

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

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

REST service - not creating list

I'll update this post.

Kapow36
Posts: 0
Joined: Thu May 23, 2013 4:07 pm

REST service - not creating list

thanks!

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

REST service - not creating list

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?

Kapow36
Posts: 0
Joined: Thu May 23, 2013 4:07 pm

REST service - not creating list

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

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

REST service - not creating list

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.

Kapow36
Posts: 0
Joined: Thu May 23, 2013 4:07 pm

REST service - not creating list

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

Return to “Issues”