• Post Reply Bookmark Topic Watch Topic
  • New Topic

SOAPMessage through ObjectInputStream  RSS feed

 
Roger F. Gay
Ranch Hand
Posts: 408
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anybody know what the problem is with SOAPMessage? I can pass Document, String, and custom objects with

out.writeObject(),
in.readObject,

just fine. If a SOAPMessage is an XML document, it seems like it should be just as successful as a Document.

But I get serialization and eof errors when I try to do it with a SOAPMessage. I'm not using soapMsg.writeTo() and not doing the whole RPC thing at the moment. I want to be able to accept soap messages through the same process as the others -- i.e. without knowing in advance what type of object it is.
 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In order to use ObjectInputStream to persist an object, the object must implement java.io.Serializable.
SOAPMessage, and presumably concrete subclasses of it, do not.
You can look at the API Docs for ObjectInputStream and ObjectOutputStream for the details of using Object streams.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!