public void addToParent(Element headerE) throws Exception {
  Document doc=headerE.getOwnerDocument();
  Element securityE=doc.createElementNS(wsseNS,WSSEConstants.TAG_WSSE + ":" + WSSEConstants.TAG_SECURITYT);
  securityE.setAttributeNS(SOAPBindingConstants.NS_XML,WSSEConstants.TAG_XML_WSSE,wsseNS);
  headerE.appendChild(securityE);
  Document binaryTokenD=XMLUtils.toDOMDocument(toString(),debug);
  Element binaryTokenE=binaryTokenD.getDocumentElement();
  securityE.appendChild(doc.importNode(binaryTokenE,true));
}

public void addToParent ( Element headerE ) throws Exception { Document doc = headerE . getOwnerDocument ( ) ; Element securityE = doc . createElementNS ( wsseNS , WSSEConstants . TAG_WSSE + ":" + WSSEConstants . TAG_SECURITYT ) ; securityE . setAttributeNS ( SOAPBindingConstants . NS_XML , WSSEConstants . TAG_XML_WSSE , wsseNS ) ; headerE . appendChild ( securityE ) ; Document binaryTokenD = XMLUtils . toDOMDocument ( toString ( ) , debug ) ; Element binaryTokenE = binaryTokenD . getDocumentElement ( ) ; securityE . appendChild ( doc . importNode ( binaryTokenE , true ) ) ; }
adds th binary security token to the header element .
