Wednesday, October 2, 2013

Passing value of an array to WCF Test Client

This blog might look very simple but at least useful for first time users of  WCF test client .

The Question here is how to pass the value of an array to WCF Test Client

Your Service Method method looks like the below ; you may notice that the method accepts a List<String> Values as input parameter .

 

image

Now Lets Run the WCF Project and see how it look like in the Test Client

image

Your Test Lists the method and its Parameters as shown in the above screen shot

 

image

 

Now Lets see how we can Pass the Values to the array . In Normal scenario you may not notice how we can enter the values . But you may notice one thing that the length of the array is Zero (0) .

Now change the length of the array to 2  and see what is the change happening

 

image

Now you can see the array value section is modified with an expander an you are provided with two options to enter the values

 

image

 

Enter the values in the Value field and test your service .

 

Happy Coding :)