To work with JSON type messages, DataPower first converts it to JSONX, a proprietary XML based format to represent JSON message, does transformation and converts back to JSON (using store:///jsonxtojson.xsl) as per the requirements.
To convert to JSONX, DataPower provides 2 different ways
1) Using HTTP Convert Query Action
Important to notice that both of these methods works on processing rule. Convert Action works as processing action added on processing rule and __JSONASJSONX also work when it's a input for a processing action.
But I have come across requirements where you need JSONX in a XSL file. In that case, a reusable service can be designed using any of above method and can be called from XSL file. Here is how it's going to look like.
To convert to JSONX, DataPower provides 2 different ways
1) Using HTTP Convert Query Action
Important to notice that both of these methods works on processing rule. Convert Action works as processing action added on processing rule and __JSONASJSONX also work when it's a input for a processing action.
But I have come across requirements where you need JSONX in a XSL file. In that case, a reusable service can be designed using any of above method and can be called from XSL file. Here is how it's going to look like.
No comments:
Post a Comment