简体   繁体   English

如果服务参考无法正常工作,我该怎么办?

[英]Is there anything I can do if a Service Reference is not working?

I'm trying to get a reference to Paypal's API at https://www.paypal.com/wsdl/PayPalSvc.wsdl but adding it as a service reference or as a web reference brings up 我正在尝试在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.

I feel like it's more likely I'm doing something wrong than paypal's API is broken. 我觉得比贝宝(Paypal)的API损坏,我做错的可能性更大。 The tutorial I'm following doesn't mention anything about what to do in this case and none of my research is turning anything up. 我正在关注的教程没有提及在这种情况下的处理方法,我的研究也没有发现任何问题。

Runnning wsdl manually: 手动运行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.

The wsdl isn't very .NET-friendly, it seems. 看来,wsdl并不是.NET友好的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我是否需要在 ASP.NET 中处理 web 服务参考? 我可以使用 singleton 吗? - Do I need to dispose a web service reference in ASP.NET? Can I use a singleton? 我在哪里设置服务参考的CookieContainer? - Where do I set the CookieContainer on a Service Reference? WCF REST服务不返回任何内容,因为我有一个循环引用(我认为) - WCF REST service doesn't return anything because I have a circular reference (I think) HTTPwebresponse无法正常工作,我无法发送任何信息 - HTTPwebresponse not working, I can't get anything to POST WCF服务参考无法正常工作? - WCF Service Reference not working? 我可以为 REST WCF 服务自动生成服务引用吗? - Can I generate a service reference automatically for a REST WCF service? 如何创建可以容纳所有可用内容的类型的列表? - How do I create a list of a type that can hold anything available? 库参考导入好了,intellisense看到了一切,对象被虚化了……然后我构建,找不到任何东西? - Library reference imports ok, intellisense sees everything, objects instatiated… then I build and it can't find anything? 我是否需要在ASP.NET中部署Web服务引用? - Do I need to dispose a web service reference in ASP.NET? 为什么我必须指定Uri作为我的服务参考? - Why do I have to specify a Uri for my service reference?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM