在Visual Studio 2008(C#)中加载WSDL时出现问题 [英] Problem loading WSDL in Visual Studio 2008 (C#)
问题描述
为我提供了一个wsdl文件来创建Web服务客户端.
当我使用VS加载Web参考时,从向导屏幕中可以看到这三种方法.但是一旦进入项目对象浏览器,就看不到方法或数据类型.
但是,如果我使用加载服务参考",则可以看到所有内容.但是问题是这种方式只能生成一个Interface而不是一个class.我仍然无法使用它来创建Web服务客户端.
我还尝试了VS2003和VS2005.结果是相似的.
任何专家都可以提供帮助吗?
I was given a wsdl file to create a web service client.
When I use VS to load Web Reference, from the wizard screen I can see the three methods. But once I go to project object browser, I can''t see the methods or the data types.
But if I use load Service Reference, I can see everything. however the problem is this way only generates an Interface not a class. Still I can''t create use it to create a web service client.
I also tried on VS2003 and VS2005. the result is similar.
Any guru can help ?
推荐答案
如何使用WSDL工具?
http://msdn.microsoft.com/en-us/library/7h3ystb6%28v = vs.71%29.aspx [ ^ ]
例如从命令行
How about using the WSDL tool?
http://msdn.microsoft.com/en-us/library/7h3ystb6%28v=vs.71%29.aspx[^]
e.g. from command line
wsdl /out:C:\myProxyClass.cs http://hostServer/WebserviceRoot/WebServiceName.asmx?WSDL
只需将生成的类添加到您的项目中
Just add the generated class into your project
这篇关于在Visual Studio 2008(C#)中加载WSDL时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!