Sylvain:

Here's something you might want to try in samples.echo.TestClient -- at
the beginning of the verify() method, add these lines:

    if (sent.getClass() != gotBack.getClass()) {
        System.out.println("sent: " + sent.getClass().toString() + ",
got back: " +
                                    gotBack.getClass().toString());
    }

You'll see that the arrays that you sent come back as ArrayLists. In our
tests, we've seen the same thing for Vectors.

Steve



Original message:

Steven,

I suggests that you take a look at the echo service from the samples
directory.

Sylvain.

-----Original Message-----
From: Steven Gollery [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 04, 2002 1:41 PM
To: [EMAIL PROTECTED]
Subject: serializing Arrays, ArrayLists, Vectors


Hello,

It appears that serializing and deserializing Java Arrays, ArrayLists,
and Vectors converts them all to ArrayLists. Suppose I need to not only
pass the contents of the lists but also retain the type (for instance, a

Vector from the client needs to be deserialized as a Vector on the
server, and vice versa). I would assume that I need to write custom
serializers for arrays and Vectors. Is this right? Has anyone done this,

or can give me some advice?

Thanks in advance,

Steven Gollery
[EMAIL PROTECTED]




Reply via email to