mace-opensaml-users - Changing namespace declaration
Subject: OpenSAML user discussion
List archive
- From: Christina Cunningham <>
- To:
- Subject: Changing namespace declaration
- Date: Tue, 20 May 2008 10:36:56 +0100
To enable greater compatibility with some of our existing implementations of code, I am looking to change the namespace declaration on the marshalled objects but haven't found a way to do this.
Currently have (for example):
<xacml-context:Request xmlns:xacml-context="urn:oasis:names:tc:xacml:2.0:context:schema:os">
Ideally would like to have:
<Request xmlns="urn:oasis:names:tc:xacml:2.0:context:schema:os">
I have tried to clear the namespaces and add a new namespace with no prefix as follows...
<code>
RequestTypeImplBuilder xacmlRequest = (RequestTypeImplBuilder)builderFactory
.getBuilder(RequestType.DEFAULT_ELEMENT_NAME);
RequestType request = xacmlRequest.buildObject();
request.getNamespaces().clear();
request.getNamespaces().add(new Namespace("urn:oasis:names:tc:xacml:2.0:context:schema:os", ""));
</code>
...but I get an java.lang.UnsupportedOperationException thrown on request.getNamespaces().clear();. I have also tried passing in a new QName("urn:oasis:names:tc:xacml:2.0:context:schema:os", "Request", "") in place of the RequestType.DEFAULT_ELEMENT_NAME to the builderFactory but that has no effect.
Is it possible to do this? I am using opensaml 2.1.0.
Thanks,
Christina
--
Christina Cunningham
Software Engineer
Belfast eScience Centre (BeSC)
Queen's University, Belfast
e: c.cunningham [at] besc.ac.uk
w: www.besc.ac.uk
- Changing namespace declaration, Christina Cunningham, 05/20/2008
- <Possible follow-up(s)>
- Changing namespace declaration, christina . cunningham, 05/20/2008
- Re: [OpenSAML] Changing namespace declaration, Chad La Joie, 05/21/2008
- Re: [OpenSAML] Changing namespace declaration, Christina Cunningham, 05/26/2008
- Re: [OpenSAML] Changing namespace declaration, Chad La Joie, 05/21/2008
Archive powered by MHonArc 2.6.16.