try {
SOAPMessage msg = ((SOAPMessageContext) mc).getMessage();
Node child = msg.getSOAPPart().getEnvelope().getBody()
.getFirstChild()
.getFirstChild()
.getFirstChild();
String name = child.getNodeValue();
if (name != null && name.equals("Joe")) {
child.setNodeValue("Sam");
}
return true;
} catch (Exception ex) {
ex.printStackTrace();
return false;
}