2013-04-10 81 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

它的工作。

相關問題