【问题标题】:Custom tool warnings when using VS2010 service reference使用 VS2010 服务参考时的自定义工具警告
【发布时间】:2011-11-06 03:42:33
【问题描述】:

我正在尝试继续使用 First Data 的 Global Gateway Web Service API。第一个奇怪的事情是我需要将 wsdl 和 xsd 文件下载到我的本地机器上。然后使用本地机器的副本作为服务参考。我没有使用很多网络服务,所以我认为这没关系。

添加它们并尝试编译后,我收到以下错误:

Warning 1   Custom tool warning: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.XmlSerializerMessageContractImporter
Error: There was a problem loading the XSD documents provided: a reference to a schema element with name 'AVSResponse' and namespace 'http://secure.linkpt.net/fdggwsapi/schemas_us/fdggwsapi' could not be resolved because the element definition could not be found in the schema for targetNamespace 'http://secure.linkpt.net/fdggwsapi/schemas_us/fdggwsapi'. Please check the XSD documents provided and try again.
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://secure.linkpt.net/fdggwsapi/schemas_us/fdggwsapi']/wsdl:portType[@name='FDGGWSApiOrder'] C:\Documents and Settings\user\my documents\visual studio 2010\Projects\sltnProcessCreditCard\ProcessCreditCard\Service References\ServiceReference\Reference.svcmap    1   1   ProcessCreditCard

Warning 2   Custom tool warning: Cannot import wsdl:binding
Detail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on.
XPath to wsdl:portType: //wsdl:definitions[@targetNamespace='http://secure.linkpt.net/fdggwsapi/schemas_us/fdggwsapi']/wsdl:portType[@name='FDGGWSApiOrder']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://secure.linkpt.net/fdggwsapi/schemas_us/fdggwsapi']/wsdl:binding[@name='FDGGWSApiOrderBinding']   C:\Documents and Settings\user\my documents\visual studio 2010\Projects\sltnProcessCreditCard\ProcessCreditCard\Service References\ServiceReference\Reference.svcmap    1   1   ProcessCreditCard

Warning 3   Custom tool warning: Cannot import wsdl:port
Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.
XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://secure.linkpt.net/fdggwsapi/schemas_us/fdggwsapi']/wsdl:binding[@name='FDGGWSApiOrderBinding']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://secure.linkpt.net/fdggwsapi/schemas_us/fdggwsapi']/wsdl:service[@name='FDGGWSApiOrderService']/wsdl:port[@name='FDGGWSApiOrderPort'] C:\Documents and Settings\user\my documents\visual studio 2010\Projects\sltnProcessCreditCard\ProcessCreditCard\Service References\ServiceReference\Reference.svcmap    1   1   ProcessCreditCard

我尝试了很多地方提到的“Reuse types in referenced assemblies”,但并没有解决问题。有没有人遇到过这个错误?你是怎么解决的?

【问题讨论】:

    标签: visual-studio-2010 xsd wsdl service-reference firstdata


    【解决方案1】:

    我发现this answer 似乎至少可以让我继续工作。同时,我对其他想法持开放态度。

    更新:引用答案以便于找到它:

    尝试将其添加为 .NET 2.0 Web 参考。

    转到添加服务参考,然后单击“高级”按钮。然后,您可以选择将其添加为 .NET 2.0 Web 参考。我这样做了,并让它工作。我无法通过标准的“添加服务参考”

    【讨论】:

      猜你喜欢
      • 2013-09-11
      • 2020-06-18
      • 1970-01-01
      • 2011-07-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-02-18
      相关资源
      最近更新 更多