使用 vb.net 使用标准的 SOAP Web 服务
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24500270/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
consuming standard SOAP Web Service using vb.net
提问by Dan
I have consumed several wsdl services successfully, but am stuck now with this web service. Am implementing Hotelston webservice which state :Hotelston.com API is a standard SOAP Web Service (WS) available at URL http://www.hotelston.com/ws/HotelService?wsdl
我已经成功使用了几个 wsdl 服务,但现在我被这个 Web 服务困住了。我正在实施 Hotelston 网络服务,其中声明:Hotelston.com API 是标准的 SOAP 网络服务 (WS),网址为 http://www.hotelston.com/ws/HotelService?wsdl
I cant access the direct code of the webservice after i added the it as a reference in my application.
在我的应用程序中添加它作为参考后,我无法访问 web 服务的直接代码。
Please see the following MSDN articles for the exact details on how I added and used these web service references but still cant access it from the direct code.
有关我如何添加和使用这些 Web 服务引用但仍然无法从直接代码访问它的确切详细信息,请参阅以下 MSDN 文章。
How to: Add and Remove Web References
For full API documentation of wsdl file through the link.
回答by Paul Abbott
If you show all files in the project and expand the service reference out, Reference.cs is empty. This is likely because there are namespace errors in HotelService.wsdl ("ax23", specifically) that is causing the t4 template to fail to generate the service code. Bottom line, it's their fault, not yours.
如果您显示项目中的所有文件并将服务引用展开,则 Reference.cs 为空。这可能是因为 HotelService.wsdl(特别是“ax23”)中的命名空间错误导致 t4 模板无法生成服务代码。归根结底,这是他们的错,而不是你的错。

