簡體   English   中英

WSDL服務參考給出錯誤

[英]WSDL service reference giving error

我正在使用doc數據支付網關服務,當我嘗試向其請求創建訂單時,它引發以下異常:

XmlSerializer屬性System.Xml.Serialization.XmlAttributeAttribute在版本中無效。 IsWrapped為true時,僅支持XmlElement,XmlArray,XmlArrayItem,XmlAnyAttribute和XmlAnyElement屬性。

我認為這與服務無關。 在執行方面,我在做什么錯。 有人可以幫我嗎?

編輯

我使用了DocDataPayments網關,並使用了它們給出的wsdl Refreence來進行呼叫。

我正在執行的create調用如下:-

PaymentServiceSOAPClient client = new PaymentServiceSOAPClient();
createSuccess success = new createSuccess();
client.create(merchant, strMTID, paymentPreferences, menuPreferences, shopper, totalGrossAmount, billTo, "description", "Thanks for your purchase", true, new paymentRequest(), new invoice(), new technicalIntegrationInfo(), Convert.ToDecimal(0.9), out success);

我認為,您正在使用wcf默認序列化程序來創建代理類。您可以嘗試使用DataContract序列化程序而不是默認序列化程序。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM