WCF options and exit

There seems to be a limit on the number of output parameters in WCF. My service link loads only one parameter.

Example: if the service has the following method:

void methodA(out string param1, out string param2) 

then the link to the service will only create

 methodA(out string param1). 

Does anyone know how to solve this?

+4
source share
2 answers

I do not think that there is a limit on the number of out-parameters.

However, for a method that returns void , the first external parameter actually becomes the return value of the method in the service reference due to a limitation in the WSDL. Therefore, I expect the method signature to become string methodA(out string param2) .

+8
source

Not sure about the correct fix, but I would return a list of items and not use parameters in this situation.

+2
source

All Articles