public static String transferSoapHeaders(String requestContent, String newRequest, SoapVersion soapVersion) {
try {
// XmlObject source = XmlObject.Factory.parse( requestContent );
XmlObject source = XmlUtils.createXmlObject(requestContent);
String headerXPath = "declare namespace ns='" + soapVersion.getEnvelopeNamespace() + "'; //ns:Header";
XmlObject[] header = source.selectPath(headerXPath);
if (header.length == 1) {
Element headerElm = (Element) header[0].getDomNode();
NodeList childNodes = headerElm.getChildNodes();
if (childNodes.getLength() > 0) {
// XmlObject dest = XmlObject.Factory.parse( newRequest );