But now the situation is:
<xacml-context:Response
xmlns:xacml-context="urn:oasis:names:tc:xacml:2.0:context:schema:os">
<Result ResourceId="ID_REID"
xmlns="urn:oasis:names:tc:xacml:2.0:context:schema:os">
<Decision>NotApplicable</Decision>
<Status>
<StatusCode Value="urn:oasis:names:tc:xacml:1.0:status:ok"/>
</Status>
</Result>
</xacml-context:Response>
Is there a way to normalize namespace like:
<xacml-context:Response
xmlns:xacml-context="urn:oasis:names:tc:xacml:2.0:context:schema:os">
<xacml-context:Result ResourceId="REID">
<xacml-context:Decision>NotApplicable</xacml-context:Decision>
<xacml-context:Status>
<xacml-context:StatusCode
Value="urn:oasis:names:tc:xacml:1.0:status:ok"/>
</xacml-context:Status>
</xacml-context:Result>
</xacml-context:Response>
the second one was hand-made by me with:
XMLObjectBuilderFactory xmlfac= Configuration.getBuilderFactory();
ResponseTypeImplBuilder builder=(ResponseTypeImplBuilder)
xmlfac.getBuilder(ResponseType.DEFAULT_ELEMENT_NAME);
ResponseType testresponse=builder.buildObject();
ResultTypeImplBuilder b1=(ResultTypeImplBuilder)
xmlfac.getBuilder(ResultType.DEFAULT_ELEMENT_NAME);
ResultType resulttype=b1.buildObject();
DecisionTypeImplBuilder b2=(DecisionTypeImplBuilder)
xmlfac.getBuilder(DecisionType.DEFAULT_ELEMENT_NAME);
DecisionType decisiontype=b2.buildObject();
StatusTypeImplBuilder b3=(StatusTypeImplBuilder)
xmlfac.getBuilder(StatusType.DEFAULT_ELEMENT_NAME);
StatusType statustype=b3.buildObject();
StatusCodeTypeImplBuilder b4=(StatusCodeTypeImplBuilder)
xmlfac.getBuilder(StatusCodeType.DEFAULT_ELEMENT_NAME);
StatusCodeType statuscodetype=b4.buildObject();
statuscodetype.setValue(StatusCodeType.SC_OK);
statustype.setStatusCode(statuscodetype);
decisiontype.setDecision(DECISION.NotApplicable);
resulttype.setDecision(decisiontype);
resulttype.setStatus(statustype);
resulttype.setResourceId("REs IDID");
testresponse.setResult(resulttype);
Thx in advice at all.
Bye,
Alessio
--
To unsubscribe from this list send an email to dev-uns...@shibboleth.net
OpenSAML should handle them equivalently, in terms of the XMLObject tree
that it builds when it unmarshalls. The only delta would be the cached DOM.
Question: why do you think it's necessary to "normalize the
namespace"? If the recipient is just going to process the response as
the XMLObject tree, then the namespace decl usage really won't matter.
But if you really, really wanted to make the response you got from the
PDP look like what you built, you could (I think) just drop the cached
DOM from the XMLObject tree, and then re-marshall it. That's
inefficient but it's the only obvious easy way. You could also just fix
up the parsed DOM before you unmarshall it, but that then becomes a DOM
API question, not an OpenSAML one.
--Brent
Thx again for attention.