Serializing an object not working properly - funky chars.
I have a java webservice.. I need to log the response before returning. I am trying to serialize as below:
ByteArrayOutputStream fos = new ByteArrayOutputStream();
ObjectOutputStream outStream = new ObjectOutputStream( fos );
outStream.writeObject( response );
But I see invalid characters all over. How should properly save this as an XML? Thanks,
Edit: And this object is Serializable.
Message was edited by: getstarted