【问题标题】:Visual Studio 2008 Add Service Reference Error - WSDL - Metadata contains a reference that cannot be resolvedVisual Studio 2008 添加服务引用错误 - WSDL - 元数据包含无法解析的引用
【发布时间】:2013-04-10 13:18:48
【问题描述】:

我在本地网络的服务器上运行了一个 Web 服务。使用程序soapUI,我可以毫无问题地连接到服务。因此,当我使用soapUI 创建一个新项目并输入我的url 'http://xx.xx.xx.xx:9180/SOAOICCT/services/SessionService?wsdl' 时,它加载没有问题。

当我尝试使用相同的 URL 在 Visual Studio 2008 中添加服务引用时,我收到“添加服务引用错误”:

There was an error downloading 'http://xx.xx.xx.xx:9180/SOAOICCT/services/SessionService?wsdl'.
The request failed with HTTP status 504: Gateway Timeout.
Metadata contains a reference that cannot be resolved: 'http://47.166.94.33:9180/SOAOICCT/services/SessionService?wsdl'.
The remote server returned an error: (504) Gateway Timeout.
The remote server returned an error: (504) Gateway Timeout.
If the service is defined in the current solution, try building the solution and adding the service reference again.

当我尝试从 Visual Studio 命令提示符使用 wsdl.exe 命令时,我收到错误消息:

有什么建议吗?

【问题讨论】:

    标签: visual-studio-2008 wsdl soapui


    【解决方案1】:

    我不是 100% 的问题是什么,但这里是修复的摘要。

    问题出在主机名上。在服务器上,主机名是“cs1ktest”,但 Visual Studio 认为主机名是 47.166.94.33

    所以,我更新了主机文件并添加了一行

    47.166.94.33    cs1ktest
    

    我再次尝试了 wsdl.exe,将 ip 地址替换为“cs1ktest”和 BOOM!!!

    成功了。

    【讨论】:

      猜你喜欢
      • 2013-07-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多