[
https://issues.apache.org/jira/browse/OFBIZ-4274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13105193#comment-13105193
]
Adrian Crum edited comment on OFBIZ-4274 at 9/19/11 10:19 AM:
--------------------------------------------------------------
A clear distinction needs to be made between HTTP status and service status.
OFBiz service results will not be used to modify the HTTP response status. The
service results are contained within the response body - so there is no need to
manipulate the HTTP response status. If the request is sent to a valid URL, and
if the service was invoked successfully, then the HTTP response status will be
200 (OK). The HTTP response status will be used as intended - to indicate an
invalid URL (404), user is not authenticated (401), an exception was thrown
while processing the request (500), etc. If a service returns an error, then
the HTTP response status will be 200 (OK) and the response body will contain
the service results - which will describe the error.
was (Author: [email protected]):
A clear distinction needs to be made between HTTP status and service
status. OFBiz service results will not be used to modify the HTTP response
status. The service results are contained within the response payload - so
there is no need to manipulate the HTTP response status. If the request is sent
to a valid URL, and if the service was invoked successfully, then the HTTP
response status will be 200 (OK). The HTTP response status will be used as
intended - to indicate an invalid URL (404), user is not authenticated (401),
an exception was thrown while processing the request (500), etc. If a service
returns an error, then the HTTP response status will be 200 (OK) and the
response body will contain the service results - which will describe the error.
> 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