When you export a Provisioning Request Definition (PRD) from NetIQ Designer, you are left with an XML file with 3 separate BASE64 encoded code sections:
- srvprvProcessXML
- srvprvRequestXML
- XMLData
To run the script, put the following command in to a Linux shell script or a Windows batch file:
java -cp "lib/*" org.mozilla.javascript.tools.shell.Main decode.js "$@"
To decode the exported PRD in to 3 files, on linux, you can just type:
./decode.sh CAAR_07_02_2024.xml
Once the script has finished processing, you will be left with 3 XML files similar to the ones shown below.
CAAR_07_02_2024.xml_srvprvProcessXML.xml
CAAR_07_02_2024.xml_srvprvRequestXML.xml
CAAR_07_02_2024.xml_XMLData.xml
Please note that the decodeMe function in the decode.js file has been changed to use the built-in Java Base64 decoder function.
The nxsl.jar requirement has been removed and therefore, in addition to replacing the decodeMe function with the code shown below, you should also remove the importClass(Packages.com.novell.xml.util.Base64Codec); code.
function decodeMe ( varString )
{
var varDecoded = java.util.Base64.getDecoder().decode(varString);
return new java.lang.String(varDecoded);
}
Download the decode.js script from here.
Download the rhino-1.7.15.jar file from here.
Once the script has been downloaded, and your lib directory has been setup, create a shell script (similar to the one shown below) in order to run the program.
#!/bin/bash
/Users/belkast/Documents/Applications/JDK/8/arm64/zulu-8.jdk/Contents/Home/bin/java -cp "lib/*" org.mozilla.javascript.tools.shell.Main decode.js "$@"