Just FYI, I get the exact same error when trying to communicate a Set with
Xfire2 (aka CXF) on both side (client/server), so I'm convinced there's
something I'm doing wrong, but I'm still searching what is it. Again, if you
have some useful documentation I'll be grateful.
--
Mehdi

On Wed, Apr 16, 2008 at 5:47 PM, Michele Mazzucco <
[EMAIL PROTECTED]> wrote:

> 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