[ 
https://issues.apache.org/jira/browse/OFBIZ-4274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13107755#comment-13107755
 ] 

Adrian Crum commented on OFBIZ-4274:
------------------------------------

Raj,

I apologize if the design description was not clear about HTTP status codes. 
Yes, of course HTTP status codes will be returned (since REST is nothing more 
than HTTP 1.1).

What I tried to describe is the HTTP status code behavior when an OFBiz service 
returns an error: The service error will not affect the HTTP status code. 
Instead, a 200 HTTP status will be returned and the response body will contain 
the result of the service call - which describes the error returned by the 
service.

The reason why OFBiz service errors are handled this way should be obvious from 
a web client perspective. If an OFBiz service returned an error and that error 
resulted in an HTTP error status being returned, then how would a web client 
(or developer) know what the service error was?


> Implement a REST Servlet
> ------------------------
>
>                 Key: OFBIZ-4274
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4274
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: RestExampleSchema.xsd, RestXmlRepresentation.xml, 
> rest-conf.xml
>
>
> Implement a REST servlet that will map REST requests to OFBiz services. 
> Details are in the comments.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to