Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to test webservice with "out" params

Status
Not open for further replies.

redsss

Programmer
Mar 17, 2004
72
US
I have a webservice with a method that uses "out" parameters to return data to the client.

When a client calls up the WSDL for the webservice and clicks on the method, it says "The test form is only available for methods with primitive types or arrays of primitive types as parameters."

Is there a way to enable the user to test this webservice, without me having to develop a special page for this purpose?
 
What's the type of the parameter? The message is saying it's not one of the supported types.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Its a string type. The WSDL works if the parameter is a byval, which can only be used to pass a value TO the webservice, but this method is used to get a value FROM the webservice, hence the param is an "out" param of type string.
 
That should work, as string is one of the fundamental datatypes used by SOAP.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
I wonder what I'm doing wrong?

To experiment, I created another simple web service in VSNET 1.1, and created a simple ConvertTemperature webservice (which is the simple walkthrough in the help file).

The WSDL screen enabled me to test it from there, then I simple added an extra string parameter to the method and I get the same error:
Code:
The test form is only available for methods with primitive types or arrays of primitive types as parameters

The only change I made from the example was changing the method signature as follows:
Code:
public double ConvertTemperature(double dFahrenheit, out string mystring )
And I initialize mystring in the method. Any ideas?
 
Just so you know... you can't modify a reference item on a webservice. You have to pass the value and then set the value again when you submit the data.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top