如何在客户端应用程序中使用WCF服务? [英] How to consume WCF service in client Application ?

查看:84
本文介绍了如何在客户端应用程序中使用WCF服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我创建了WCF服务库,它提供了默认的接口和服务方法以及App.config。



我创建了testClient应用程序,它是在 SVCUTIL.exe 的帮助下的控制台。

在命令提示符下,我已经为WCF类库创建了代理。



运行 svcutil.exe out config ...... 。,我得到了 proxygeneraion.cs app.config 文件。



现在我想要使用WCF中可用的方法。

如何使用WCF方法?



我没有得到如何在客户端访问WCF方法?



我这里没有命名空间和类名。

从哪里可以获得这些?



欢迎使用方法!!!



谢谢。

Hi,

I have created WCF service Library which gives me default Interface and service method and App.config.

I have after created testClient Application, which is console with the help of SVCUTIL.exe.
In command prompt, I have created proxy for WCF class library.

After running svcutil.exe out config......., I got proxygeneraion.cs and app.config file.

Now I want to consume methods available in WCF.
How can I consume WCF methods?

I am not getting how to access WCF methods in client?

I am not having namespace and class name here.
From where can I get these?

Approaches are welcome!!!

Thanks.

推荐答案

有什么问题?消费比创建服务更简单。一切都很好解释: http://msdn.microsoft.com/en-us/library/bb332338.aspx [ ^ ]。< br $>


-SA
What can be a problem? Consuming is simpler than creating a service. Everything is well explained: http://msdn.microsoft.com/en-us/library/bb332338.aspx[^].

—SA


这篇关于如何在客户端应用程序中使用WCF服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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