XML utilities
This topic describes the common XML utilities available with BMC Atrium Orchestrator Content.
Important
The XML utilities are compatible only with BMC Atrium Orchestrator Platform 7.9 and later. On the BMC Atrium Orchestrator peers, the json-20160316j6.jar file is located in the /tomcat/webapps/baocdp/WEB-INF/lib folder.
Convert JSON to XML
This utility converts JSON to XML.
Workflow input elements
Input element | Description | Required |
---|---|---|
JSON | Specifies the JSON to be converted into XML | Yes |
Workflow output elements
Output element | Description |
---|---|
XML | Specifies the XML output |
Convert XML to JSON
This utility converts XML to JSON. The XML namespaces are striped to be converted to JSON.
Note
For XML with attributes, use the Convert XML Attributes to Elements workflow to convert XML attributes to elements first, and then convert to JSON.
Workflow input elements
Input element | Description | Required |
---|---|---|
XML | Specifies the XML to be converted into JSON | Yes |
Workflow output elements
Output element | Description |
---|---|
JSON | Specifies the JSON output |
Convert XML Attributes to Elements
This utility converts XML attributes to elements before converting it to JSON.
Workflow input elements
Input element | Description | Required |
---|---|---|
XML | Specifies the XML whose attributes need to be converted into elements | Yes |
Workflow output elements
Output element | Description |
---|---|
XMLNoAttribute | Specifies XML with no attributes |
Strip Namespaces
This utility strips namespaces from the XML document.
Workflow input elements
Input element | Description | Required |
---|---|---|
XML | Specifies the XML document from which to strip the namespaces | Yes |
Workflow output elements
Output element | Description |
---|---|
XML | The submitted XML without namespaces |
XML String to XML
This utility strips the XML headers and doctype elements from the XML strings to XML.
Workflow input elements
Input element | Description | Required |
---|---|---|
XML String | Specifies the formatted XML string | Yes |
Workflow output elements
Output element | Description |
---|---|
XML | The submitted XML without the XML strings |
Comments
Need to be specific about what JSON.jar we are talking about and where people can get it from.
Hi Everyone,
Where do I get the JSON.jar? Is it still the same procedure as the old bao-tools.jar method to install it? We are using BAO 7.8. I was told it was going to be included but I'm getting the following error:
Error
java.lang.NoSuchMethodException: For extension function, could not find method static org.json.XML.jsonStringToXMLString([ExpressionContext,] #STRING).
Caused by:
Summary: java.lang.NoSuchMethodException: For extension function, could not find method static org.json.XML.jsonStringToXMLString([ExpressionContext,] #STRING).
Caused by:
Summary: For extension function, could not find method static org.json.XML.jsonStringToXMLString([ExpressionContext,] #STRING).
]
Thanks!
Hi Peter,
What version of Platform are you using? Just 7.8 or any of the service packs on top of 7.8?
Hi,
I'm also interested in this JSON.jar. (e.g. for 7.8.01)
Thanks!
Hi Team,
please provide the below details:
we need to use this JSON to XML utility in our integrations.
kindly provide these details ASAP.
Regards,
Dnyaneshwar
Working on this with the team. Will respond asap.
Hi Dnyaneshwar,
If you are using BMC Atrium Orchestrator Platform 7.9 version, the json.jar file is available out-of-the-box and you can run the utilities successfully.
Let me get back to you if your platform version is earlier than 7.9
Thanks Shweta for your quick response.
We are using BAO 7.8 version, is the BAO Content 20.16.02 supported for 7.8
Also if I get the json.jar from 7.9 environment and use it in 7.8, will that work?
Regards,
Dnyaneshwar
Hi Shweta,
I've installed to 7.9.00 on one of the VM to test this.
but I didn't find the json.jar file under Peers lib or tomcats' lib folder.
will you please check and confirm.
Regards,
Dnyaneshwar
Hi,
Can you check in the following location for CDP?
C:\BAO\CDP\tomcat\webapps\baocdp\WEB-INF\lib
Also, did you try running any of the utilities?
Hi There Shweta Hardikar we also need the json.jar. Installing 20.16.02 content on a 7.8 CDP.
Thanks,
Vinnie
EDIT: It seems that installing content 20.16.02 on CDP 7.8.2 installs the json-20160210.jar library. But we are still having issue running any JSON to XML conversion such as:
{
"username" : "Joe",
"password" : "password!"
}
The XSLT transform errors with:
java.lang.NoSuchMethodException: For extension function, could not find method static org.json.XML.fromJSONString([ExpressionContext,] #STRING, #STRING).
Any advice would be great.
Hi Vinnie,
We have tested it internally and the XML utilities work with BAO Platform 7.9 and later versions only.
I have following questions:
1. To which directory do I need to move the json-20160316j6.jar file?
2. In which module do I find the utility processes mentioned above?
We are using following versions:
Platform: 7.9.01
Content: 20.16.03.00
Thanks,
Johannes
Thanks for the comment, Johannes, here are the answers:
If you face any problems, please get in touch with BMC customer support.
Hope this helps!
Log in or register to comment.