如何使用现有的 wsdl 动态调用 WCF 服务? [英] How to dynamically invoke WCF service using existing wsdl?
本文介绍了如何使用现有的 wsdl 动态调用 WCF 服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人知道如何使用现有的 wsdl 文件动态调用 WCF 服务吗?因此,我不需要使用添加服务引用...".一切都应该动态完成.
Does anybody know how to dynamically invoke WCF service using existing wsdl file? Thus, I don't need to use "Add Service Reference...". Everything should be done dynamically.
我在互联网上搜索过,但没有找到与以下内容类似的内容:
I've searched the internet and haven't found anything that is similar to:
EndpointAddress address = new EndpointAddress("http://localhost:3929/Service1.svc?wsdl");
EndpointAddress address = new EndpointAddress("http://localhost:3929/Service1.svc?wsdl");
我使用 VS2008 (.NET 3.5).
I use VS2008 (.NET 3.5).
提前致谢.
戈兰
推荐答案
如果您查看 Channel Factory 这应该是您所需要的.
If you take a look at the Channel Factory this should be what you need.
这篇关于如何使用现有的 wsdl 动态调用 WCF 服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文