Hi,
Is it possible to transform a ION API IMS multipartmessage JSON payload to an XML before passing it to ION.
Hi Martin: Can you please explain the end goal? Because, from the question it looks like you are calling the POST multipartMessage of IMS. And by definition, this call requires that a JSON payload is received by ION. If you are changing that multipart JSON payload into an XML before it hits ION, then the receiving IMS API (on the ION side) won't be happy and will reject the message anyway. If you wanted to receive as an XML while the sender is sending JSON, you may consider using the plain 'POST Message' API instead of multipartmessage. In that case, you have some options to convert.. either on the gateway layer or on the ION layer. In the gateway layer you can do this by, creating a new third party API suite by using the standard IMS proxy URL as its target and then you can add a JSONtoXML policy on it to do this conversion. Or on the ION layer, you can convert this by python scripting (Available only in the Multi Tenant Cloud edition).
If you rather, meant you want to convert the JSON to XML "after" you have received it in ION, then I think this should be possible inside your Data flow. You can pass on the JSON you received as a regular ANY document to the next step of your flow, which can be a Python Scripting step (Available only in the Multi Tenant Cloud edition), where you can convert the JSON as an XML and return it. Or if the next step is calling another API, then the ION API connector can also do an intrinsic JSON to XML before calling the next API.
Hope this helps.
Best Regards
Vignesh
Hi Vignesh,
Thank you for your answer. My end goal is to update EAM records with on premise Infor OS.
I thought if I could transform the json to xml, I can use the graphical mapping to transform, for example an item master BOD. I have not much influence on what the incoming API POST looks like.
If i understand your response correctly the only option i have is the third party API option with the JSONtoXML policy.
many thanks,
Martin