Mobile app Rest Service from sql server through php - Authentication Login screen

This forum contains topics that were moved from Get Satisfaction
Stelios Geo
Posts: 0
Joined: Wed May 14, 2014 11:37 am

Mobile app Rest Service from sql server through php - Authentication Login screen

Post by Stelios Geo »

Never mind, i found the storage and models section!

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

Mobile app Rest Service from sql server through php - Authentication Login screen

Post by Evgene Karachevtsev »

Hello Stelios,

Thank you for the update, glad it works!

Stelios Geo
Posts: 0
Joined: Wed May 14, 2014 11:37 am

Mobile app Rest Service from sql server through php - Authentication Login screen

Post by Stelios Geo »

Hello again team,
I do not know if this case\issue is closed but Im experiencing another issue.
I have these services which I get some results in json\xml form. But I was using some urls that no parameters were needed for me to have results. Now that Im trying to have dynamic parameters i.e.
when I press the Login button i set a parameter in local storage and this passes to another screen where another service is called.. etc etc
just like the http://devcenter.appery.io/tutorials/... document.
But i sense that my local storage is empty, can you help me with that? Is something that I miss? Btw, my project is already shared to a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a and its called TestAppStel

Thank you very much,

Stg

Stelios Geo
Posts: 0
Joined: Wed May 14, 2014 11:37 am

Mobile app Rest Service from sql server through php - Authentication Login screen

Post by Stelios Geo »

Well actually i found a workaround but I have a bigger problem:
when i test specific data with one login i get some data response which is fine.
But when I try another login (another user gets another data) i dont get anything, and my chrome browser throws an exception on:

if (_.isTrueObject(data) && arrayLevel) throw new Error("Attempt to access Object by index: " + pathHead);

Actually i get a "Attempt to access Object by inder 0"
What happens? is it data sensitive?

Thank you team,

Stg

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Mobile app Rest Service from sql server through php - Authentication Login screen

Post by Kateryna Grynko »

Hi Stg,

Could you please give us working test credentials and also those that cause the error?

Stelios Geo
Posts: 0
Joined: Wed May 14, 2014 11:37 am

Mobile app Rest Service from sql server through php - Authentication Login screen

Post by Stelios Geo »

Yes, you can use username:user2 and pass:user to fetch some data and
Username:user3 and pass:user3 to produce the error..

Thank you Kateryna,

Stg

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Mobile app Rest Service from sql server through php - Authentication Login screen

Post by Alena Prykhodko »

Hello,

1) to check login and password are correct (check whether you have something in response) you don't need to add mapping to invisible field but check response itself directly on complete event, e.i. instead
pre
if (Appery("groupID").val() === "")/pre

do
pre

if (jqXHR.responseText === "No rows")/pre

2) Yes, when you work with xml - such problem exists. Response structure forms based on service response, i.e. if you get one record in ROW, there is no array in response and error arises.
It's hard to bypass, the best solution as it's your server; return json instead xml json. In json array creates in any case, one or a few records are there.

Post Reply