I've found the Visual Studio WCF test client quite useful when it comes to a quick test of my WCF service. This is the test client found in this location relative to your Visual Studio install directory:
\Common7\IDE\WcfTestClient.exe
I have a few service calls that require a parameter of type System.Int32[]
I can't seem to figure out what values to enter against for this parameter as i keep receiving the error
'[value entered]' is not a valid value for this type
Trying to enter the value 27 i have tried the following, but all fails
27
{ 27 }
new System.Int32[] { 27 }
Can anyone please help with how to do this
If you want to enter array values you must first specify the array length - length=2. You then get the drop-down arrow allowing you to enter the individual array values. Took me a while... If you want to enter array values you must first specify the array length - length=2.
Test the ServiceFrom the main menu, click DEBUG > Start Without Debugging. This starts the service and invokes the WCF Test Client window. The left pane shows the endpoint for your service and the operations that are exposed. In the left pane, double-click the Read() operation.
After you create a new WCF service project and press F5 to start the debugger, the WCF Service Host begins to host the service in your project. Then, WCF Test Client opens and displays a list of service endpoints defined in the configuration file.
Type length=1
in the Value
column, a ▶
will appear allowing you to add values in the array:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With