Unable to generate a temporary class (result=1). error CS0030:

本小妞迷上赌 提交于 2019-12-05 12:05:47

问题


I am trying to paypal express checkout i used https://www.sandbox.paypal.com/wsdl/PayPalSvc.wsdl. when i call use

PayPalAPIAASoapBinding paypal = new PayPalAPIAASoapBinding(); 

i am getting error

Unable to generate a temporary class (result=1). error CS0030: Cannot convert type 'exprtesscheckoutdemo.com.paypal.sandbox.TupleType[]' to 'paypal.sandbox.TupleType' error CS0029: Cannot implicitly convert type 'paypal.sandbox.TupleType' to

how to over come this


回答1:


Just hit this myself when updating to version 119. In your generated Web service file, do a find for [][] and replace all occurrences with []. The bad guy seems to be the merchantDataField in the PaymentDetailsType.

It seems to be a bug in the Microsoft WSDL tools when interacting with services that have "nested nodes with the maxOccurs attribute set to unbounded"; I've encountered it before when interacting with FedEx SOAP APIs as well.



来源:https://stackoverflow.com/questions/27380146/unable-to-generate-a-temporary-class-result-1-error-cs0030

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!