|
-
January 9th, 2009, 10:51 AM
#1
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 );
outStream.flush();
return fos.toString();
But I see invalid characters all over. How should properly save this as an XML?
And this object is Serializable.
Thanks,
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|