2010-08-04 142 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 

我希望這是有一定的幫助。