Hi
I have written automation script for external exit for enterprise service to convert the external json and convert it to maximo workorder object and save it. This script is working fine and I am getting the response for work order creation in below xml format.
<?xml version="1.0" encoding="UTF-8"?>
<SyncMXWOResponse xmlns="http://www.ibm.com/maximo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" creationDateTime="2022-07-13T05:44:13+00:00" transLanguage="EN" baseLanguage="EN" messageID="6376916576910527103497">
<MXWOSet>
<WORKORDER>
<SITEID>BEDFORD</SITEID>
<WONUM>W0959187</WONUM>
<WORKORDERID>133343</WORKORDERID>
</WORKORDER>
</MXWOSet>
</SyncMXWOResponse>
Now I am writing automation script for response of enterprise service where I need to convert the above xml structure to below json structure and the same should be returned to the caller of the enterprise service endpoint as response.
{
"wonum": "W0959187",
"status": "success"
}
Any sample code or example to achieve this in enterprise service response. I am trying to create a json structure object in the script and converting xml to json but it is not allowing to do so.
Regards
Abhinav
------------------------------
Abhinav Srivastava
------------------------------
#AssetandFacilitiesManagement#MaximoIntegrationandScripting#Maximo