public DirectReference(Element element) throws WSSecurityException
{
this.doc = element.getOwnerDocument();
if (!"Reference".equals(element.getLocalName()))
throw new WSSecurityException("Invalid message, invalid local name on a DirectReference");
String uri = element.getAttribute("URI");
if (uri == null || uri.length() == 0)
throw new WSSecurityException("Inavliad message, Reference element is missing a URI");
setUri(uri);
String valueType = element.getAttribute("ValueType");
if (valueType == null || valueType.length() == 0)
throw new WSSecurityException("Inavliad message, Reference element is missing a ValueType");
setValueType(valueType);
}