WCF and out parameters
It seems there is restriction in having the number of out parameters in WCF开发者_Python百科. My service reference only downloads one out parameter.
Example: if the service has the following method:
void methodA(out string param1, out string param2)
then the service reference will only create
methodA(out string param1).
Anyone knows how to solve this?
I don't believe there's a limit to the number of out-parameters.
However, for a method that returns void
, the first out-parameter actually becomes the return value of the method in the service reference due to a limitation in WSDL. So I would expect the signature of the method to become string methodA(out string param2)
.
Not sure of a correct fix, but I would return a list of items and not use out parameters in this situation.
精彩评论