I've got a response containing the following Obligation element:
<Obligation ObligationId="urn:oasis:names:tc:xacml:example:obligation:email" FulfillOn="Permit">
<AttributeAssignment
AttributeId="urn:oasis:names:tc:xacml:2.0:example:attribute:mailto"
DataType="http://www.w3.org/2001/XMLSchema#string">
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">
</AttributeValue>
</AttributeAssignment>
(and 3 more attributes)
</Obligation>
When looping through the list of attributes I can get attribute ids but not values. I've tried a few approaches, this being the simplest.
List attributeList = obligation.getAssignments();
Iterator it = attributeList.iterator();
while (it.hasNext()) {
Attribute att = (Attribute)it.next();
URI uri = att.getId();
System.out.println("attribute id: " + uri.toString());
System.out.println("attribute value: " + att.getValue().toString());
}
Any ideas or examples would be appreciated. Not sure if the XACML response is incorrect either.