[jira] [Commented] (OFBIZ-5790) Json string parameters as a service input are not recognized by OFBiz ServiceEventHandler.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-5790) Json string parameters as a service input are not recognized by OFBiz ServiceEventHandler.

Nicolas Malin (Jira)

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

Adrian Crum commented on OFBIZ-5790:
------------------------------------

Regarding JSON event: The approach I used in our REST servlet was to assemble request parameters into a Map, convert the JSON request body into a Map and combine it with the request parameters Map, and then use the combined Map as input parameters to the service. If the request specified a JSON response content type, then the service result Map is converted to JSON and put in the response body.


> Json string parameters as a service input are not recognized by OFBiz ServiceEventHandler.
> ------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-5790
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5790
>             Project: OFBiz
>          Issue Type: Improvement
>    Affects Versions: Trunk
>            Reporter: Amardeep Singh Jhajj
>            Priority: Minor
>         Attachments: CommonEvents.java.patch, OFBIZ-5790.patch, jackson-annotations-2.4.0.jar, jackson-core-2.4.2.jar, jackson-databind-2.4.2.jar
>
>
> I was trying to pass the Json string as a input to a service, but is not recognized by ServiceEventHandler.
> Example Json String- {"faciltyId": "WebStoreWarehouse"}
> I worked on this issue and attached a patch here. Here I have used Jackson Json library for parsing.



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