2016-08-29 66 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格式不正確。