Trouble with WOWebServiceClient invoke
I'm consuming a WebService written with ASP.net that has a method that uses an 'out' parameter, i.e. of this form.
[WebMethod]
int GetResultViaOutParam(out int out_param)
I have no problems if the method has no 'out' parameters, i.e. of the form.
[WebMethod]
int GetResultWith2InParams(int param1, int param2)
The WebObject code for the 'no out params' method is
int arg1 = 3;
int arg2 = 4;
Object[] arguments = { new Integer(arg1), new Integer(arg2) };
String operation = new String("GetResultWith2InParams");
Object res = serviceClient().invoke(serviceName(), operation, arguments);
The WebObject code for the 'out param' method is
int arg1 = 0;
Object[] arguments = { new Integer(arg1) };
String operation = new String("GetResultViaOutParam");
Object res = serviceClient().invoke(serviceName(), operation, arguments);
The exception that is raised by the attempt to invoke 'WebMethodWithOutParam' is
Error: Error invoking operation: javax.xml.rpc.JAXRPCException: Number of parameters passed in (1) does not match the
number of IN/OUT parameters (0) from the addParameter() calls.
How can I consume the 'GetResultViaOutParam' method?