santuario-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wolfgang Schmiesing <wolfgang.schmies...@trustcenter.de>
Subject Namespace definition in XMLObject
Date Wed, 11 May 2011 11:37:11 GMT
Hi,

I'm currently using the "javax.xml.crypto.dsig" API to create a 
signature. Now, is there any way of assigning a namespace definition to
an <Object> element inside the signature? The output I need should look 
similar to this:

<Signature>
     ...
<Object xmlns:test="http://www.example.org/ns" Id="someId">
<test:someElem />
<test:someElem />
</Object>
</Signature>

I'm currently creating the <Object> element using the following call:

> XMLSignatureFactory.newXMLObject( List content, String id, String 
> mimeType, String encoding );

This returns a javax.xml.crypto.dsig.XMLObject. Unfortunately, I can't 
find a way of assigning a namespace in "XMLObject".

I managed to create an <Object> element with a namespace using 
"org.apache.xml.security.signature.ObjectContainer" but
am currently not able to switch to XMLSecurity APIs. Is this the only 
way to do it or am I missing something?



Kind regards,

Wolfgang


Mime
View raw message