//refer to the src/resources/security/xacml/test1/request.xml
//Create the subject set
URI subjectAttrUri = new URI("urn:oasis:names:tc:xacml:1.0:subject:subject-id");
Set subjectAttributeValues = new HashSet();
subjectAttributeValues.add(new StringAttribute("Anil Saldhana"));
Attribute subjectAttr = new Attribute(subjectAttrUri, new URI(StringAttribute.identifier), null, null,
subjectAttributeValues);
Set subjectAttrSet = new HashSet();
subjectAttrSet.add(subjectAttr);
Set subjectSet = new HashSet();
subjectSet.add(new Subject(subjectAttrSet));
//Create the resource set
URI resourceUri = new URI("urn:oasis:names:tc:xacml:1.0:resource:resource-id");
Set resourceAttributeValues = new HashSet();
resourceAttributeValues.add(new StringAttribute("http://jboss.com/developers/payroll/anilsaldhana"));
Attribute resourceAttr = new Attribute(resourceUri, new URI(StringAttribute.identifier), null, null,
resourceAttributeValues);
Set resourceSet = new HashSet();
resourceSet.add(resourceAttr);
//Create the action set
URI actionUri = new URI("urn:oasis:names:tc:xacml:1.0:action:action-id");
Set actionAttributeValues = new HashSet();
actionAttributeValues.add(new StringAttribute("read"));
Attribute actionAttr = new Attribute(actionUri, new URI(StringAttribute.identifier), null, null,
actionAttributeValues);
Set actionSet = new HashSet();
actionSet.add(actionAttr);