微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如果服务参考不起作用,我能做什么?

如何解决如果服务参考不起作用,我能做什么?

| 我正尝试在https://www.paypal.com/wsdl/PayPalSvc.wsdl上获得对Paypal API的引用,但是会添加它作为服务引用或网络引用
charset=utf-8). If using a custom encoder,be sure that the IsContentTypeSupported     method is implemented properly. The first 1024 bytes of the response were: \'<?xml     version=\"1.0\" encoding=\"UTF-8\"?>
<wsdl:deFinitions
ns:version=\"76.0\"
xmlns:wsdl=\"http://schemas.xmlsoap.org/wsdl/\"
xmlns:xs=\"http://www.w3.org/2001/XMLSchema\"
xmlns=\"http://schemas.xmlsoap.org/wsdl/\"
xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\"
xmlns:ns=\"urn:ebay:api:PayPalAPI\"
xmlns:wsdlsoap=\"http://schemas.xmlsoap.org/wsdl/soap/\"
xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"
xmlns:ebl=\"urn:ebay:apis:eBLBaseComponents\"
xmlns:cc=\"urn:ebay:apis:CoreComponentTypes\"
xmlns:ed=\"urn:ebay:apis:EnhancedDataTypes\"
targetNamespace=\"urn:ebay:api:PayPalAPI\">
<wsdl:types>
    <schema xmlns=\"http://www.w3.org/2001/XMLSchema\" targetNamespace=\"urn:ebay:api:PayPalAPI\" elementFormDefault=\"qualified\" attributeFormDefault=\"unqualified\">
        <import namespace=\"urn:ebay:apis:CoreComponentTypes\" schemaLocation=\"CoreComponentTypes.xsd\"/>
        <import namespace=\"urn:ebay:apis:eBLBaseComponents\" schemaLocation=\"eBLBaseComponents.xsd\"/>
        <import namespace=\"urn:ebay:apis:EnhancedDataTypes\" schemaLocation=\"En\'.
If the service is defined in the current solution,try building the solution and adding the service reference again.
我觉得比贝宝(Paypal)的API损坏更可能是我做错了什么。 我要遵循的教程没有提及在这种情况下的处理方法,我的研究也没有发现任何问题。     

解决方法

        手动运行wsdl:
Error: There was an error processing \'https://www.paypalobjects.com/wsdl/PayPalS
vc.wsdl\'.
  - The document was understood,but it could not be processed.
  - The WSDL document contains links that could not be resolved.
  - The \'maxOccur\' attribute is not supported in this context.
看来,wsdl并不是.NET友好的。     

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。