I need to consume an existing web service in ASP.net.
我需要使用ASP.net中的现有web服务。
The documentation of the website that provides the web servicesays that I have to use WSDL.exe to generate a stub, but I can't find this tool.
提供我必须使用WSDL的web服务的网站文档。exe生成存根,但我找不到这个工具。
I also tried the Add web reference wizard
in Visual Studio 2010 (VS2010), but if I paste the URL in, VS2010 doesn't work anymore.
我还尝试了Visual Studio 2010 (VS2010)中的Add web reference向导,但是如果我将URL粘贴进来,VS2010就不再工作了。
What am I missing?
我缺少什么?
3 个解决方案
#1
0
You might also try using the Add Service Reference Wizard instead - worked for me for WebServices the Web Reference Wizard did not like quite as much. Make sure to use the link to either the asmx (if it's one) or the .wsdl
您也可以尝试使用Add Service Reference向导——在我的WebServices工作时,Web Reference向导没有那么喜欢。确保使用到asmx(如果是一个)或.wsdl的链接。
#2
1
As far as I remember there should be a choice between .net 2.0
and WCF
services.
就我所知,在。net 2.0和WCF服务之间应该有一个选择。
Try to select .net 2.0
web service type. We had to do it for using SOAP
web services running on Python.
尝试选择。net 2.0 web服务类型。我们必须使用在Python上运行的SOAP web服务。
#3
0
As far as I know, you can't create SOAP webservice with .net 4. When you creating new project, you need to choos .net 3.5 or earlier first, and then create project.
就我所知,你不能用。net 4创建SOAP webservice。在创建新项目时,需要首先选择。net 3.5或更早的版本,然后创建项目。
As for creating stub from existing wsdl, I don't know how to do it.
至于从现有的wsdl创建存根,我不知道怎么做。
#1
0
You might also try using the Add Service Reference Wizard instead - worked for me for WebServices the Web Reference Wizard did not like quite as much. Make sure to use the link to either the asmx (if it's one) or the .wsdl
您也可以尝试使用Add Service Reference向导——在我的WebServices工作时,Web Reference向导没有那么喜欢。确保使用到asmx(如果是一个)或.wsdl的链接。
#2
1
As far as I remember there should be a choice between .net 2.0
and WCF
services.
就我所知,在。net 2.0和WCF服务之间应该有一个选择。
Try to select .net 2.0
web service type. We had to do it for using SOAP
web services running on Python.
尝试选择。net 2.0 web服务类型。我们必须使用在Python上运行的SOAP web服务。
#3
0
As far as I know, you can't create SOAP webservice with .net 4. When you creating new project, you need to choos .net 3.5 or earlier first, and then create project.
就我所知,你不能用。net 4创建SOAP webservice。在创建新项目时,需要首先选择。net 3.5或更早的版本,然后创建项目。
As for creating stub from existing wsdl, I don't know how to do it.
至于从现有的wsdl创建存根,我不知道怎么做。