ContractImportApprovedVersion 指令(Business edition)

這個指令會將 XML 格式的合約匯入 WebSphere Commerce。

參數值

http://host_name/path/
WebSphere Commerce Server 與架構路徑的完整名稱。您可以在這個指令中使用 http 或 https。
fileName
(必要)要作為已核准或作用中的合約來匯入的 XML 檔名稱。這個 XML 檔必須通過 B2BTrading DTD 的驗證。

要匯入的 XML 檔必須存在於 WebSphere Commerce 架構檔 (instance_name.xml) 內指定的位置中。

架構檔可在下列目錄中找到:

drive:\WebSphere\CommerceServer\instances\instance_name\xml\instance_name.xml
drive:\Program Files\WebSphere\CommerceServer\instances\instance_name\xml\instance_name.xml
/usr/WebSphere/CommerceServer/instances/instance_name/xml/instance_name.xml
/opt/WebSphere/CommerceServer/instances/instance_name/xml/instance_name.xml
/QIBM/UserData/WebCommerce/instances/instance_name/xml/instance_name.xml

其中 instance_name 為您的 WebSphere Commerce 案例名稱。

所要匯入的合約 XML 檔位置指定於 WebSphere Commerce 架構檔之 Trading 標籤的 XMLPath 屬性中。 舉例來說,如果 WebSphere Commerce 架構檔含有如下的 Trading 標籤:

<Trading DTDFileName="B2BTrading.dtd"
  DTDPath="d:/wcs/xml/trading"
  XMLPath="d:/wcs/xml/trading" />

使用此指令匯入的合約 XML 檔必須位於 d:/wcs/xml/trading 中。

targetStoreId
如果您要匯入的 XML 檔指出合約狀態為「作用中」,您就必須指定 targetStoreId 參數。 targetStoreId 是合約要匯入其中的商店之 STORE 資料庫表格中的商店 ID。
URL
(必要)當指令順利完成時所要呼叫的 URL。

範例

下列範例會匯入「已核准」的合約
https://myhostname/webapp/wcs/stores/servlet/ContractImportApprovedVersion?fileName=myspecialcontract.xml&URL=ContractDisplay

規則

這個指令會從 XML 檔中,將已核准或作用中的合約匯入 WebSphere Commerce 資料庫中。 在匯入合約之前,指令會檢查確定匯入的合約符合下列條件:

異常狀況

這個指令可能會擲出下列異常狀況:

相關概念(1275 個位元組)

相關參照

IBM copyright