如何从asp.net中的Web服务创建WSDL文件 [英] how to create a WSDL file from a web service in asp.net

查看:217
本文介绍了如何从asp.net中的Web服务创建WSDL文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

heyy ...我在wsdl中新建...我创建了一个Web服务..并调用它工作正常..但现在我想从WSDL调用Web服务。(或webservice到WSDL ..)。 。我不知道如何制作WSDL并调用网络服务...



你可以帮我...任何链接或解决方案.. ??? div class =h2_lin>解决方案





你必须有这样的网络服务http://localhost/MyWebService.asmx



对于你的webservice wsdl,你必须把这个地址放在浏览器地址栏:

http:// localhost / MyWebService .asmx ?wsdl



如果你想使用这个wsdl,你必须去visual studio并添加web引用使用wsdl地址。您还可以通过命令行生成服务代理,执行:

wsdl.exe http://localhost/MyWebService.asmx?wsdl

$ /


2014-02-28

----------



检查配置文件中是否有此设置:



 < ;  行为 >  
< servicebehaviors >
< 行为 >
< servicemetadata httpgetenabled = true >
< / servicemetadata >
< / behavior >
< / servicebehaviors >
< / behavior >





httpGetEnabled属性必须设置为是的。



我想你正在使用WCF


heyy...iam new in wsdl...I created a web service ..and invoke that it works fine..but now I want to call the web service from WSDL.(or webservice to WSDL..)..I don't know how to make WSDL and call the web service...

could you help mee..any link or solution..???

解决方案

Hi,

You must have a webservice like this http://localhost/MyWebService.asmx

For retreive your webservice wsdl you must put this address at the browser address bar:
http://localhost/MyWebService.asmx?wsdl

If you want to use this wsdl, you must go to the visual studio and add web reference with the wsdl address. You can also, generate your service proxy by command-line, executing:
wsdl.exe http://localhost/MyWebService.asmx?wsdl


2014-02-28
----------

Check your configuration file for this setting:

<behaviors>
   <servicebehaviors>
     <behavior>
       <servicemetadata httpgetenabled="true">
     </servicemetadata>
   </behavior>
 </servicebehaviors>
</behaviors>



The httpGetEnabled attribute must be set to true.

I suppose you are using WCF


这篇关于如何从asp.net中的Web服务创建WSDL文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆