...
This tutorial documents the steps to expose an ofbiz service using REST. The ofbiz ping service is exposed. The ping service returns a copy on the input message to the response. If the input message is null, ping returns PONG.
This is related: REST Service Implementation
The following steps show Apache wink was chosen as the REST implementation purely on the basis that it is an apache project. on base of Apache Wink.
Info | ||
---|---|---|
| ||
As of April 2017, Apache Wink is retired. For new REST implementations, it is not recommended to use it. This tutorial does not work with OFBIz Release 16.11 and above. This page will be either updated with an alternative or deprecated in the future. |
Assumptions
This tutorial assumes you have followed the ofbiz developer tutorial: http://cwiki.apache.org/confluence/x/cQFk
...
Code Block |
---|
ant create-component Component name: restcomponent Component resource name: RestComponent Webapp name: restcomponent Base permission: RESTCOMPONENT |
Step 2 - Grab
...
Apache Wink*
Download apache wink . I used httpfrom here: https://wwwwink.apache.org/dyn/closer.cgi/incubator/wink/1.0-incubating/apache-wink-1.0-incubating.zipdownloads.html
Unzip and copy lib/* and dist/* to your ofbiz component restcomponent/lib
...
The steps followed were taken from the wink user (i.e. developer) guide): http://incubator.apache.org/wink/1.0/Apache_Wink_User_Guide.pdf: apache-wink-developer-guide.html
In the folder restcomponent/src/restcomponent, create:
...