Hi,
 
I am doing a project which do the signature for SOAP messages using wss4j.
I have a handler to do the signature.
 
Previously when using Axis, I can do the following:
 
public void execute(final javax.xml.soap.SOAPEnvelope envelope) {
    org.w3c.dom.Document doc = ((org.apache.axis.message.SOAPEnvelope)envelope).getAsDocument();
    // doing something to modify the doc, e.g., add more header and do signature using wss4j.
    // after modifying doc, the original envelope has updated.   
}
 
but now in Axis2, the following give some problem:
public void execute(final org.apache.axis2.soap.SOAPEnvelope envelope) {
    org.w3c.dom.Document doc = Axis2Utils.getDocumentFromSOAPEnvelope(SOAPEnvelope env);
    // doing something to modify the doc, e.g., add more header and do signature using wss4j.
    // after modifying doc, the original envelope has NOT updated.   
}
 
Ruchith has suggested to use Rampart. But now I do not really have time to redesign and use Rampart. The only thing I need to sort out is how to make the Axis2 SOAPEnvelope as convenient as Axis SOAPEnvelope.
 
I think this problem is quite common, has anyone already faced this problem? Could you give some suggestion how to solve the problem?
 
 
 
Regards,
Xinjun

Reply via email to