用于WCF服务测试的STUB [英] STUB for WCF Service testing

查看:97
本文介绍了用于WCF服务测试的STUB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我创建了一个非常基本的WCF服务,它提供了添加两个数字的功能。

//接口

Hi,

I had created a very basic WCF service, which provides the functionality to add two numbers.
//interface

[ServiceContract]
public interface IService1
{
    [OperationContract]
    int Add(int valueA, int valueB);
}
//implementation by class
public class Service1 : IService1
{
        public int Add(int valueA, int valueB)
        {
            return valueA + valueB;
        }
}



此服务绑定是net.tcp并托管在Windows服务中并在winforms app中使用。 (没问题。在Winform应用程序中获得结果)



现在要求编写一个STUB来测试服务。请帮忙。


This service binding is "net.tcp" and hosted in windows service and utilised in winforms app. (No problem in this. Getting the result in Winform app)

Now requirement is to write a STUB to test the service. Please help in this.

推荐答案

你好Vinay,



你可以通过以下链接。它提供了有关WCF服务方式的所有细节。



如何在WCF上工作(使用WCF)?如何在WCF上启动项目(使用WCF)? [ ^ ]



谢谢,

- Haresh
Hi Vinay,

You can go through following link. It provides all details on how of WCF service.

How to work on WCF(using WCF)? How to start project on WCF(using WCF)?[^]

Thanks,
- Haresh


这篇关于用于WCF服务测试的STUB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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