简体   繁体   English

编写控制台程序以在 silverlight 中测试我的 wcf 服务

[英]writing a console program to test my wcf service in silverlight

Hi i need to write a console program to test a web service that i have, any idea how to do that?嗨,我需要编写一个控制台程序来测试我拥有的 web 服务,知道该怎么做吗? and where do i place the codes?我在哪里放置代码?

Step 1: Create a new console app: File > New Project > in the Windows tab > Console app第 1 步:创建一个新的控制台应用程序: File > New Project > in the Windows tab > Console app

在此处输入图像描述

Step 2: add a service reference to your service: in Solution Explorer, right-click on References > Add Service Reference and add your service第 2 步:向您的服务添加服务引用:在解决方案资源管理器中,右键单击“ References > Add Service Reference ”并添加您的服务

在此处输入图像描述

在此处输入图像描述

Step 3: code your calls to the service and test your service第 3 步:编码您对服务的调用并测试您的服务

So which part is not clear to you?那么你不清楚哪一部分?

You do not need to create console for that, you just need to open the application the is created for that.您不需要为此创建控制台,您只需要打开为此创建的应用程序。 See your WcfTestClient.Exe located most probably at:查看您的 WcfTestClient.Exe 很可能位于:

C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE

Or, if you insist to have a different test approach eg: Parallel or Stress call, you can just create new Console App and add a service reference to your project and it should be available to you by then.或者,如果您坚持使用不同的测试方法,例如:并行或压力调用,您可以创建新的控制台应用程序并向您的项目添加服务引用,届时您应该可以使用它。

There is no need to write, its already availble不用写了,已经可以了

http://msdn.microsoft.com/en-us/library/ee383989.aspx http://msdn.microsoft.com/en-us/library/ee383989.aspx

you can use wcf storm, google it and download你可以使用 wcf 风暴,谷歌它并下载

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM