Have you set the stream buffer to the beginning before reading from it?

Regards,

Raj

-----Original Message-----
From: Ric Searle [mailto:[EMAIL PROTECTED] 
Sent: 30 September 2003 14:06
To: [EMAIL PROTECTED]
Subject: Serializing a SOAPEnvelope


Hi,

Just a quick one about serialization:

I have a SOAPEnvelope object, which I want to write to disk to be 
processed later.  I thought that serializing it would be a  nice idea.  
I'm serializing it like this:

                FileOutputStream fos = new FileOutputStream(outFile);
         ObjectOutputStream oos = new ObjectOutputStream(fos);

         oos.writeObject(soapEnvelope);

         oos.close();
         fos.flush();
         fos.close();


But when I deserialize it by doing this...

                ObjectInputStream ois = new ObjectInputStream(fis);
         SOAPEnvelope soapEnvelope = (SOAPEnvelope) ois.readObject();
         ois.close();

...the structure of the original SOAP message is there, but none of the 
content is recovered.

What am I doing wrong?

Regards,

Ric Searle

This e-mail and any attachment is for authorised use by the intended recipient(s) 
only. It may contain proprietary material, confidential information and/or be subject 
to legal privilege. It should not be copied, disclosed to, retained or used by, any 
other party. If you are not an intended recipient then please promptly delete this 
e-mail and any attachment and all copies and inform the sender. Thank you.

LogicaCMG global sponsors, Gartner Symposium, Cannes, 4th -7th November 2003

http://symposium.gartner.com/story.php.id.3323.s.5.html

Please note that LogicaCMG does not have control over content from,or availability of, 
this website

Reply via email to