You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Igor Nogueira <ig...@gmail.com> on 2008/09/19 13:28:31 UTC
MessageContext writeExternal
Hey all!
I've got a doubt. How can I save the MessageContext? I have following piece
of code:
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(baos);
oos.writeObject(MessageContext.getCurrentMessageContext());
But it doesn't work. It gives me the following error:
Caused by: java.lang.ClassCastException: java.lang.Object cannot be cast to
java.io.ObjectOutput
at ShoppingCart.getState(ShoppingCart.java:97) ...
Is that the right way of saving the Message context? What's wrong on this
code?
Thank you in advance,
Igor Nogueira