*/
private static XACMLPolicyQueryType makeStandardPAPQuery() {
XMLObjectBuilderFactory builderFactory = Configuration.getBuilderFactory();
XACMLPolicyQueryType xacmlPolicyQuery = (XACMLPolicyQueryType) builderFactory.getBuilder(XACMLPolicyQueryType.TYPE_NAME_XACML20)
.buildObject(XACMLPolicyQueryType.DEFAULT_ELEMENT_NAME_XACML20.getNamespaceURI(),
XACMLPolicyQueryType.DEFAULT_ELEMENT_NAME_XACML20.getLocalPart(),
XACMLPolicyQueryType.DEFAULT_ELEMENT_NAME_XACML20.getPrefix());
IssuerBuilder issuerBuilder = (IssuerBuilder) builderFactory.getBuilder(Issuer.DEFAULT_ELEMENT_NAME);
Issuer issuer = issuerBuilder.buildObject();
issuer.setValue("ISSUER_STRING");
issuer.setFormat(NameID.ENTITY);
xacmlPolicyQuery.setIssuer(issuer);
xacmlPolicyQuery.setIssueInstant(new DateTime());
xacmlPolicyQuery.setVersion(SAMLVersion.VERSION_20);
xacmlPolicyQuery.setID("_12345");
xacmlPolicyQuery.setIssueInstant(new DateTime());
// Set: this is a PAP query
ExtensionsBuilder eBuilder = (ExtensionsBuilder) builderFactory.getBuilder(new QName(SAMLConstants.SAML20MD_NS,
Extensions.LOCAL_NAME,
SAMLConstants.SAML20MD_PREFIX));
Extensions extensions = eBuilder.buildObject();
xacmlPolicyQuery.setExtensions(extensions);
return xacmlPolicyQuery;
}