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
