Hi everyone!
We created a backend service in an SAP Transportation Management system which is exposed by the SAP NetWeaver Gateway through the OData channel and consumed by custom mobile apps (Android and iOS). We pretty much have everything worked out, but are missing a final piece to make it a really good solution.
When we send a PUT request to trigger an update on an entity, we receive a "204 No Content" http response to signal a successful operation. Browsing through all kinds of SAP documents about SAP NW Gateway I found that this seems to be the standard response. However, the HTTP 1.1 standard also allows for a "200 OK" response including a message body after a successful PUT request (http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html). This would allow us to send back the modified entity in the response, but we cannot figure out what to do in the backend service to trigger this kind of response.
So, my question really is whether anyone knows whether this is even possible in SAP NW Gateway or maybe even knows how to do it.
As an alternative, I'd like to find out whether there is a way to trigger other responses like "409 Conflict" from the backend service to indicate that the operation was not successful. The final goal of this enquiry is to find a way to handle race conditions. When two users on two mobile devices try to update the same entity at the same time (which can only be done once), the "looser" needs to know about it and receive the updated data.
Any input on this is greatly appreciated!
Thanks,
Sebastian