use of org.opensaml.xml.schema.impl.XSStringBuilder in project webcert by sklintyg.
the class BaseFakeAuthenticationProvider method createAttribute.
protected Attribute createAttribute(String name, String value) {
Attribute attribute = new AttributeBuilder().buildObject();
attribute.setName(name);
Document doc = documentBuilder.newDocument();
Element element = doc.createElement("element");
element.setTextContent(value);
XMLObject xmlObject = new XSStringBuilder().buildObject(new QName("ns", "local"));
xmlObject.setDOM(element);
attribute.getAttributeValues().add(xmlObject);
return attribute;
}
Aggregations