ws-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Han, Zhi (Zhi)" <zhi...@lucent.com>
Subject RE: Illegal argument
Date Thu, 22 Jun 2006 01:08:27 GMT
It doesn't work.

Firstly, for the method
public Vector abc(Vector v)
{
...
}

even on client side I try to
Vector args = new Vector();
args.add(new Vector());
client.execute("handler.abc", args);

I still got "org.apache.xmlrpc.XmlRpcException: Illegal argument for method
abc in class........"

Second,

For methods without argument, like
public Vector ping()
{
...
}
I try to 
Vector args = new Vector()
cleint.execute("handler.ping", args)

I got "org.apache.xmlrpc.XmlRpcException: Failed to invoke method ping in
class .... :null"

Another question, for the return value of method ping, abc, ..., the vector
should also be like that?

Vector val = new Vector()
val.add(new Vector())
return val

Thanks,

-----Original Message-----
From: Adam Taft [mailto:adam@hydroblaster.com]
Sent: Thursday, June 22, 2006 1:04 AM
To: xmlrpc-user@ws.apache.org
Subject: Re: Illegal argument


Zhi,

Don't you need to:

Vector args = new Vector();
args.add(new Vector());
client.execute("handler.abc", args);

XmlRpcClient.execute() requires a Vector with a list of method arguments
inside.  Since your handler method requires a vector, you need to embed
a vector in a vector.

Or, to put it another way, with your execute invocation (below), it
would work if your abc() method didn't have any arguments, like:

Vector public abc() { ... }

Adam


Han, Zhi (Zhi) wrote:
> I have a method abc in handler, like
> Vector public abc (Vector v)
> {
>    ...
> }
> 
> Why I always get illegal argument exception for method abc
> 
> On client side, I use
> 
> client.execute("handler.abc", new vector());
> 
> Thanks,
> 
> Zhi
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xmlrpc-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: xmlrpc-user-help@ws.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: xmlrpc-user-unsubscribe@ws.apache.org
For additional commands, e-mail: xmlrpc-user-help@ws.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: xmlrpc-user-unsubscribe@ws.apache.org
For additional commands, e-mail: xmlrpc-user-help@ws.apache.org


Mime
View raw message