如何以编程方式检索Web服务的所有Web方法的签名? [英] How to programmatically retrieve all of a web service's web methods' signatures?

查看:63
本文介绍了如何以编程方式检索Web服务的所有Web方法的签名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试构建一个显示并调用所有特定Web服务方法的C#应用​​程序(该Web服务被编写为.asmx文件).
我可以直接转到asmx文件,并从返回的html中获取方法名称,但是我敢肯定还有一种更优雅的方法(这种方法也不会显示Web方法的签名,而只会显示其名称). ).

I'm trying to build a c# application that displays and invokes all of a specific web service's methods (the web service is written as a .asmx file).
I can go directly to the asmx file and get the methods names from the returned html, but I'm sure there is more elegant way to do it (this way doesn't reveals the web methods' signatures as well, only their names..).

那么我如何以编程方式询问服务它的方法是什么?

So how can I programmatically ask the service what are it's methods?

谢谢.

推荐答案

获取Web服务的WSDL,以发现Web服务上的所有可用方法.

Get the WSDL of your web-service to discover all available methods on the web-service.

http://server/your-webservice.asmx?wsdl

这篇关于如何以编程方式检索Web服务的所有Web方法的签名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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