這個指令會將 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 中。
範例 1
下列範例會匯入合約成為初稿狀態:
https://myhostname/webapp/wcs/stores/servlet/ContractImportDraftVersion?fileName=mydraftcontract.xml&URL=ContractDisplay
規則
這個指令會從 XML 檔中,將初稿合約匯入 WebSphere Commerce 資料庫中。
異常狀況
這個指令可能會擲出下列異常狀況:
![]() |