B2B command-line tools are available for a number of tasks.
Note:
Command-line tools are for administrator use only. No security or permission checks are performed to prevent the logged-in user from purging, importing, or exporting data.This chapter contains the following topics:
Do the following before using the command-line tools:
Set ORACLE_HOME
to your Oracle Fusion Middleware installation directory and then set the following environment variables:
ANT_HOME - $ORACLE_HOME/.../modules/org.apache.ant_1.7.0
JAVA_HOME - $ORACLE_HOME/.../jdk160_11
Create jndi.properties
.
cd $ORACLE_HOME/bin
ant -f ant-b2b-util.xml b2bcreate-prop
Edit the jndi.properties
file to include the weblogic
password.
Note:
Before purging data, exporting or archiving data is recommended.No security or permission checks are performed to prevent the logged-in user from purging data.
The following utility purges both design-time and run-time data and resets the environment to the installation time.
ant -f ant-b2b-util.xml b2bpurge
Table 18-1 lists the options for this command-line utility.
Table 18-1 Options for ant -f ant-b2b-util.xml b2bpurge
Option | Description | Domain | Required |
---|---|---|---|
mode |
Specifies purging design-time or run-time data. |
DT RT |
No |
msgState |
Deletes messages with the specified message state. Used for run-time data. |
MSG_COMPLETE MSG_ERROR MSG_WAIT_TRANSMIT MSG_WAIT_FA MSG_WAIT_BATCH |
No. If |
start |
Deletes messages that are created on or after the specified date. Used for run-time data. |
dd-MMM-yyyy |
No |
end |
Deletes messages that are created on or before the specified date. Used for run-time data. |
dd-MMM-yyyy |
No |
purgecontrolnumber |
Deletes control numbers. Used for run-time data. |
|
No |
Note:
No security or permission checks are performed to prevent the logged-in user from importing data.The following utility imports a configuration ZIP file to the repository. Basic validation is performed, but it is not a complete validation as with deployment validation. No data is overwritten unless you use the overwrite
option.
ant -f ant-b2b-util.xml b2bimport -Dlocalfile=true -Dexportfile="/tmp/export.zip"
Table 18-2 lists the options for this command-line utility.
Table 18-2 Options for ant -f ant-b2b-util.xml b2bimport
Option | Description | Domain | Required |
---|---|---|---|
exportfile |
Location of the export (ZIP) file |
- |
Yes |
|
Overwrites the existing business elements. For example, an existing delivery channel with the same trading partner name as a delivery channel in the import file is replaced if this option is set to |
|
No |
|
If the export file location exists on the server, then set this option to true to improve performance. The export file must be on the server on which B2B is running. |
|
No |
Note:
No security or permission checks are performed to prevent the logged-in user from exporting data.The following utility exports the entire repository (without policy details) if no other options are specified.
ant -f ant-b2b-util.xml b2bexport
Table 18-3 lists the options for this command-line utility.
Table 18-3 Options for ant -f ant-b2b-util.xml b2bexport
Option | Description | Domain | Required |
---|---|---|---|
exportfile |
Location of the ZIP file where the exported data is stored |
|
No |
tpname |
The trading partner name to be exported |
Name of the trading partner |
No |
tpanames |
One or more agreement names to be exported. If one agreement is exported, then the ZIP file contains the folder |
Agreement names must be separated by a comma |
No |
active |
Exports agreements that have been deployed and are in active state. |
|
No |
|
Set to true to export the entire repository with user and role details, which is needed for the policy store. A warning is displayed to remind you to export the policy store also. See Section 10.2, "What Is Copied When You Import or Export from the Import/Export Tab," |
|
No |
Example 18-5 Exports the Trading Partner Acme to /tmp/Acme.zip
ant -f ant-b2b-util.xml b2bexport -Dtpname="Acme" -Dexportfile="/tmp/Acme.zip"
The following utility creates a cpp_cpa.properties
template file, which is used in the propfile
option.
ant -f ant-b2b-util.xml b2bcreate-cpaprop
Table 18-4 lists the options for this command-line utility.
Table 18-4 Options for ant -f ant-b2b-util.xml b2bcpaimport
Option | Description | Domain | Required |
---|---|---|---|
propfile |
Property file that stores configuration details for |
- |
Yes |
Example 18-8 Creates a Property File Template That Is Used in the propfile Option
ant -f ant-b2b-util.xml b2bcreate-cpaprop
The following properties can be configured as part of the cpp_cpa properties
file:
The CPA import properties are as follows:
oracle.tip.b2b.ebms.BPSSDocument (Optional Property)
This property holds the absolute path for the BPSS document, which is used to get the BPSS document details to be imported into the Oracle B2B repository. If the property does not exist, then the values are imported from the CPA document. Multiple BPSS documents are separated by ;
(semi-colon).
oracle.tip.b2b.ebms.CPADocument (Required Property)
This property is used to get the absolute path of the CPA document to be imported into the Oracle B2B repository.
oracle.tip.b2b.ebms.xsdLocation (Optional Property)
This property is used to specify the absolute path of the schema file location. This schema file is used for document validation. It is used only when a BPSS document is specified.
oracle.tip.b2b.ebms.internalDeliveryChannel.protocol (Optional Property)
The default internal delivery channel is an AQ queue. If you want to add a specific internal delivery channel (JMS/FTP/FILE/SFTP), then this property is used in Oracle B2B configuration. Specify all the required properties with respect to the specific transport protocol. Then use the specific channel to send messages to back-end applications.
The CPA export properties are as follows:
oracle.tip.b2b.ebms.OutputFolder (Required Property)
This property is used to place the generated CPP/CPA files in the specified location.
oracle.tip.b2b.ebms.Host (Required Property)
This property is used to set the host trading partner.
oracle.tip.b2b.ebms.HostEndPoint (Required Property)
This property is used to set the host endpoint while generating the CPP/CPA export.
oracle.tip.b2b.ebms.HostCertificateAlias (Optional Property)
For secure message transfer, this property is used to get the host certificate details to the CPP/CPA export.
oracle.tip.b2b.ebms.TPCertificateAlias (Optional Property)
For secure message transfer, this property is used to get the trading partner certificate details to the CPP/CPA export.
oracle.tip.b2b.ebms.BPSSExport (Optional Property)
This Boolean property is used to generate the BPSS document.
The common properties are as follows:
oracle.tip.b2b.ebms.LogDirectory (Required Property)
This property is used to store the log files.
oracle.tip.b2b.ebms.LogLevel (Required Property)
This property is used to specify the mode of the logs, such as DEBUG, INFO, or ERROR.
oracle.tip.b2b.ebms.LogType (Required Property)
This property is used to specify whether the log file is stored as text or XML.
The following utility converts an ebXML standard cpa.xml
file to an Oracle B2B metadata file, which must then be imported into Oracle B2B.
ant -f ant-b2b-util.xml b2bcpaimport
Table 18-5 lists the options for this command-line utility.
The following utility converts an Oracle B2B metadata file (data exported from Oracle B2B) to an ebXML standard cpa.xml
file (a CPA-ready configuration).
ant -f ant-b2b-util.xml b2bcpaexport
Table 18-6 lists the options for this command-line utility.
If you get the following broken pipe error, use Oracle WebLogic Server Administration Console to increase Maximum Message Size to 200000000.
[java] Exception in thread "main" java.lang.Exception: java.rmi.UnmarshalException: Broken pipe; nested exception is: [java] java.net.SocketException: Broken pipe [java] at oracle.tip.b2b.utility.B2BCommandLineUtility.upgradeRepository(B2BCommandLineUtility.java:548) [java] at oracle.tip.b2b.utility.B2BCommandLineUtility.main(B2BCommandLineUtility.java:601) [java] Caused by: java.rmi.UnmarshalException: Broken pipe; nested exception is: [java] java.net.SocketException: Broken pipe