Command-line tools are available to help manage CPAs. All are found in <install directory>\tools
and must be run from the tools directory. The following topics describe each tool.
When one of these tools call for entering a file name and path, the path must be in the form of a URL. For example, if the target file is at:
c:\data\cpa.xml
Type the path as:
file:\\\c:\data\cpa.xml
The ebxmlCpaSchematronValidator tool performs tests on the content of a CPA. The tool makes sure matching elements in each PartyInfo element of the CPA are consistent.
Schematron is an XML schema language that can be used to validate XML. For information about Schematron, go to http://xml.com/ and search for Schematron.
Run the tool in the following format:
ebxmlCpaSchematronValidator <parameter> <path to CPA file>
The ebxmlCpaSecurityGuard tool is used for digitally signing CPAs. Its various functions all relate to signing and verifying digital signatures of a CPA.
The certificates you and your partner use to sign the CPA must be trusted by your community in Activator.
The following are example formats for running the script to achieve different results:
ebxmlCpaSecurityGuard -s –n SigningPartyName –x file:///c:/cpatest/certNoPassWord.p12 -c file:///C:/cpaTest/cpaToBeSigned.xml -d C:/cpaTest/output -f oneSigCpa.xml |
ebxmlCpaSecurityGuard -v -c file:///C:/cpatest/SignedCpa.xml |
ebxmlCpaSecurityGuard -z -c file:///C:/cpaTest/tempCpaSigned.xml -d C:/cpaTest/output -f oneSigCpa.xml |
The following describes the parameters.
Parameter |
Description |
--cpa |
URL referencing the CPA. For example: |
--directory |
Location of the output directory. |
--file-name |
Name of the CPA to be written to the output directory. |
--help |
Prints tool help. |
--info |
Prints security information for the CPA. |
--party-name |
Name of the party signing the CPA. Must match the |
--force |
Forces signing or validating the CPA without validating the |
--password |
The certificate password. If the certificate does not have a password or has an empty password, omit this option. |
--remove-all-signatures |
Removes all signatures from the CPA. |
--sign |
Signs the CPA. |
--clean |
The same as calling the following two together:
|
--verify |
Verifies the CPA. |
--add-all-ds:References |
Removes pre-existing |
--certificate |
URL of the certificate that signs the CPA. For example:
|
--remove-all-ds:References |
Removes all |
--remove-last-signature |
Removes the last signature from the CPA. |
The ebxmlCpaValidator tool performs a schema validation on a CPA.
Run the tool in the following format:
ebxmlCpaValidator [-offline -online] -cpa [cpa1 file] [cpa2 file] ...
The following describes the parameters.
Parameter |
Description |
-help |
Prints tool help. |
-offline |
Offline: Do not access the Internet to retrieve XML schemas; all required schemas are available locally. This the default. Online: Access the Internet to retrieve XML schemas. |
-cpa |
Paths for one or more CPAs referenced as URLs. For example: |
The mmdGenerator is for generating all possible MMDs or a specific MMD for a CPA. It can be run from a command line, but also has a user interface option.
This tool primarily is for testing whether MMDs can be generated correctly from CPAs. But if you use the tool to generate a specific MMD, it could be submitted through integration as a production MMD to Activator. If you use the tool to generate all MMDs from a CPA, the generated MMDs could not be used in production unless you manually edit the payload location file path in each MMD.
To see the command-line usage for the tool, use the –h parameter.
Use the following procedure to generate MMDs from the user interface.