2016-08-29 68 views
1

我收到了这个要导入ADFS的matadata文件,但是我一直收到错误:4:108元素“md:EntityDescriptor”的前缀“md”没有绑定。XML元素没有绑定

我查看了文档,并搜索了网页的高低,仍然找不到解决它的答案。下面是与证书和联系信息的示例代码删除:

<md:EntityDescriptor ID="_63bb4679460ce67f883efc407ff14172e3472007" entityID="https://1502.censis.net/sso"> 
<md:Extensions> 
    <alg:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha512"/> 
    <alg:DigestMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#sha384"/> 
    <alg:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/> 
    <alg:DigestMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#sha224"/> 
    <alg:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> 
    <alg:SigningMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512"/> 
    <alg:SigningMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384"/> 
    <alg:SigningMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"/> 
    <alg:SigningMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha224"/> 
    <alg:SigningMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"/> 
    <alg:SigningMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"/> 
    <alg:SigningMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/> 
    <alg:SigningMethod Algorithm="http://www.w3.org/2009/xmldsig11#dsa-sha256"/> 
    <alg:SigningMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"/> 
    <alg:SigningMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> 
    <alg:SigningMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"/> 
</md:Extensions> 
<md:SPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol urn:oasis:names:tc:SAML:1.1:protocol urn:oasis:names:tc:SAML:1.0:protocol"> 
    <md:Extensions> 
     <init:RequestInitiator Binding="urn:oasis:names:tc:SAML:profiles:SSO:request-init" Location="https://1502.censis.net/Shibboleth.sso/Login"/> 
     <idpdisc:DiscoveryResponse Binding="urn:oasis:names:tc:SAML:profiles:SSO:idp-discovery-protocol" Location="https://1502.censis.net/Shibboleth.sso/Login" index="1"/> 
    </md:Extensions> 
    <md:KeyDescriptor> 
     <md:EncryptionMethod Algorithm="http://www.w3.org/2009/xmlenc11#aes128-gcm"/> 
     <md:EncryptionMethod Algorithm="http://www.w3.org/2009/xmlenc11#aes192-gcm"/> 
     <md:EncryptionMethod Algorithm="http://www.w3.org/2009/xmlenc11#aes256-gcm"/> 
     <md:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/> 
     <md:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes192-cbc"/> 
     <md:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes256-cbc"/> 
     <md:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/> 
     <md:EncryptionMethod Algorithm="http://www.w3.org/2009/xmlenc11#rsa-oaep"/> 
     <md:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"/> 
    </md:KeyDescriptor> 
    <md:ArtifactResolutionService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP" Location="https://1502.censis.net/Shibboleth.sso/Artifact/SOAP" index="1"/> 
    <md:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP" Location="https://1502.censis.net/Shibboleth.sso/SLO/SOAP"/> 
    <md:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://1502.censis.net/Shibboleth.sso/SLO/Redirect"/> 
    <md:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://1502.censis.net/Shibboleth.sso/SLO/POST"/> 
    <md:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact" Location="https://1502.censis.net/Shibboleth.sso/SLO/Artifact"/> 
    <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://1502.censis.net/Shibboleth.sso/SAML2/POST" index="1"/> 
    <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST-SimpleSign" Location="https://1502.censis.net/Shibboleth.sso/SAML2/POST-SimpleSign" index="2"/> 
    <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact" Location="https://1502.censis.net/Shibboleth.sso/SAML2/Artifact" index="3"/> 
    <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:PAOS" Location="https://1502.censis.net/Shibboleth.sso/SAML2/ECP" index="4"/> 
    <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:1.0:profiles:browser-post" Location="https://1502.censis.net/Shibboleth.sso/SAML/POST" index="5"/> 
    <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:1.0:profiles:artifact-01" Location="https://1502.censis.net/Shibboleth.sso/SAML/Artifact" index="6"/> 
</md:SPSSODescriptor> 

任何帮助将非常感激。

回答

0

没有任何名称空间前缀绑定到命名空间uri。如果您将“md”绑定到某个URI(如xmlns:md="md namespace uri"),则会出现“alg”未绑定的错误。

从规范(4 Qualified Names):

The Prefix provides the namespace prefix part of the qualified name, and MUST be associated with a namespace URI reference in a namespace declaration.

有一个在规范多了很多信息:https://www.w3.org/TR/xml-names/

如果你从别人那里接收到这个XML,你应该让他们知道, XML格式不正确。