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
JSONSpecifies the JSON to be converted into XMLYes

Workflow output elements

Output element
Description
XMLSpecifies 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 elementDescriptionRequired
XMLSpecifies the XML to be converted into JSONYes

Workflow output elements

Output elementDescription
JSONSpecifies the JSON output

Convert XML Attributes to Elements

This utility converts XML attributes to elements before converting it to JSON. 

Workflow input elements

Input elementDescriptionRequired
XMLSpecifies the XML whose attributes need to be converted into elementsYes

Workflow output elements

Output elementDescription
XMLNoAttributeSpecifies XML with no attributes

Strip Namespaces

This utility strips namespaces from the XML document. 

Workflow input elements

Input elementDescriptionRequired
XMLSpecifies the XML document from which to strip the namespacesYes

Workflow output elements

Output elementDescription
XMLThe 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 elementDescriptionRequired
XML StringSpecifies the formatted XML stringYes

Workflow output elements

Output elementDescription
XMLThe submitted XML without the XML strings
Was this page helpful? Yes No Submitting... Thank you

Comments

  1. Anthony Bryce

    Need to be specific about what JSON.jar we are talking about and where people can get it from.

    Jun 23, 2016 03:28
  2. Peter Stanbridge

    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!

    Oct 10, 2016 12:10
    1. Shweta Hardikar

      Hi Peter,

      What version of Platform are you using? Just 7.8 or any of the service packs on top of 7.8?

       

      Oct 12, 2016 01:04
  3. Richard Bayer

    Hi,

     

    I'm also interested in this JSON.jar. (e.g. for 7.8.01)

     

    Thanks!

    Oct 27, 2016 09:20
  4. Aryan Anantwar

    Hi Team,

    please provide the below details:

    • where I can get this json.jar
    • in which location we should  put this json.jar file on Peer
    • in which location we should  put this json.jar file in devstudio

     

    we need to use this JSON to XML utility in our integrations.

    kindly provide these details ASAP.

     

    Regards,

    Dnyaneshwar

     

    Feb 07, 2017 09:37
    1. Shweta Hardikar

      Working on this with the team. Will respond asap.  

      Feb 07, 2017 11:08
    1. Shweta Hardikar

      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  

      Feb 07, 2017 11:40
      1. Aryan Anantwar

        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

        Feb 08, 2017 01:17
  5. Aryan Anantwar

    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

    Feb 08, 2017 05:28
    1. Shweta Hardikar

      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? 

      Feb 08, 2017 10:14
  6. Vinnie Lima

    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.

    Feb 09, 2017 02:25
    1. Shweta Hardikar

      Hi Vinnie, 

      We have tested it internally and the XML utilities work with BAO Platform 7.9 and later versions only. 

      Feb 09, 2017 10:05
  7. Johannes Richter
    Hi All,

    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
    Apr 05, 2017 04:31
    1. Shweta Hardikar

      Thanks for the comment, Johannes, here are the answers: 

      1. If you are using Platform 7.9.01, the jar files are already in the appropriate (/tomcat/webapps/baocdp/WEB-INF/lib) directory. 
      2. You will find these utilities in the AutoPilot-OA-Common_Utilities > XML utilities folder. I'll update the location in the documentation as well. 
      3. For the platform and content versions you are using, the utilities should run successfully. You are not required to move the jar files anywhere. 
        If you face any problems, please get in touch with BMC customer support.  

      Hope this helps! 

       

      Apr 07, 2017 04:01