I have been trying to modify the content of the message body in one of my handlers before the message reaches the actual web service. I have read through a number of message from the mailing list, and tried just about everything I can think of. But my message body is unchanged after leaving my handler. Below is my current code. Does anyone have any suggestions?
public void invoke(MessageContext msgContext) throws AxisFault {
// Retrieve the soap body out of the message
Message message = msgContext.getRequestMessage();
org.apache.axis.message.SOAPEnvelope se = message.getSOAPEnvelope();
org.apache.axis.message.SOAPBody sb = (org.apache.axis.message.SOAPBody)se.getBody();
// Generic test
MessageElement mElement = new MessageElement("","body_test");
mElement.addTextNode("body test");
sb.addChild(mElement);
message.saveChanges();
System.out.println("handler 1 = " + sb.toString());
}
The final println statement shows the exact message I started off with, without my changes.
Thanks
Tripper McCarthy
[EMAIL PROTECTED]