Hi..my aim is to serialize/deserialize my "SoapPair" class , that contains Axis MessageContext obj (SoapPair receives this from its constructor), not serializable object(when trying to normally serialize , it returns "axis MessageContext not serializable")..
How do I serialize/deser the SoapPair class?
Do I have to use SerializationContext/Deser context? How?
Thanks in Advance.
andrepezzo 0 Newbie Poster
Recommended Answers
Jump to PostYou need to mark the field of type
MessageContext
astransient
so that the serialization mechanism doesn't attempt to serialize it. This only works if the state of theMessageContext
has no significance whatsoever to the newly reconstitutedSoapPair
object. If it does, then you have to manually write out …
Jump to PostI haven't worked with Axis so wouldn't know the context involved but like I previously suggested, either mark the field as
transient
or implement your ownreadObject
andwriteObject
methods to get around the restriction. Search for 'serialization java' with the search engine of your choice and you should find …
All 7 Replies
AlbertPi -3 Light Poster
andrepezzo 0 Newbie Poster
mahlerfive 23 Junior Poster in Training
andrepezzo 0 Newbie Poster
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
andrepezzo 0 Newbie Poster
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.