This is a java problem, it has nothing to do with web services. You cannot cast an ArrayList to a Set!, they have different features. Try to send/receive array of values and work with your set after that.

Michele


On 16 Apr 2008, at 16:37, Mehdi Rabah wrote:
Hi everyone, I'm a new user of webservices/axis/soap, etc.

I've deployed a simple WS (using axis2) which return a set, and I want to deserialize it in my java client (also using axis2). But I get this error :

Exception in thread "main" java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.util.Set

Is this a common error ? If so, can you point me some doc which I must positively absolutely read to avoid basic problems like this ?

Thanks in advance,
--
Mehdi
-------

here is a part of my java lient code

        RPCServiceClient serviceClient = new RPCServiceClient();

        Options options = serviceClient.getOptions();

EndpointReference targetEPR = new EndpointReference (endPointStr);
        options.setTo(targetEPR);

        QName opFindEntry = new QName(namespaceStr, methodNameStr);

        Object[] opFindEntryArgs = new Object[] { };

        Class[] returnTypes = new Class[] { Set.class };


        Object[] response = serviceClient.invokeBlocking
(opFindEntry,
                opFindEntryArgs, returnTypes);

        Set result = (Set) response[0];


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to