[jdom-interest] Namespace inheritance after cloning
Jason Hunter
jhunter at xquery.com
Sun Nov 28 10:53:38 PST 2004
Can you please send in executable code (like a unit test) and remove all
the useless attributes and elements that don't change the behavior?
-jh-
Alistair Young wrote:
> The inheritance problem I get is:
>
> If I clone:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Assertion xmlns="urn:oasis:names:tc:SAML:1.0:assertion"
> AssertionID="Assertion-id" MajorVersion="1" MinorVersion="1"
> Issuer="guanxi.uhi.ac.uk" IssueInstant="2004-10-01T14:24:59Z">
> <AuthenticationStatement AuthenticationInstant="2004-10-01T14:24:59Z"
> AuthenticationMethod="urn:oasis:names:tc:SAML:1.0:am:password">
> <Subject>
> <NameIdentifier Format="urn:mace:shibboleth:1.0:nameIdentifier"
> NameQualifier="https://idp.example.org/shibboleth/">OFFLINE</NameIdentifier>
> <SubjectConfirmation>
> <ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:bearer</ConfirmationMethod>
> </SubjectConfirmation>
> </Subject>
> </AuthenticationStatement>
> </Assertion>
>
> and add it to:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Response xmlns="urn:oasis:names:tc:SAML:1.0:protocol"
> xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol"
> IssueInstant="2004-10-01T14:24:59Z" MajorVersion="1" MinorVersion="1"
> Recipient="http://localhost/Shibboleth.shire" ResponseID="Response-id">
> <Assertion xmlns="urn:oasis:names:tc:SAML:1.0:assertion"
> AssertionID="Assertion-id" IssueInstant="2004-10-01T14:24:59Z"
> Issuer="guanxi.uhi.ac.uk" MajorVersion="1" MinorVersion="1">
>
> I get:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Response xmlns="urn:oasis:names:tc:SAML:1.0:protocol"
> xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol"
> IssueInstant="2004-10-01T14:24:59Z" MajorVersion="1" MinorVersion="1"
> Recipient="http://localhost/Shibboleth.shire" ResponseID="Response-id">
> <Assertion xmlns="urn:oasis:names:tc:SAML:1.0:assertion"
> AssertionID="Assertion-id" IssueInstant="2004-10-01T14:24:59Z"
> Issuer="guanxi.uhi.ac.uk" MajorVersion="1" MinorVersion="1">
> <AuthenticationStatement xmlns=""
> AuthenticationInstant="2004-10-01T14:24:59Z"
> AuthenticationMethod="urn:oasis:names:tc:SAML:1.0:am:password">
> <Subject>
> <NameIdentifier Format="urn:mace:shibboleth:1.0:nameIdentifier"
> NameQualifier="https://idp.example.org/shibboleth/">OFFLINE</NameIdentifier>
> <SubjectConfirmation>
> <ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:bearer</ConfirmationMethod>
> </SubjectConfirmation>
> </Subject>
> </AuthenticationStatement>
> </Assertion>
> </Response>
>
> AuthenticationStatement has suddenly grown a new xmlns="", overriding it's
> default namespace. All the Assertion children have the same namespace set
> when creating the elements. It seems that when I clone the Assertion and
> add it to the root element, I lose the namespace on
> AuthenticationStatement.
>
> any advice appreciated.
> thanks,
> Alistair
>
More information about the jdom-interest
mailing list