从服务URL或WSDL动态使用WCF服务 [英] Dynamically consuming WCF Service from Service URL or WSDL
问题描述
我有一个要求,我必须动态地在我的应用程序中使用WCF(svc)服务,即我的应用程序中有一个文本框用户输入服务的URL并点击一个按钮,这将使我的服务在我的应用程序中消耗。我将在屏幕上列出服务的方法。
为了更清楚,我需要实现在visual studio中显示的相同弹出窗口添加引用,通过将url放在旁边的文本框中,单击按钮时显示所有方法和界面。
任何帮助都将是赞赏。
谢谢,
Sagar
我希望服务发布元数据,或者我怀疑答案是你不能。
也许这可能会有所帮助:
http://dotnetmentors.com/wcf/creating-dynamic-proxy- using-wcf-channelfactory.aspx [ ^ ]
Hi,
I have an requirement where I have to consume WCF(svc) services in my application dynamically, i.e. I will have a textbox in my application where the user enters the URL of the service and hits a button which will make my service consumable in my application. I will list out the methods of the service on the screen.
To be more clear, I need to implement the same pop up that appears in visual studio which shows up adding reference that shows all the methods and interface when clicked on button by putting url in the textbox beside it.
Any help will be appreciated.
Thanks,
Sagar
I hope the services publish metadata, or I suspect the answer will be 'you can't'.
Perhaps this might help:
http://dotnetmentors.com/wcf/creating-dynamic-proxy-using-wcf-channelfactory.aspx[^]
这篇关于从服务URL或WSDL动态使用WCF服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!