2012-11-27 71 views

回答

4

我拉下了WSDL,並在第1292行和第1295行做了以下更改。請注意兩個內部simpleTypes上的新名稱屬性。

<xs:simpleType name="positiveIntegerOrAll"> 
<xs:union> 
    <xs:simpleType name="positiveTestOne"> 
     <xs:restriction base="xs:positiveInteger"/> 
    </xs:simpleType> 
    <xs:simpleType name="positiveTestTwo"> 
     <xs:restriction base="xs:string"> 
     <xs:enumeration value="All"/> 
    </xs:restriction> 
    </xs:simpleType> 
    </xs:union> 
</xs:simpleType> 

之後,我能夠使用這個修改後的文件成功創建Apex類。我沒有測試實際調用它,但生成它時沒有錯誤。

Salesforce使用內部wsdl2apex工具,該工具不支持許多WSDL功能。有一個Supported WSDL Features的列表。除此之外,你通常可以破解源代碼WSDL以獲得合理的支持。

+0

謝謝丹尼爾:)頂點代碼生成沒有任何錯誤。 – Satty

0

因此,您已嘗試使用某個用戶界面將該Web Service添加到Salesforce中,並返回該錯誤,對嗎?

如果是,那麼您可以嘗試在本地保存該wsdl - 修復必需的節點並嘗試Salesforce上傳您的wsdl文件副本,或上傳Internet主機上的某處並向Salesforce提供新地址。

如果不是,那麼我需要更多關於你如何使用wsdl的信息。

+0

感謝您的回覆!遵循@Daniel Ballinger的守則並獲得頂尖課程。 – Satty