You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Christian Amend (JIRA)" <ji...@apache.org> on 2016/11/16 10:30:58 UTC

[jira] [Resolved] (OLINGO-1031) ODataResponse and POST, PUT, DELETE

     [ https://issues.apache.org/jira/browse/OLINGO-1031?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Amend resolved OLINGO-1031.
-------------------------------------
    Resolution: Information Provided
      Assignee: Christian Amend

As you said you can use the write... methods to create the payload. Here is the turorial: http://olingo.apache.org/doc/odata2/tutorials/Olingo_Tutorial_BasicWrite.html

If you want the provide error messages you can use the ODataApplication exception. Just throw this in your code and the Olingo library will do the rest.

As for the audit messages you could use a custom header field to achieve this.

Best Regards,
Chris

> ODataResponse and POST, PUT, DELETE
> -----------------------------------
>
>                 Key: OLINGO-1031
>                 URL: https://issues.apache.org/jira/browse/OLINGO-1031
>             Project: Olingo
>          Issue Type: Question
>          Components: odata2-core
>    Affects Versions: V2 2.0.1
>            Reporter: M Carissimi
>            Assignee: Christian Amend
>
> Hello,
> we have an OData 2 service which currently only supports GET requests. We are investigating what is required to extend the service to support POST, PUT and DELETE.
> Looking at your documentation, it appears that we can use the the writeEntry() and writeFeed() methods of the EntityProvider class to perform the required operations. These methods return an ODataResponse. Can we use the ODataResponse to provide error messages to the clients in case the POST/PUT operations can't be completed successfully?
> Delete operations are quite different as clients simply need to use the DELETE method against an entry URL to delete it. In these cases how can we handle error conditions? What error code should we return when an entry can't be deleted and how can we tell the client the reason for the failure?
> Finally, we would like to enforce that client invoking POST, PUT, DELETE operations provide an audit message... How can we achieve this? Do we need to get the clients to POST the audit message first and the reference it in the other operations?
> Thank you for the information



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)