Update copyright.
[shibboleth/opensaml2.git] / saml / saml2 / metadata / impl / AbstractMetadataProvider.cpp
index 59e4303..fde978a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2001-2006 Internet2
+ *  Copyright 2001-2007 Internet2
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@
  */
 
 #include "internal.h"
-#include "SAMLArtifact.h"
+#include "binding/SAMLArtifact.h"
 #include "saml2/metadata/Metadata.h"
 #include "saml2/metadata/AbstractMetadataProvider.h"
 
@@ -80,12 +80,12 @@ void AbstractMetadataProvider::index(EntityDescriptor* site, time_t validUntil)
     const vector<IDPSSODescriptor*>& roles=const_cast<const EntityDescriptor*>(site)->getIDPSSODescriptors();
     for (vector<IDPSSODescriptor*>::const_iterator i=roles.begin(); i!=roles.end(); i++) {
         // SAML 1.x?
-        if ((*i)->hasSupport(SAMLConstants::SAML10_PROTOCOL_ENUM) || (*i)->hasSupport(SAMLConstants::SAML11_PROTOCOL_ENUM)) {
+        if ((*i)->hasSupport(samlconstants::SAML10_PROTOCOL_ENUM) || (*i)->hasSupport(samlconstants::SAML11_PROTOCOL_ENUM)) {
             // Check for SourceID extension element.
             const Extensions* exts=(*i)->getExtensions();
-            if (exts) {
-                const list<XMLObject*>& children=exts->getXMLObjects();
-                for (list<XMLObject*>::const_iterator ext=children.begin(); ext!=children.end(); ext++) {
+            if (exts && exts->hasChildren()) {
+                const vector<XMLObject*>& children=exts->getUnknownXMLObjects();
+                for (vector<XMLObject*>::const_iterator ext=children.begin(); ext!=children.end(); ++ext) {
                     SourceID* sid=dynamic_cast<SourceID*>(*ext);
                     if (sid) {
                         auto_ptr_char sourceid(sid->getID());
@@ -112,7 +112,7 @@ void AbstractMetadataProvider::index(EntityDescriptor* site, time_t validUntil)
         }
         
         // SAML 2.0?
-        if ((*i)->hasSupport(SAMLConstants::SAML20P_NS)) {
+        if ((*i)->hasSupport(samlconstants::SAML20P_NS)) {
             // Hash the ID.
             m_sources.insert(
                 pair<string,const EntityDescriptor*>(SAMLConfig::getConfig().hashSHA1(id.get(), true),site)