Hi,
I've been working on my own persistance implementation for form runner. It's a Java Servlet web service which directly speaks to mysql, using orbeon's traditional datamodel for mysql. So far, I have some pretty good results, however, the CRUD operations that result in not-found errors are causing me problems. What exactly should the api return in this case? Most importantly, what should a CRUD GET return when nothing was found? I returned really nothing and this causes serious trouble for the form builder, when it is looking for nonexistant library forms (the controls don't get loaded). So what should exactly be returned in those cases? I checked in ther browser, and it seems to be an empty file, but I don't know how to do that using javax.servlet, and I don't know which response code, etc... What doens't cause trouble (yet) is PUT: but just in case: what should PUT respond with when something goes awry?. Koen Vanderkimpen -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Hi Koen,
I ran into the same issue with the missing form controls. I found out that when you return http status 404 (not found) on a CRUD GET, this issue is resolved.
If a PUT goes bad, I return a 500 (server error), but that doesn't seem to have any effect on form builder. At least, it doesn't cascade this status for some reason to the user. From a REST perspective this sounded like the most obvious choice though.
Cheers, Jan
On Fri, Jun 15, 2012 at 8:17 AM, <[hidden email]> wrote: Hi, -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
In reply to this post by koenvdk
Koen,
So far, I have some pretty good results, however, the CRUD operations that result in not-found errors are causing me problems. What exactly should the api return in this case? HTTP 404 not found. Most importantly, what should a CRUD GET return when nothing was found? HTTP 404 not found ;) I returned really nothing and this causes serious trouble for the form builder, when it is looking for nonexistant library forms (the controls don't get loaded). So what should exactly be returned in those cases? I checked in ther browser, and it seems to be an empty file, but I don't know how to do that using javax.servlet, and I don't know which response code, etc... Any non-success HTTP code, such as 500. Note that we have this known issue we are hoping to fix for 4.0: -Erik -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |