Hi all,
i have a problem using saaj implementation of AXIS2 (1.5.2) with xmlsec:
after encrypt a node it delete it's original content with this algorithm:
while (node.hasChildNodes()) {
node.removeChild(node.getFirstChild());
}
that fail with TextNodes.
In attachment a simple client that reproduce the bug. Any workaround or fix?
Thanks,
Lorenzo
package test;
import java.io.IOException;
import javax.xml.namespace.QName;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPBodyElement;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
public class ClientSOAP {
/**
* @param args
* @throws SOAPException
* @throws IOException
*/
public static void main(String[] args) throws SOAPException, IOException {
MessageFactory mf = MessageFactory.newInstance();
SOAPMessage msg = mf.createMessage();
SOAPBody body = msg.getSOAPBody();
SOAPBodyElement bodyChild = body.addBodyElement(new QName("TestChild"));
bodyChild.addTextNode("aaaaa");
bodyChild.removeChild(bodyChild.getFirstChild());
}
}