Oracle® Application Server Integration B2B User's Guide
10g Release 2 (10.1.2.0.2) B19370-01 |
|
Previous |
Next |
With the trading partner self-service API, you can create trading partners and agreements "on the fly" (programmatically) or use the command line utility, particularly to create many trading partners at once. The API uses XML-based descriptors for trading partners and agreements.This chapter details the formats of the XML trading partner and agreement descriptors, describes how to use the trading partner self-service API, and references example files.
This chapter contains the following topics:
See the following for information on how to create trading partners and trading partner agreements using the OracleAS Integration B2B user interface.
The characteristics and capabilities of a trading partner are described through an XML file, whose format is defined by the XSD provided in the example file OrclTPProfilesV2-6.xsd
. See "Example Files" for the location of the file.
Table 14-1 lists the elements and attributes of the trading partner XML file.
Table 14-1 Trading Partner Descriptor XML File
Elements | Description and Attributes |
---|---|
|
The root element that contains one or more trading partner profiles. |
|
Contains all the information needed to create a trading partner, and therefore is the root for a single trading partner. The Attributes:
|
|
Specifies zero or more trading partner IDs. Attributes:
|
|
Contains all the information that describes the operational capability of a trading partner. |
|
Describes a supported business action for the trading partner. Attributes:
|
|
Specifies any document type parameters that need to be different from the protocol default, as well as the document definition. Attributes:
|
|
Specifies zero or more document type parameters and their values that need to be different from the defaults. Attributes:
|
|
Contains information pertaining to the document definition. Attributes:
|
|
Contains all information pertaining to the communication capabilities of a trading partner. |
|
Contains information regarding a delivery channel for a trading partner. Attributes:
|
|
Specifies information relating to document exchange for a trading partner. Attributes:
|
|
Specifies the exchange protocol. Attributes:
|
|
Specifies the exchange protocol parameters that must be different from the defaults. Attributes:
|
|
Contains information relevant to encryption, such as the certificate location. |
|
Contains certification information. Attributes:
|
|
Contains information relevant to nonrepudiation. |
|
Specifies the transport information for this delivery channel. Attributes:
|
|
Specifies the transport information for this delivery channel. Attributes:
|
|
Identifies the transport protocol (HTTP for example). Attributes:
|
|
Specifies transport protocol parameters. Attributes:
|
The characteristics and capabilities of an agreement are described through an XML file, whose format is defined by the XSD provided in the example file Agreements.xsd
. See "Example Files" for the location of the file.
Table 14-2 lists the elements and attributes of the agreement XML file.
Table 14-2 Agreement Descriptor XML File
Elements | Description and Attributes |
---|---|
|
Contains descriptions of one or more agreements. |
|
Contains the description for an agreement. Attributes:
|
|
Describes the participants in this business action. |
|
Describes the trading partner initiating the business action. Attributes:
|
|
Describes the delivery channel used in the agreement. Attributes:
|
|
Describes the responding trading partner in the business action.
|
|
Describes the Delivery Channel used in the agreement. Attributes:
|
|
Describes the callout usage in the agreement. Attributes:
|
Clients can use the self-service API programmatically to create trading partners and agreements, as shown in the following example:
FileInputStream fis = new FileInputStream(tpFile); InputSource is = new InputSource(fis); TradingPartnerManager tpMgr = TradingPartnerManager.newInstance(); tpMgr.init(); if (args.length == 2) { tpMgr.processTPProfiles(is, true); } else { tpMgr.processTPProfiles(is, false); } tpMgr.shutdown(); FileInputStream fis = new FileInputStream(tpFile); InputSource is = new InputSource(fis); AgreementManager agreementMgr = AgreementManager.newInstance(); agreementMgr.init(); agreementMgr.processAgreements(is); agreementMgr.shutdown();
You can also use the command line utility of the API.
To create trading partner profiles from the specified XML file:
java oracle.tip.adapter.b2b.selfservice.TradingPartnerManager <TPData.xml>
To create agreements from the specified XML file:
java oracle.tip.adapter.b2b.selfservice.AgreementManager <AgreementData.xml>