Manuel Martinez
Posts: 0
Joined: Tue Sep 17, 2013 10:48 pm

REST Service always fires Error Event

Hello, I am testing a REST Service, when the data is sent to the Service everything is going fine, but when the service returns the xml, I always get the Error event fired, even when the data was already stored correctly in the service.
Can you give me advice to solve this issue?
Thanks in advance,
Manuel

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

REST Service always fires Error Event

Hello Manuel!

Could you please tell steps to reproduce this Service?
And what exact error do you get?

Manuel Martinez
Posts: 0
Joined: Tue Sep 17, 2013 10:48 pm

REST Service always fires Error Event

Hi Alena!
I am using this URL with HTTP GET Method
http://pontiac.marzaconsulting.com/we...

The Request are already mapped from components in my appery page (Inputs and a Geolocation response data)

When I test the Service the response in text/xml buth I always receive the Error Event, instead of a Success event because the data is already stored in the service database.

Any comment would be very appreciated,
Manuel

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

REST Service always fires Error Event

The callbacks (success/error, complete) will be called regardless whether the data is saved somewhere. These are just standard jQuery callbacks. Check the response that you get.

Manuel Martinez
Posts: 0
Joined: Tue Sep 17, 2013 10:48 pm

REST Service always fires Error Event

Hello Max, thank you, but how can i get the success event fired? The response i get is correct but the event fired is always the error event, i will appreciate your comments

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

REST Service always fires Error Event

What response do you get?

Manuel Martinez
Posts: 0
Joined: Tue Sep 17, 2013 10:48 pm

REST Service always fires Error Event

Se ha guardado la informacion de tu ubicación

This is the XML response I am trying to store in a localStorage variable, but cannot do it because the REST service always came with the error events instead of the Success event, how can I solve this?

Thanks,
Manuel

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

REST Service always fires Error Event

I think you get the error because it's not a valid XML response. Try running your code in complete callback. It is always invoke after either success or error.

Manuel Martinez
Posts: 0
Joined: Tue Sep 17, 2013 10:48 pm

REST Service always fires Error Event

Hi guys,
I have chabged my webservice in order to get a well formatted xml response this is the sample of the new response.

La información se envió correctamente

Buy unfortunately whe I make no callbacks, the localstorage variable is not with the value of the XmlSting "Aviso"

Can you post a little code snippet of how to handle the webservices responses and store them in localStorage variables.
I also tried to store the response ina component (input) but had the same luck, the response is not stored in the input.

I hope you can help me, if I can achieve this, I will have several projects all based in appery.

This is the complete URL that I call to invoke the webservice.

http://pontiac.marzaconsulting.com/we...

I appreciate your help and support.
Regards,
Manuel

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

REST Service always fires Error Event

With the new response, which callback function is being called: error or success?

Return to “Issues”