這個指令會將 XML 格式的合約匯入 WebSphere Commerce。
參數值
要匯入的 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 中。
範例
下列範例會匯入「已核准」的合約
https://myhostname/webapp/wcs/stores/servlet/ContractImportApprovedVersion?fileName=myspecialcontract.xml&URL=ContractDisplay
規則
這個指令會從 XML 檔中,將已核准或作用中的合約匯入 WebSphere Commerce 資料庫中。 在匯入合約之前,指令會檢查確定匯入的合約符合下列條件:
異常狀況
這個指令可能會擲出下列異常狀況:
![]() |