registrar.lookup <-> out.writeObject() vs registrar.lookup<->out.writebyte => OptionalDataException

Alex Co <[email protected]> Wed, 1 Jul 2009 07:44:59 -0600
Newsgroups gmane.comp.java.sun.jini
Message-ID <LISTSERV%[email protected]>
Hi,
Till now I can have a server java app that writes a serializable (proxy) =
class to=20
a socket using writeObject() and a client app getting that serializable o=
bject=20
using an http server for . class and registrar.lookup to get the serializ=
able=20
proxy object and even can invoke methods on that object after reconstruct=
ion.

So, the pair:       registrar.lookup <-> out.writeObject()  works fine!

Now, i would like to replace the server side code:  out.writeObject() by =
writing=20
it object to a file first and then read the file byte by byte and send th=
ose=20
bytes through the socket. Client must be able to reconstruct object using=
 registrar.lookup as usually.

When I try this second approach client fires the OptionalDataException=20=

exception in java.io.ObjectInputStream.readObject0(). I cant find out why=
.


Please, could you help me on this?

Thanks a lot

Alex

--------------------------------------------------------------------------
Getting Started:     http://www.jini.org/wiki/Category:Getting_Started
Community Web Site:  http://jini.org
jini-users Archive:  http://archives.java.sun.com/archives/jini-users.html
Unsubscribing:       email "signoff JINI-USERS"  to [email protected]