2013-04-10 84 views
0

我在本地网络上的服务器上运行Web服务。使用soapUI程序,我可以连接到服务没有问题。所以当我使用soapUI创建一个新项目并输入我的网址'http://xx.xx.xx.xx:9180/SOAOICCT/services/SessionService?wsdl'时,它加载没有问题。Visual Studio 2008添加服务引用错误 - WSDL - 元数据包含无法解析的引用

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

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用命令命令提示符我得到一个错误: enter image description here

有什么建议吗?

回答

0

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

问题出在主机名上。在服务器上,主机名是“cs1ktest”,但视觉工作室认为主机名是47.166.94.33

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

47.166.94.33 cs1ktest 

,我尝试了WSDL。再次使用'cs1ktest'和BOOM替换IP地址!

enter image description here

它的工作。

相关问题