axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ric Searle <...@dialogue.co.uk>
Subject Serializing a SOAPEnvelope
Date Tue, 30 Sep 2003 13:05:58 GMT
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


Mime
View raw message