Reference > Shop flow URLs > Trading subsystem URLs > Account and contract URLs


ContractImportApprovedVersion URL

This URL imports a contract in XML format into WebSphere Commerce.


URL structure

https:// host_name/path/

The fully qualified name of the WebSphere Commerce Server and the configuration path.

Diagram of the URL structure: The URL starts with the fully qualified name of the WebSphere Commerce Server and the configuration path, followed by the URL name, ContractImportApprovedVersion , and the ? character. End the URL with a list of parameters in the form of name-value pairs. Separate each <a href=name-value pair with the & character. For a detailed description of the parameters and their values, see the list entitled Parameter values." />

Before issuing This URL, be logged into WebSphere Commerce. You can log in to WebSphere Commerce using the Logon command


Parameter values

fileName

Required: The name of the XML file that to import as an approved or active contract. The XML file must be validated with the B2BTrading DTD.

The XML file being imported must exist in the location specified in the WebSphere Commerce configuration file, and the file must be validated with the B2BTrading DTD or Package.xsd.

The location for the contract XML file to be imported is specified in the XMLPath attribute of the Trading tag in the WebSphere Commerce configuration file. For example, if the WebSphere Commerce configuration file contains the following section:

<Trading
DTDFileName="B2BTrading.dtd"
DTDPath="/trading/dtd"
XMLPath="/trading/xml"
XSDPath="/trading/xsd" />

The contract XML file to be imported using this URL must be in WC_EAR/xml/trading/xml.

xsd

Required: Specifies whether the contract XML is DTD- or XSD-based. Valid values for this parameter are true and false. Use true when the contract is XSD-based. Use false when the contract is DTD-base.

If this parameter is not specified, a value of false is assumed.

targetStoreId

If the XML file you are importing states a contract state of "active", specify the targetStoreId parameter. The targetStoreId is the store ID from the STORE database table for the store to import the contract into.

validate

Specifies whether the contract XML should be validated by the XML parser. Valid values for this parameter are true and false. Use true to have the contract validated. Use false to prevent the contract from being validated by the XML parser.

If this parameter is not specified, a value of true is assumed.

synchronousDeployment

Specifies whether the deployment of the contract should be run as a scheduled job, or the command should not return until the contract deployment has completed. Valid values for this parameter are true and false. Use true to have the contract deployment run as part of the contract import. Use false to have a scheduled job deploy the contract.

If this parameter is not specified, a value of false is assumed.

contractList

Specifies whether the file specified in the fileName parameter contains a list of contract XML files that should be imported. Valid values for this parameter are true and false. Use true to specify that the file in the fileName parameter contains a list of contract XML files. Use false to specify that the file in the fileName parameter is a contract XML file.

If this parameter is not specified, a value of false is assumed.

URL

Required: The URL to be called when the command completes successfully.


Example

The following example imports an "approved" contract:

https://myhostname/webapp/wcs/stores/servlet/ContractImportApprovedVersion?fileName=myspecialcontract.xml
&xsd=true&URL=StoreCatalogDisplay?storeId=512&catalogId=512


Behavior

This URL imports an approved or active contract into the WebSphere Commerce database from an XML file. Before importing the contract, the command checks to ensure the contract being imported meets the following conditions:


Exception conditions

The following exceptions may be thrown by This URL:


+

Search Tips   |   Advanced Search