Hi Berin :) I'm using a home-made XML Encryption implementation but unfortunately I'm not the developer of it. This implementation does not support ds: and xenc: prefixes, so I try not to have them. In order to test interoperability of it with well-known API, I'm trying to encrypt a XML document with XML Security and decrypt the result with my implementation, and vice-versa. My intent is not to have two different namespaces as the default namespace for the Signature element, but trying not to have any of the ds: and xenc: prefix into the final encrypted then signed XML document : element <Signature instead of <ds:Signature and <CipherValue instead of <xenc:CipherValue.
Thanks for your help Eric > -----Message d'origine----- > De : Berin Lautenbach [mailto:[EMAIL PROTECTED] > Envoyé : mercredi 18 avril 2007 11:36 > À : security-dev@xml.apache.org > Objet : Re: Namespaces > > As far as I can see - effectively your trying to have two > different namespaces as the default namespace for the > Signature element. Which can't really be done. Or am I > misreading your intent? > > Why do you not want the namespaces? Both specs exist inside > a specific namespace, so you can't not use them. > > Cheers, > Berin > > Eric Tournier wrote: > > Hi :) > > > > I wish to encrypt then sign a XML document without the 'ds;' and > > 'xenc:' namespaces. Unfortunately, I can only suppress on of these > > namespaces :| The following code throws > XmlSecurityException always on > > the second line independent from its nature > > (EncryptionConstants.setEncryptionSpecNSprefixor or > > Constants.setSignatureSpecNSprefix) : > > (...) > > static > > { > > org.apache.xml.security.Init.init(); > > JCA.setProvider(); > > } > > > > public XMLSecurityResource() throws XMLSecurityException > > { > > // Suppression du namespace 'xenc:' > > EncryptionConstants.setEncryptionSpecNSprefix(""); > > // Suppression du namespace 'ds:' > > Constants.setSignatureSpecNSprefix(""); > > } > > (...) > > > > Could someone tell me how to resolve this ? > > Thanks > > Eric > > > > Eric TOURNIER > > Ingénieur concepteur objet senior - Expertise technique > > Java/J2EE/XML/AOP - Spring/Hibernate/Maven > > ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ > > STERIA > > Département Banque, Assurance et Finance 46, rue Camille > Desmoulins - > > 92782 Issy-Les-Moulineaux Cedex 9 Tél : 01 53 94 22 94 - > Mob : 06 17 > > 98 32 51 [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > > > > // >