Hi all,

I ran into an issue when passing around javax.xml.soap.SOAPMessage of type
org.apache.axis.Message over live wire. It fails over RMI because it does
not like javax.xml.soap.MimeHeaders. I think MimeHeaders is part of
org.apache.axis.Message but cannot be serialized whereas
org.apache.axis.Message implements serializable.

How can I unset MimeHeaders part of org.apache.axis.Message so that I can
pass around SOAPMessage object.


SOAPMessage messsage;
MessageFactory factory = MessageFactory.newInstance();
// message points to object of type org.apache.axis.Message
message = factory.createMessage();
SOAPPart soapPart = (org.apache.axis.SOAPPart) message.getSOAPPart();
// Here I set contect of mysource
soapPart.setContent(mysource);
message.saveChanges();
return message;

This message when returned over RMI causes NotSerializable exception.

I appreciate any pointers. Thanks in advance.
-Akash.

Reply via email to