public static String removeEmptySoapHeaders( String content, SoapVersion soapVersion ) throws XmlException
{
// XmlObject xmlObject = XmlObject.Factory.parse( content );
XmlObject xmlObject = XmlUtils.createXmlObject( content );
XmlObject[] selectPath = xmlObject.selectPath( "declare namespace soap='" + soapVersion.getEnvelopeNamespace()
+ "';/soap:Envelope/soap:Header" );
if( selectPath.length > 0 )
{
Node domNode = selectPath[0].getDomNode();
if( !domNode.hasChildNodes() && !domNode.hasAttributes() )