Added marker interface for assertion types.
[shibboleth/cpp-opensaml.git] / saml / saml1 / core / impl / ProtocolsImpl.cpp
index 550367c..e3becd6 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.
@@ -26,7 +26,6 @@
 #include "saml1/core/Protocols.h"
 
 #include <xmltooling/AbstractComplexElement.h>
-#include <xmltooling/AbstractElementProxy.h>
 #include <xmltooling/AbstractSimpleElement.h>
 #include <xmltooling/impl/AnyElement.h>
 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
@@ -38,7 +37,6 @@
 
 using namespace opensaml::saml1p;
 using namespace opensaml::saml1;
-using namespace opensaml;
 using namespace xmlsignature;
 using namespace xmltooling;
 using namespace std;
@@ -544,20 +542,17 @@ namespace opensaml {
                 
             StatusDetailImpl(const StatusDetailImpl& src)
                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
-                VectorOf(XMLObject) v=getDetails();
-                for (vector<XMLObject*>::const_iterator i=src.m_Details.begin(); i!=src.m_Details.end(); i++) {
-                    if (*i) {
-                        v.push_back((*i)->clone());
-                    }
-                }
+                VectorOf(XMLObject) v=getUnknownXMLObjects();
+                for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
+                    v.push_back((*i)->clone());
             }
             
             IMPL_XMLOBJECT_CLONE(StatusDetail);
-            IMPL_XMLOBJECT_CHILDREN(Detail,m_children.end());
+            IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
     
         protected:
             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
-                getDetails().push_back(childXMLObject);
+                getUnknownXMLObjects().push_back(childXMLObject);
             }
         };
 
@@ -748,8 +743,8 @@ namespace opensaml {
                 init();
                 if (src.getStatus())
                     setStatus(src.getStatus()->cloneStatus());
-                VectorOf(Assertion) v=getAssertions();
-                for (vector<Assertion*>::const_iterator i=src.m_Assertions.begin(); i!=src.m_Assertions.end(); i++) {
+                VectorOf(saml1::Assertion) v=getAssertions();
+                for (vector<saml1::Assertion*>::const_iterator i=src.m_Assertions.begin(); i!=src.m_Assertions.end(); i++) {
                     if (*i) {
                         v.push_back((*i)->cloneAssertion());
                     }
@@ -761,12 +756,12 @@ namespace opensaml {
                 return cloneResponse();
             }
             IMPL_TYPED_CHILD(Status);
-            IMPL_TYPED_CHILDREN(Assertion, m_children.end());
+            IMPL_TYPED_FOREIGN_CHILDREN(Assertion,saml1,m_children.end());
     
         protected:
             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
                 PROC_TYPED_CHILD(Status,SAML1P_NS,false);
-                PROC_TYPED_CHILDREN(Assertion,SAML1_NS,true);
+                PROC_TYPED_FOREIGN_CHILDREN(Assertion,saml1,SAML1_NS,true);
                 ResponseAbstractTypeImpl::processChildElement(childXMLObject,root);
             }
         };