Rest Webservice return object problem

Hi Guys,

I am using the servoy rest webservice to run my backup/restore process on the server. The whole process was working just fine upto servoy 7.2. I have recently update to 7.3rc and it stopped working as expected.

Here is how I do the process:
I create an object with some requests in it (like organizationID, the type of process backup/restore/restore defaults etc. and some other information). The object is a simple object. I then JSON.stringify the object and create an http put request. I put the object in the body of the request and send the request. I then grab the object in the webservice in ws_create(object) function. Everything is all good, the object is there, I return it back to a normal object and read it. I do whatever I need to do over the server (creating new records, deleting, etc.). Again all is good and everything happens as expected. Then I create a return object and put the result of the process in that object (sucess/failure, filename, etc.). again a simple object to return. I then Json the object as I did when I send the request and return it back to the client. There is no issue till this point and the object has whatever I need to have in it. When I get the response back on the clinet though, I read the http response status and the value is error 500! and when I look at the return object, it is an empty string instead of the object I created on the server!
When I look at the log file on the server I see rest webservice has failed. Attached is the error!

Can anyone please tell me what is going on?! why do I get this error? I can’t event debug it as nothing happens before the return statement. I even tried to just return a string instead of the object and I still get the same error!

Cheers,
Siavash

Hi Siavash,

siavash.roozbehan:
I can’t event debug it as nothing happens before the return statement. I even tried to just return a string instead of the object and I still get the same error!

You could always add some code before the return statement to be able to add a breakpoint and such for debugging.

Anyway, I suggest you file this in the support system so Servoy can pick this up.

Hope this helps.

Hi Robert,

Thanks for your reply. I actually have some code before the return statement and as I mentioned everything is as expected till that point. I even print out my object and the object is what it should be. So I assume there is no problem till that point. But when webservice returns the object and the client recieves it, the object is null! and when I look at the log file, the log has this Error executing rest call for some reason.

Anyway, I’ll file the issue in the support system as you suggested.

Cheers,
Siavash