2010-08-04 224 views
1

当我运行WCF测试客户端时,我只能在系统中看到两个“端点” - BasicHttpBinding_MyServiceWSHttpBinding_MyService如何使用WCF测试客户端测试WCF端点

现在系统接受不同类型的请求的多个,并且这些(据我可以告诉)传递到端点请求(Request[])的阵列。

这似乎很好,但它并不明显我如何使用WCF测试客户端构建这些请求对象(或实际上的阵列)的一个用于发送到服务端点。双击clientRequest(超级请求,包含子请求)的Request s参数的值,启用输入文本。我会冒险猜测入口的格式可能像JSON,但我不知道。

没有人有他们可以在这里分享相关经验吗?

+0

它看起来像了SoapUI帮助。 http://www.soapui.org/ – Ben 2010-08-04 10:24:36

+0

你尝试过SoapUI吗? – Kangkan 2010-08-04 11:48:50

回答

1

我一直通过网址传递到我的服务为再一次的参数都已经初始化,选择操作,在任何参数填充,然后点击“调用”开始WcfTestClient。参数的格式由其功能签名决定。所以,如果你期望一个int,输入一个有效的int。这里不需要JSON。

我发现这个小宝石是相当方便的,当我测试/ debuggin WCF服务。

从WcfTestService启动面板:

To add a service: 
. Select “Add Service” from the File menu or the context menu of the "My Service Projects" 
. Enter the service metadata address in the input area, and click "OK" 

To test a service operation: 
. Double click the operation you want to test from the tree on the left pane 
. A new tab page will appear on the right pane 
. Enter the value of parameters in the Request Area of the right pane 
. Click "Invoke" button 

我希望这是有一定的帮助。