/* */ public UsernameToken(Element element) throws WSSecurityException
/* */ {
/* 57 */ this.doc = element.getOwnerDocument();
/* 58 */ String id = element.getAttributeNS("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd", "Id");
/* 59 */ if ((id == null) || (id.length() == 0)) {
/* 60 */ throw new WSSecurityException("Invalid message, UsernameToken is missing an id");
/* */ }
/* 62 */ setId(id);
/* */
/* 64 */ Element child = Util.getFirstChildElement(element);
/* 65 */ if ((child == null) || (!"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd".equals(child.getNamespaceURI())) || (!"Username".equals(child.getLocalName()))) {
/* 66 */ throw new WSSecurityException("Username child expected in UsernameToken element");
/* */ }
/* 68 */ this.username = XMLUtils.getFullTextChildrenFromElement(child);
/* */
/* 70 */ child = Util.getNextSiblingElement(child);
/* 71 */ if ((child == null) || (!"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd".equals(child.getNamespaceURI())) || (!"Password".equals(child.getLocalName()))) {
/* 72 */ throw new WSSecurityException("Password child expected in UsernameToken element");
/* */ }
/* 74 */ this.password = XMLUtils.getFullTextChildrenFromElement(child);
/* */ }