views:

44

answers:

1

When I run up WCF Test Client, I only see two "endpoints" in a system - BasicHttpBinding_MyService and WSHttpBinding_MyService.

Now the system accepts a multitude of different types of request, and these are passed into the endpoints in an array of Requests (Request[]) (as far as I can tell).

This seems fine, but it is non-obvious how I use the WCF Test Client to construct one of these Request objects (or indeed the array) for sending to the service endpoint. Double clicking on the value of the Requests parameter of the clientRequest (the super request, containing the subrequests), enables input of text. I would hazard a guess the format of entry might be like JSON, but I have no idea.

Does anyone have any relevant experience they can share here?

+1  A: 

I have always started the WcfTestClient by passing the URL to my service as a parameter then once everything has initialized, selecting the operation, filling in any parameters and clicking "Invoke". The format of the parameter is determined by it's function signature. So, if you are expect an int, enter a valid int. No JSON needed here.

I have found this little gem to be quite handy when I was testing /debuggin WCF services.

From the WcfTestService startup panel:

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

I hope this is of some help.

DaveB