|
[ https://issues.apache.org/jira/browse/OFBIZ-4274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adrian Crum updated OFBIZ-4274: ------------------------------- Attachment: (was: RestXmlRepresentation.pdf) > 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: RestConfig.patch, RestConfig.patch, RestExample.xsd, RestXmlRepresentation.xml, rest-conf.xml.pdf > > > 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 |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adrian Crum updated OFBIZ-4274: ------------------------------- Attachment: RestXmlRepresentation.xml Replaced PDF file with original XML file. > 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: RestConfig.patch, RestConfig.patch, RestExample.xsd, RestXmlRepresentation.xml, rest-conf.xml.pdf > > > 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 |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adrian Crum updated OFBIZ-4274: ------------------------------- Attachment: (was: RestConfig.patch) > 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 > > 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 |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adrian Crum updated OFBIZ-4274: ------------------------------- Attachment: (was: RestExample.xsd) > 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 > > 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 |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adrian Crum updated OFBIZ-4274: ------------------------------- Attachment: (was: RestXmlRepresentation.xml) > 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 > > 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 |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adrian Crum updated OFBIZ-4274: ------------------------------- Attachment: (was: rest-conf.xml.pdf) > 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 > > 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 |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adrian Crum updated OFBIZ-4274: ------------------------------- Attachment: (was: RestConfig.patch) > 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 > > 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 |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adrian Crum updated OFBIZ-4274: ------------------------------- Attachment: rest-conf.xml RestXmlRepresentation.xml RestExampleSchema.xsd Updated all files, removed patch file. > 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 |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adrian Crum updated OFBIZ-4274: ------------------------------- Comment: was deleted (was: REST payloads are a Map that contains the service parameters and service results. XStream will be used for the XML representation: http://xstream.codehaus.org/converters.html ) > 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 |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13031517#comment-13031517 ] Adrian Crum edited comment on OFBIZ-4274 at 9/19/11 10:13 AM: -------------------------------------------------------------- OFBiz services are based on the concept of Map In, Map Out. So the HTTP request and response bodies are nothing more than the Maps going into and out of the services. This simple approach leverages all of the existing OFBiz service documentation and web tools - there is no new API to learn. Representation handlers will convert the in/out Maps to various representations - HTML, XML, JSON, etc. Applications can implement custom representation handlers. XStream will be used for the XML representation: http://xstream.codehaus.org/converters.html was (Author: [hidden email]): By default, request payloads (HTTP entity) are basically the target service's parameters wrapped in the resource name. In an XML payload the service parameters are child elements of the resource element (whose tag name is the resource name). This approach leverages the existing service definitions to define a REST resource API. By default, response payloads are the service results. The service result Map is converted to the requested media type. In cases where the request payload is controlled by an external application, a custom media handler can be provided for conversion. See the attached patch for an example. The servlet will support media handlers that convert payloads to/from media types (XML, JSON). See the attached patch for an example. > 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 |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adrian Crum updated OFBIZ-4274: ------------------------------- Comment: was deleted (was: RestXmlRepresentation.pdf is the proposed XML representation. ) > 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 |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adrian Crum updated OFBIZ-4274: ------------------------------- Comment: was deleted (was: Updated patch and PDF file so anyone who is interested can see the configuration file without applying the patch. ) > 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 |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13031141#comment-13031141 ] Adrian Crum edited comment on OFBIZ-4274 at 9/19/11 10:15 AM: -------------------------------------------------------------- The attached files show how the Example component can support REST requests. was (Author: [hidden email]): RestConfig.patch is a POC configuration that shows how the Example component can support REST requests. > 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 |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adrian Crum updated OFBIZ-4274: ------------------------------- Comment: was deleted (was: Replaced PDF file with original XML file.) > 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 |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adrian Crum updated OFBIZ-4274: ------------------------------- Comment: was deleted (was: Updated POC config patch. ) > 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 |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adrian Crum updated OFBIZ-4274: ------------------------------- Attachment: (was: RestExampleSchema.xsd) > 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 |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adrian Crum updated OFBIZ-4274: ------------------------------- Attachment: (was: RestXmlRepresentation.xml) > 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 |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adrian Crum updated OFBIZ-4274: ------------------------------- Attachment: RestXmlRepresentation.xml RestExampleSchema.xsd > 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 |
|
In reply to this post by Nicolas Malin (Jira)
[ 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: [hidden email]): 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 |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13102570#comment-13102570 ] Adrian Crum edited comment on OFBIZ-4274 at 9/19/11 10:19 AM: -------------------------------------------------------------- A nice feature to have would be the ability to support dynamic XML stylesheets so that REST XML clients can validate request/response bodies. The body XML would contain the stylesheet reference URL, and the servlet would create a stylesheet based on the REST configuration file/service definition. Example XML request payload: {code} <post xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://localhost/webtools/entities/orderheaders/post.xsd"> ... </post> {code} was (Author: [hidden email]): A nice feature to have would be the ability to support dynamic XML stylesheets so that REST XML clients can validate request/response payloads. The payload XML would contain the stylesheet reference URL, and the servlet would create a stylesheet based on the REST configuration file/service definition. Example XML request payload: {code} <post xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://localhost/webtools/entities/orderheaders/post.xsd"> ... </post> {code} > 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 |
| Free forum by Nabble | Edit this page |
