String username = principal.getName();
//Create the subject set
URI subjectAttrUri = new URI(XACMLConstants.SUBJECT_IDENTIFIER);
Attribute subjectAttr = new Attribute(subjectAttrUri,null,null,
new StringAttribute(username));
Set<Attribute> subjectAttrSet = new HashSet<Attribute>();
subjectAttrSet.add(subjectAttr);
subjectAttrSet.addAll(getXACMLRoleSet(roles));
Set<Subject> subjectSet = new HashSet<Subject>();
subjectSet.add(new Subject(subjectAttrSet));
//Create the resource set
URI resourceUri = new URI(XACMLConstants.RESOURCE_IDENTIFIER);
Attribute resourceAttr = new Attribute(resourceUri,null,null,
new StringAttribute(ejbName));
Set<Attribute> resourceSet = new HashSet<Attribute>();
resourceSet.add(resourceAttr);
//Create the action set
Set<Attribute> actionSet = new HashSet<Attribute>();
actionSet.add(new Attribute(new URI(XACMLConstants.ACTION_IDENTIFIER),
null,null, new StringAttribute(action)));
//TODO: Get hold of the invocation arguments and populate in the xacml request
//Create the Environment set
Set<Attribute> environSet = new HashSet<Attribute>();