andrepezzo 0 Newbie Poster

I'll try to explain better :
when constructor "a" is called , and the boolean static var set to "true". Elsewhere with the constructor "b".
Differents objects are created in the 2 constructor , so I had to implement my custom ser/deser methods. Their behaviour depends on the flag set...

I'll try right now with the boolean flag without the static identifier...

andrepezzo 0 Newbie Poster

Hi,
I have a simple class with 2 constructors.(It's very long so I won't paste it..).
I assign the value of a boolean static field according to the used constructor.
I also have implemented serialize/deser methods.

My problem is the following :
I have to perform different serialization/deserialization actions according to the constructor..so to the static field...but the static field doesn't preserve its value..
How should I do that??
How should I discrimine between them?

Thanks in Advance

andrepezzo 0 Newbie Poster

Thanks for reply....my professor keep on telling me that I have to implement ser/deser methods using Axis's (vers.1) ...Like serialization context and so on...but I don't know from how to start..
Thanks in Advance

andrepezzo 0 Newbie Poster

Yes I know that...
the problem is that "MessageContext" of Axis is NOT serializable...

andrepezzo 0 Newbie Poster

Can you post your codes ? How about WSDL ?

I'll show you the skeleton of SoapPair class. It receives from the constructor an Axis MessageContext (it's not manadatory...)..and from it divides the Soap message into header+body (2 get methods).
My aim is to serialize that class from a test main , using the 2 methods deserialize/serialized that I should override in the class.

public class SoapPair{    
 
public SoapPair(org.apache.axis.MessageContext mc) {}
 
public Message getLeft(){
	return leftmsg
}
 
public Message getRight(){
return rightmsg;
}
 

protected void _serialize(final OutputStream out) throws PostException {
}
 

public Message deSerialize(final InputStream in) throws PostException {
}
andrepezzo 0 Newbie Poster

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.