Clean up protocol abstract type classes (need proper casts in binding plugins).
authorScott Cantor <cantor.2@osu.edu>
Wed, 27 Sep 2006 02:07:48 +0000 (02:07 +0000)
committerScott Cantor <cantor.2@osu.edu>
Wed, 27 Sep 2006 02:07:48 +0000 (02:07 +0000)
saml/saml2/core/Protocols.h
saml/saml2/core/impl/Protocols20Impl.cpp
saml/saml2/core/impl/Protocols20SchemaValidators.cpp
samltest/Makefile.am
samltest/saml2/core/impl/StatusResponse20Test.h [deleted file]
samltest/samltest.vcproj

index 4b0dcf8..02a3d87 100644 (file)
@@ -37,8 +37,6 @@ namespace opensaml {
      */
     namespace saml2p {
 
-        //TODO sync C++ and Java class/interface names, e.g. -Type or no -Type, etc
-
         DECL_XMLOBJECT_SIMPLE(SAML_API,Artifact,Artifact,SAML 2.0 Artifact element);
         DECL_XMLOBJECT_SIMPLE(SAML_API,GetComplete,GetComplete,SAML 2.0 GetComplete element);
         DECL_XMLOBJECT_SIMPLE(SAML_API,NewID,NewID,SAML 2.0 NewID element);
@@ -53,7 +51,7 @@ namespace opensaml {
             static const XMLCh TYPE_NAME[];
         END_XMLOBJECT;
 
-        BEGIN_XMLOBJECT(SAML_API,Request,SignableObject,SAML 2.0 Request element);
+        BEGIN_XMLOBJECT(SAML_API,RequestAbstractType,SignableObject,SAML 2.0 RequestAbstractType base type);
             DECL_STRING_ATTRIB(ID,ID);
             DECL_STRING_ATTRIB(Version,VER);
             DECL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT);
@@ -143,7 +141,7 @@ namespace opensaml {
             static const XMLCh TYPE_NAME[];
         END_XMLOBJECT;
 
-        BEGIN_XMLOBJECT(SAML_API,StatusResponse,SignableObject,SAML 2.0 StatusResponse element);
+        BEGIN_XMLOBJECT(SAML_API,StatusResponseType,SignableObject,SAML 2.0 StatusResponseType base type);
             DECL_STRING_ATTRIB(ID,ID);
             DECL_STRING_ATTRIB(InResponseTo,INRESPONSETO);
             DECL_STRING_ATTRIB(Version,VER);
@@ -160,15 +158,15 @@ namespace opensaml {
             static const XMLCh TYPE_NAME[];
         END_XMLOBJECT;
 
-        BEGIN_XMLOBJECT(SAML_API,AssertionIDRequest,Request,SAML 2.0 AssertionIDRequest element);
+        BEGIN_XMLOBJECT(SAML_API,AssertionIDRequest,RequestAbstractType,SAML 2.0 AssertionIDRequest element);
             DECL_TYPED_FOREIGN_CHILDREN(AssertionIDRef,saml2);
             /** AssertionIDRequest local name */
             static const XMLCh TYPE_NAME[];
         END_XMLOBJECT;
 
-        BEGIN_XMLOBJECT(SAML_API,SubjectQuery,Request,SAML 2.0 SubjectQuery element);
+        BEGIN_XMLOBJECT(SAML_API,SubjectQuery,RequestAbstractType,SAML 2.0 SubjectQuery abstract element);
             DECL_TYPED_FOREIGN_CHILD(Subject,saml2);
-            /** SubjectQueryType local name */
+            /** SubjectQueryAbstractType local name */
             static const XMLCh TYPE_NAME[];
         END_XMLOBJECT;
 
@@ -251,7 +249,7 @@ namespace opensaml {
             static const XMLCh TYPE_NAME[];
         END_XMLOBJECT;
 
-        BEGIN_XMLOBJECT(SAML_API,AuthnRequest,Request,SAML 2.0 AuthnRequest element);
+        BEGIN_XMLOBJECT(SAML_API,AuthnRequest,RequestAbstractType,SAML 2.0 AuthnRequest element);
             DECL_BOOLEAN_ATTRIB(ForceAuthn,FORCEAUTHN,false);
             DECL_BOOLEAN_ATTRIB(IsPassive,ISPASSIVE,false);
             DECL_STRING_ATTRIB(ProtocolBinding,PROTOCOLBINDING);
@@ -269,20 +267,20 @@ namespace opensaml {
             static const XMLCh TYPE_NAME[];
         END_XMLOBJECT;
 
-        BEGIN_XMLOBJECT(SAML_API,Response,StatusResponse,SAML 2.0 Response element);
+        BEGIN_XMLOBJECT(SAML_API,Response,StatusResponseType,SAML 2.0 Response element);
             DECL_TYPED_FOREIGN_CHILDREN(Assertion,saml2);
             DECL_TYPED_FOREIGN_CHILDREN(EncryptedAssertion,saml2);
             /** ResponseType local name */
             static const XMLCh TYPE_NAME[];
         END_XMLOBJECT;
 
-        BEGIN_XMLOBJECT(SAML_API,ArtifactResolve,Request,SAML 2.0 ArtifactResolve element);
+        BEGIN_XMLOBJECT(SAML_API,ArtifactResolve,RequestAbstractType,SAML 2.0 ArtifactResolve element);
             DECL_TYPED_CHILD(Artifact);
             /** ArtifiactResolveType local name */
             static const XMLCh TYPE_NAME[];
         END_XMLOBJECT;
 
-        BEGIN_XMLOBJECT(SAML_API,ArtifactResponse,StatusResponse,SAML 2.0 ArtifactResponse element);
+        BEGIN_XMLOBJECT(SAML_API,ArtifactResponse,StatusResponseType,SAML 2.0 ArtifactResponse element);
             DECL_XMLOBJECT_CHILD(Payload);
             /** ArtifiactResponseType local name */
             static const XMLCh TYPE_NAME[];
@@ -296,7 +294,7 @@ namespace opensaml {
         BEGIN_XMLOBJECT(SAML_API,NewEncryptedID,saml2::EncryptedElementType,SAML 2.0 NewEncryptedID element);
         END_XMLOBJECT;
 
-        BEGIN_XMLOBJECT(SAML_API,ManageNameIDRequest,Request,SAML 2.0 ManageNameIDRequest element);
+        BEGIN_XMLOBJECT(SAML_API,ManageNameIDRequest,RequestAbstractType,SAML 2.0 ManageNameIDRequest element);
             DECL_TYPED_FOREIGN_CHILD(NameID,saml2);
             DECL_TYPED_FOREIGN_CHILD(EncryptedID,saml2);
             DECL_TYPED_CHILD(NewID);
@@ -306,10 +304,10 @@ namespace opensaml {
             static const XMLCh TYPE_NAME[];
         END_XMLOBJECT;
 
-        BEGIN_XMLOBJECT(SAML_API,ManageNameIDResponse,StatusResponse,SAML 2.0 ManageNameIDResponse element);
+        BEGIN_XMLOBJECT(SAML_API,ManageNameIDResponse,StatusResponseType,SAML 2.0 ManageNameIDResponse element);
         END_XMLOBJECT;
         
-        BEGIN_XMLOBJECT(SAML_API,LogoutRequest,Request,SAML 2.0 LogoutRequest element);
+        BEGIN_XMLOBJECT(SAML_API,LogoutRequest,RequestAbstractType,SAML 2.0 LogoutRequest element);
             DECL_STRING_ATTRIB(Reason,REASON);
             DECL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER);
             DECL_TYPED_FOREIGN_CHILD(BaseID,saml2);
@@ -338,10 +336,10 @@ namespace opensaml {
             /*@}*/
         END_XMLOBJECT;
 
-        BEGIN_XMLOBJECT(SAML_API,LogoutResponse,StatusResponse,SAML 2.0 LogoutResponse element);
+        BEGIN_XMLOBJECT(SAML_API,LogoutResponse,StatusResponseType,SAML 2.0 LogoutResponse element);
         END_XMLOBJECT;
 
-        BEGIN_XMLOBJECT(SAML_API,NameIDMappingRequest,Request,SAML 2.0 NameIDMappingRequest element);
+        BEGIN_XMLOBJECT(SAML_API,NameIDMappingRequest,RequestAbstractType,SAML 2.0 NameIDMappingRequest element);
             DECL_TYPED_FOREIGN_CHILD(BaseID,saml2);
             DECL_TYPED_FOREIGN_CHILD(NameID,saml2);
             DECL_TYPED_FOREIGN_CHILD(EncryptedID,saml2);
@@ -350,7 +348,7 @@ namespace opensaml {
             static const XMLCh TYPE_NAME[];
         END_XMLOBJECT;
 
-        BEGIN_XMLOBJECT(SAML_API,NameIDMappingResponse,StatusResponse,SAML 2.0 NameIDMappingResponse element);
+        BEGIN_XMLOBJECT(SAML_API,NameIDMappingResponse,StatusResponseType,SAML 2.0 NameIDMappingResponse element);
             DECL_TYPED_FOREIGN_CHILD(NameID,saml2);
             DECL_TYPED_FOREIGN_CHILD(EncryptedID,saml2);
             /** NameIDMappingResponseType local name */
@@ -393,37 +391,6 @@ namespace opensaml {
         
         DECL_XMLOBJECTBUILDER(SAML_API,RespondTo,opensaml::SAMLConstants::SAML20P_THIRDPARTY_EXT_NS,opensaml::SAMLConstants::SAML20P_THIRDPARTY_EXT_PREFIX);
 
-        //
-        // Custom builders
-        //
-
-        /**
-         * Builder for StatusResponse objects.
-         * 
-         * This is customized to force the element name to be specified.
-         */
-        class SAML_API StatusResponseBuilder : public xmltooling::XMLObjectBuilder {
-        public:
-            virtual ~StatusResponseBuilder() {}
-            /** Builder that allows element/type override. */
-            virtual StatusResponse* buildObject(
-                const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix=NULL, const xmltooling::QName* schemaType=NULL
-                ) const;
-        
-            /** Singleton builder. */
-            static StatusResponse* buildStatusResponse(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix=NULL) {
-                const StatusResponseBuilder* b = dynamic_cast<const StatusResponseBuilder*>(
-                    XMLObjectBuilder::getBuilder(xmltooling::QName(SAMLConstants::SAML20P_NS,StatusResponse::TYPE_NAME))
-                    );
-                if (b) {
-                    xmltooling::QName schemaType(SAMLConstants::SAML20P_NS,StatusResponse::TYPE_NAME,SAMLConstants::SAML20P_PREFIX);
-                    return b->buildObject(nsURI, localName, prefix, &schemaType);
-                }
-                throw xmltooling::XMLObjectException("Unable to obtain typed builder for StatusResponse.");
-            }
-        };
-
-        
         /**
          * Registers builders and validators for SAML 2.0 Protocol classes into the runtime.
          */
index 15e9140..f01c7fe 100644 (file)
-/*
- *  Copyright 2001-2006 Internet2
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * Protocols20Impl.cpp
- * 
- * Implementation classes for SAML 2.0 Protocols schema
- */
-
-#include "internal.h"
-#include "exceptions.h"
-#include "saml/encryption/EncryptedKeyResolver.h"
-#include "saml2/core/Protocols.h"
-
-#include <xmltooling/AbstractChildlessElement.h>
-#include <xmltooling/AbstractComplexElement.h>
-#include <xmltooling/AbstractElementProxy.h>
-#include <xmltooling/AbstractSimpleElement.h>
-#include <xmltooling/encryption/Decrypter.h>
-#include <xmltooling/impl/AnyElement.h>
-#include <xmltooling/io/AbstractXMLObjectMarshaller.h>
-#include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
-#include <xmltooling/util/XMLHelper.h>
-
-#include <ctime>
-#include <xercesc/util/XMLUniDefs.hpp>
-
-using namespace opensaml::saml2p;
-using namespace opensaml::saml2;
-using namespace opensaml;
-using namespace xmlsignature;
-using namespace xmlencryption;
-using namespace xmltooling;
-using namespace std;
-
-#if defined (_MSC_VER)
-    #pragma warning( push )
-    #pragma warning( disable : 4250 4251 )
-#endif
-
-namespace opensaml {
-    namespace saml2p {
-
-        DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Artifact);
-        DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,GetComplete);
-        DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,NewID);
-        DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,RequesterID);
-        DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,SessionIndex);
-        DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,StatusMessage);
-
-        DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,RespondTo);
-
-        //TODO need unit test for this, using objects from another namespace
-        class SAML_DLLLOCAL ExtensionsImpl : public virtual Extensions,
-             public AbstractElementProxy,
-             public AbstractDOMCachingXMLObject,
-             public AbstractXMLObjectMarshaller,
-             public AbstractXMLObjectUnmarshaller
-        {
-        public:
-            virtual ~ExtensionsImpl() {}
-    
-            ExtensionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
-                : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
-            }
-                
-            ExtensionsImpl(const ExtensionsImpl& src)
-                    : AbstractXMLObject(src), AbstractElementProxy(src), AbstractDOMCachingXMLObject(src) {
-                for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
-                    if (*i) {
-                        getXMLObjects().push_back((*i)->clone());
-                    }
-                }
-            }
-            
-            IMPL_XMLOBJECT_CLONE(Extensions);
-    
-        protected:
-            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
-                // Unknown child.
-                const XMLCh* nsURI=root->getNamespaceURI();
-                if (!XMLString::equals(nsURI,SAMLConstants::SAML20P_NS) && nsURI && *nsURI) {
-                    getXMLObjects().push_back(childXMLObject);
-                    return;
-                }
-                
-                AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
-            }
-        };
-
-        class SAML_DLLLOCAL StatusCodeImpl : public virtual StatusCode,
-             public AbstractComplexElement,
-             public AbstractDOMCachingXMLObject,
-             public AbstractXMLObjectMarshaller,
-             public AbstractXMLObjectUnmarshaller
-        {
-            void init() {
-                m_Value=NULL;
-                m_StatusCode=NULL;
-                m_children.push_back(NULL);
-                m_pos_StatusCode=m_children.begin();
-            }
-            public:
-                virtual ~StatusCodeImpl() {}
-
-                StatusCodeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
-                    : AbstractXMLObject(nsURI, localName, prefix, schemaType)
-                {
-                        init();
-                }
-
-                StatusCodeImpl(const StatusCodeImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
-                    init();
-                    setValue(src.getValue());
-                    if (src.getStatusCode())
-                        setStatusCode(src.getStatusCode()->cloneStatusCode());
-                }
-
-                IMPL_XMLOBJECT_CLONE(StatusCode);
-                IMPL_STRING_ATTRIB(Value);
-                IMPL_TYPED_CHILD(StatusCode);
-
-            protected:
-                void marshallAttributes(DOMElement* domElement) const {
-                    MARSHALL_STRING_ATTRIB(Value,VALUE,NULL);
-                }
-
-                void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
-                    PROC_TYPED_CHILD(StatusCode,SAMLConstants::SAML20P_NS,false);
-                    AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
-                }
-
-                void processAttribute(const DOMAttr* attribute) {
-                    PROC_STRING_ATTRIB(Value,VALUE,NULL);
-                    AbstractXMLObjectUnmarshaller::processAttribute(attribute);
-                }
-        };
-
-        //TODO need unit tests for non-SAML namespace children
-        class SAML_DLLLOCAL StatusDetailImpl : public virtual StatusDetail,
-            public AbstractComplexElement,
-            public AbstractDOMCachingXMLObject,
-            public AbstractXMLObjectMarshaller,
-            public AbstractXMLObjectUnmarshaller
-        {
-            public:
-                virtual ~StatusDetailImpl() {}
-
-                StatusDetailImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
-                    : AbstractXMLObject(nsURI, localName, prefix, schemaType) { }
-
-                StatusDetailImpl(const StatusDetailImpl& src) : AbstractXMLObject(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());
-                            }
-                        }
-                    }
-
-                IMPL_XMLOBJECT_CLONE(StatusDetail);
-                IMPL_XMLOBJECT_CHILDREN(Detail,m_children.end());
-
-            protected:
-                void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
-                    getDetails().push_back(childXMLObject);
-                    AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
-                }
-        };
-
-
-        class SAML_DLLLOCAL StatusImpl : public virtual Status,
-             public AbstractComplexElement,
-             public AbstractDOMCachingXMLObject,
-             public AbstractXMLObjectMarshaller,
-             public AbstractXMLObjectUnmarshaller
-        {
-            void init() {
-                m_StatusCode=NULL;
-                m_StatusMessage=NULL;
-                m_StatusDetail=NULL;
-                m_children.push_back(NULL);
-                m_children.push_back(NULL);
-                m_children.push_back(NULL);
-                m_pos_StatusCode=m_children.begin();
-                m_pos_StatusMessage=m_pos_StatusCode;
-                ++m_pos_StatusMessage;
-                m_pos_StatusDetail=m_pos_StatusMessage;
-                ++m_pos_StatusDetail;
-            }
-        public:
-            virtual ~StatusImpl() { }
-    
-            StatusImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
-                : AbstractXMLObject(nsURI, localName, prefix, schemaType)
-            {
-                    init();
-            }
-                
-            StatusImpl(const StatusImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
-                init();
-                if (src.getStatusCode())
-                    setStatusCode(src.getStatusCode()->cloneStatusCode());
-                if (src.getStatusMessage())
-                    setStatusMessage(src.getStatusMessage()->cloneStatusMessage());
-                if (src.getStatusDetail())
-                    setStatusDetail(src.getStatusDetail()->cloneStatusDetail());
-            }
-            
-            IMPL_XMLOBJECT_CLONE(Status);
-            IMPL_TYPED_CHILD(StatusCode);
-            IMPL_TYPED_CHILD(StatusMessage);
-            IMPL_TYPED_CHILD(StatusDetail);
-    
-        protected:
-    
-            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
-                PROC_TYPED_CHILD(StatusCode,SAMLConstants::SAML20P_NS,false);
-                PROC_TYPED_CHILD(StatusMessage,SAMLConstants::SAML20P_NS,false);
-                PROC_TYPED_CHILD(StatusDetail,SAMLConstants::SAML20P_NS,false);
-                AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
-            }
-    
-        };
-
-
-        class SAML_DLLLOCAL RequestImpl : public virtual Request,
-            public AbstractComplexElement,
-            public AbstractDOMCachingXMLObject,
-            public AbstractXMLObjectMarshaller,
-            public AbstractXMLObjectUnmarshaller
-        {
-            void init() {
-                m_ID=NULL;
-                m_Version=NULL;
-                m_IssueInstant=NULL;
-                m_Destination=NULL;
-                m_Consent=NULL;
-                m_Issuer=NULL;
-                m_Signature=NULL;
-                m_Extensions=NULL;
-                m_children.push_back(NULL);
-                m_children.push_back(NULL);
-                m_children.push_back(NULL);
-                m_pos_Issuer=m_children.begin();
-                m_pos_Signature=m_pos_Issuer;
-                ++m_pos_Signature;
-                m_pos_Extensions=m_pos_Signature;
-                ++m_pos_Extensions;
-            }
-        protected:
-            RequestImpl() {
-                init();
-            }
-        public:
-            virtual ~RequestImpl() {
-                XMLString::release(&m_ID);
-                XMLString::release(&m_Version);
-                XMLString::release(&m_Destination);
-                XMLString::release(&m_Consent);
-                delete m_IssueInstant;
-            }
-    
-            RequestImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
-                : AbstractXMLObject(nsURI, localName, prefix, schemaType)
-            {
-                init();
-            }
-                
-            RequestImpl(const RequestImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
-                init();
-                setID(src.getID());
-                setVersion(src.getVersion());
-                setIssueInstant(src.getIssueInstant());
-                setDestination(src.getDestination());
-                setConsent(src.getConsent());
-                if (src.getIssuer())
-                    setIssuer(src.getIssuer()->cloneIssuer());
-                if (src.getSignature())
-                    setSignature(src.getSignature()->cloneSignature());
-                if (src.getExtensions())
-                    setExtensions(src.getExtensions()->cloneExtensions());
-            }
-            
-            //IMPL_TYPED_CHILD(Signature);
-            // Need customized setter.
-        protected:
-            Signature* m_Signature;
-            list<XMLObject*>::iterator m_pos_Signature;
-        public:
-            Signature* getSignature() const {
-                return m_Signature;
-            }
-            
-            void setSignature(Signature* sig) {
-                prepareForAssignment(m_Signature,sig);
-                *m_pos_Signature=m_Signature=sig;
-                // Sync content reference back up.
-                if (m_Signature)
-                    m_Signature->setContentReference(new opensaml::ContentReference(*this));
-            }
-            
-            IMPL_XMLOBJECT_CLONE(Request);
-            IMPL_STRING_ATTRIB(Version);
-            IMPL_ID_ATTRIB(ID);
-            IMPL_DATETIME_ATTRIB(IssueInstant,0);
-            IMPL_STRING_ATTRIB(Destination);
-            IMPL_STRING_ATTRIB(Consent);
-            IMPL_TYPED_FOREIGN_CHILD(Issuer,saml2);
-            IMPL_TYPED_CHILD(Extensions);
-    
-        protected:
-            void marshallAttributes(DOMElement* domElement) const {
-                if (!m_Version)
-                    const_cast<RequestImpl*>(this)->m_Version=XMLString::transcode("2.0");
-                MARSHALL_STRING_ATTRIB(Version,VER,NULL);
-                if (!m_ID)
-                    const_cast<RequestImpl*>(this)->m_ID=SAMLConfig::getConfig().generateIdentifier();
-                MARSHALL_ID_ATTRIB(ID,ID,NULL);
-                if (!m_IssueInstant) {
-                    const_cast<RequestImpl*>(this)->m_IssueInstantEpoch=time(NULL);
-                    const_cast<RequestImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
-                }
-                MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
-                MARSHALL_STRING_ATTRIB(Destination,DESTINATION,NULL);
-                MARSHALL_STRING_ATTRIB(Consent,CONSENT,NULL);
-            }
-    
-            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
-                PROC_TYPED_FOREIGN_CHILD(Issuer,saml2,SAMLConstants::SAML20_NS,false);
-                PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLConstants::XMLSIG_NS,false);
-                PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20P_NS,false);
-                AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
-            }
-    
-            void processAttribute(const DOMAttr* attribute) {
-                PROC_ID_ATTRIB(ID,ID,NULL);
-                PROC_STRING_ATTRIB(Version,VER,NULL);
-                PROC_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
-                PROC_STRING_ATTRIB(Destination,DESTINATION,NULL);
-                PROC_STRING_ATTRIB(Consent,CONSENT,NULL);
-                AbstractXMLObjectUnmarshaller::processAttribute(attribute);
-            }
-        };
-
-
-        class SAML_DLLLOCAL AssertionIDRequestImpl : public virtual AssertionIDRequest, public RequestImpl
-        {
-        public:
-            virtual ~AssertionIDRequestImpl() { }
-    
-            AssertionIDRequestImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
-                : AbstractXMLObject(nsURI, localName, prefix, schemaType) { }
-                
-            AssertionIDRequestImpl(const AssertionIDRequestImpl& src) : AbstractXMLObject(src), RequestImpl(src) {
-                VectorOf(AssertionIDRef) v=getAssertionIDRefs();
-                for (vector<AssertionIDRef*>::const_iterator i=src.m_AssertionIDRefs.begin(); i!=src.m_AssertionIDRefs.end(); i++) {
-                    if (*i) {                               
-                        v.push_back((*i)->cloneAssertionIDRef());
-                    }
-                }
-
-            }
-            
-            IMPL_XMLOBJECT_CLONE(AssertionIDRequest);
-            IMPL_TYPED_FOREIGN_CHILDREN(AssertionIDRef,saml2,m_children.end());
-    
-        protected:
-            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
-                PROC_TYPED_FOREIGN_CHILDREN(AssertionIDRef,saml2,SAMLConstants::SAML20_NS,false);
-                RequestImpl::processChildElement(childXMLObject,root);
-            }
-        };
-
-        class SAML_DLLLOCAL SubjectQueryImpl : public virtual SubjectQuery, public RequestImpl
-        {
-            void init()
-            {
-                m_Subject = NULL;
-                m_children.push_back(NULL);
-                m_pos_Subject = m_pos_Extensions;
-                ++m_pos_Subject;
-            }
-        protected:
-            SubjectQueryImpl() {
-                init();
-            }
-        public:
-            virtual ~SubjectQueryImpl() { }
-    
-            SubjectQueryImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
-                : AbstractXMLObject(nsURI, localName, prefix, schemaType)
-            { 
-                init();
-            }
-                
-            SubjectQueryImpl(const SubjectQueryImpl& src) : AbstractXMLObject(src), RequestImpl(src) {
-                init();
-                if (src.getSubject())
-                    setSubject(src.getSubject()->cloneSubject());
-            }
-            
-            IMPL_XMLOBJECT_CLONE(SubjectQuery);
-            IMPL_TYPED_FOREIGN_CHILD(Subject,saml2);
-    
-        protected:
-            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
-                PROC_TYPED_FOREIGN_CHILD(Subject,saml2,SAMLConstants::SAML20_NS,false);
-                RequestImpl::processChildElement(childXMLObject,root);
-            }
-        };
-
-
-        class SAML_DLLLOCAL RequestedAuthnContextImpl : public virtual RequestedAuthnContext,
-            public AbstractComplexElement,
-            public AbstractDOMCachingXMLObject,
-            public AbstractXMLObjectMarshaller,
-            public AbstractXMLObjectUnmarshaller
-        {
-            void init() {
-                m_Comparison=NULL;
-            }
-        public:
-            virtual ~RequestedAuthnContextImpl() {
-                XMLString::release(&m_Comparison);
-            }
-    
-            RequestedAuthnContextImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
-                : AbstractXMLObject(nsURI, localName, prefix, schemaType)
-            {
-                init();
-            }
-                
-            RequestedAuthnContextImpl(const RequestedAuthnContextImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
-                init();
-                setComparison(src.getComparison());
-                for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
-                    if (*i) {
-                        AuthnContextClassRef* classref=dynamic_cast<AuthnContextClassRef*>(*i);
-                        if (classref) {
-                            getAuthnContextClassRefs().push_back(classref->cloneAuthnContextClassRef());
-                            continue;
-                        }
-
-                        AuthnContextDeclRef* declref=dynamic_cast<AuthnContextDeclRef*>(*i);
-                        if (declref) {
-                            getAuthnContextDeclRefs().push_back(declref->cloneAuthnContextDeclRef());
-                            continue;
-                        }
-                    }
-                }
-            }
-            
-            IMPL_XMLOBJECT_CLONE(RequestedAuthnContext);
-            IMPL_STRING_ATTRIB(Comparison);
-            IMPL_TYPED_FOREIGN_CHILDREN(AuthnContextClassRef,saml2,m_children.end());
-            IMPL_TYPED_FOREIGN_CHILDREN(AuthnContextDeclRef,saml2,m_children.end());
-    
-        protected:
-            void marshallAttributes(DOMElement* domElement) const {
-                MARSHALL_STRING_ATTRIB(Comparison,COMPARISON,NULL);
-            }
-    
-            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
-                PROC_TYPED_FOREIGN_CHILDREN(AuthnContextClassRef,saml2,SAMLConstants::SAML20_NS,false);
-                PROC_TYPED_FOREIGN_CHILDREN(AuthnContextDeclRef,saml2,SAMLConstants::SAML20_NS,false);
-                AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
-            }
-    
-            void processAttribute(const DOMAttr* attribute) {
-                PROC_STRING_ATTRIB(Comparison,COMPARISON,NULL);
-                AbstractXMLObjectUnmarshaller::processAttribute(attribute);
-            }
-        };
-
-
-        class SAML_DLLLOCAL AuthnQueryImpl : public virtual AuthnQuery, public SubjectQueryImpl
-        {
-            void init() {
-                m_SessionIndex=NULL;
-                m_RequestedAuthnContext=NULL;
-                m_children.push_back(NULL);
-                m_pos_RequestedAuthnContext = m_pos_Subject;
-                ++m_pos_RequestedAuthnContext;
-                
-            }
-        public:
-            virtual ~AuthnQueryImpl() {
-                XMLString::release(&m_SessionIndex);
-            }
-    
-            AuthnQueryImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
-                : AbstractXMLObject(nsURI, localName, prefix, schemaType)
-            {
-                init();
-            }
-                
-            AuthnQueryImpl(const AuthnQueryImpl& src) : AbstractXMLObject(src), SubjectQueryImpl(src) {
-                init();
-                setSessionIndex(src.getSessionIndex());
-                if (src.getRequestedAuthnContext())
-                    setRequestedAuthnContext(src.getRequestedAuthnContext()->cloneRequestedAuthnContext());
-            }
-            
-            IMPL_XMLOBJECT_CLONE(AuthnQuery);
-            IMPL_STRING_ATTRIB(SessionIndex);
-            IMPL_TYPED_CHILD(RequestedAuthnContext);
-    
-        protected:
-            void marshallAttributes(DOMElement* domElement) const {
-                MARSHALL_STRING_ATTRIB(SessionIndex,SESSIONINDEX,NULL);
-                SubjectQueryImpl::marshallAttributes(domElement);
-            }
-    
-            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
-                PROC_TYPED_CHILD(RequestedAuthnContext,SAMLConstants::SAML20P_NS,false);
-                SubjectQueryImpl::processChildElement(childXMLObject,root);
-            }
-            void processAttribute(const DOMAttr* attribute) {
-                PROC_STRING_ATTRIB(SessionIndex,SESSIONINDEX,NULL);
-                SubjectQueryImpl::processAttribute(attribute);
-            }
-        };
-
-        class SAML_DLLLOCAL AttributeQueryImpl : public virtual AttributeQuery, public SubjectQueryImpl
-        {
-        public:
-            virtual ~AttributeQueryImpl() { }
-    
-            AttributeQueryImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
-                : AbstractXMLObject(nsURI, localName, prefix, schemaType) { }
-                
-            AttributeQueryImpl(const AttributeQueryImpl& src) : AbstractXMLObject(src), SubjectQueryImpl(src) {
-                for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
-                    if (*i) {
-                        Attribute* attrib=dynamic_cast<Attribute*>(*i);
-                        if (attrib) {
-                            getAttributes().push_back(attrib->cloneAttribute());
-                            continue;
-                        }
-                    }
-                }
-
-            }
-            
-            IMPL_XMLOBJECT_CLONE(AttributeQuery);
-            IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
-    
-        protected:
-            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
-                PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAMLConstants::SAML20_NS,false);
-                SubjectQueryImpl::processChildElement(childXMLObject,root);
-            }
-        };
-
-        class SAML_DLLLOCAL AuthzDecisionQueryImpl : public virtual AuthzDecisionQuery, public SubjectQueryImpl
-        {
-            void init() {
-                m_Resource=NULL;
-                m_Evidence=NULL;
-                m_children.push_back(NULL);
-                m_pos_Evidence=m_pos_Subject;
-                ++m_pos_Evidence;
-                
-            }
-        public:
-            virtual ~AuthzDecisionQueryImpl() {
-                XMLString::release(&m_Resource);
-            }
-    
-            AuthzDecisionQueryImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
-                : AbstractXMLObject(nsURI, localName, prefix, schemaType)
-            {
-                init();
-            }
-                
-            AuthzDecisionQueryImpl(const AuthzDecisionQueryImpl& src) : AbstractXMLObject(src), SubjectQueryImpl(src) {
-                init();
-                setResource(src.getResource());
-                if (src.getEvidence())
-                    setEvidence(src.getEvidence()->cloneEvidence());
-                for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
-                    if (*i) {
-                        Action* action=dynamic_cast<Action*>(*i);
-                        if (action) {
-                            getActions().push_back(action->cloneAction());
-                            continue;
-                        }
-                    }
-                }
-            }
-            
-            IMPL_XMLOBJECT_CLONE(AuthzDecisionQuery);
-            IMPL_STRING_ATTRIB(Resource);
-            IMPL_TYPED_FOREIGN_CHILDREN(Action,saml2,m_pos_Evidence);
-            IMPL_TYPED_FOREIGN_CHILD(Evidence,saml2);
-    
-        protected:
-            void marshallAttributes(DOMElement* domElement) const {
-                MARSHALL_STRING_ATTRIB(Resource,RESOURCE,NULL);
-                SubjectQueryImpl::marshallAttributes(domElement);
-            }
-    
-            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
-                PROC_TYPED_FOREIGN_CHILD(Evidence,saml2,SAMLConstants::SAML20_NS,false);
-                PROC_TYPED_FOREIGN_CHILDREN(Action,saml2,SAMLConstants::SAML20_NS,false);
-                SubjectQueryImpl::processChildElement(childXMLObject,root);
-            }
-            void processAttribute(const DOMAttr* attribute) {
-                PROC_STRING_ATTRIB(Resource,RESOURCE,NULL);
-                SubjectQueryImpl::processAttribute(attribute);
-            }
-        };
-
-        class SAML_DLLLOCAL NameIDPolicyImpl : public virtual NameIDPolicy,
-            public AbstractChildlessElement,
-            public AbstractDOMCachingXMLObject,
-            public AbstractXMLObjectMarshaller,
-            public AbstractXMLObjectUnmarshaller
-        {
-            void init() {
-                m_Format=NULL;
-                m_SPNameQualifier=NULL;
-                m_AllowCreate=XMLConstants::XML_BOOL_NULL;
-            }
-            public:
-                virtual ~NameIDPolicyImpl()
-                {
-                    XMLString::release(&m_Format);
-                    XMLString::release(&m_SPNameQualifier);
-                }
-
-                NameIDPolicyImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
-                    : AbstractXMLObject(nsURI, localName, prefix, schemaType)
-                {
-                        init();
-                }
-
-                NameIDPolicyImpl(const NameIDPolicyImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
-                    init();
-                    setFormat(src.getFormat());
-                    setSPNameQualifier(src.getSPNameQualifier());
-                    AllowCreate(m_AllowCreate);
-                }
-
-                IMPL_XMLOBJECT_CLONE(NameIDPolicy);
-                IMPL_STRING_ATTRIB(Format);
-                IMPL_STRING_ATTRIB(SPNameQualifier);
-                IMPL_BOOLEAN_ATTRIB(AllowCreate);
-
-            protected:
-                void marshallAttributes(DOMElement* domElement) const {
-                    MARSHALL_STRING_ATTRIB(Format,FORMAT,NULL);
-                    MARSHALL_STRING_ATTRIB(SPNameQualifier,SPNAMEQUALIFIER,NULL);
-                    MARSHALL_BOOLEAN_ATTRIB(AllowCreate,ALLOWCREATE,NULL);
-                }
-
-                void processAttribute(const DOMAttr* attribute) {
-                    PROC_STRING_ATTRIB(Format,FORMAT,NULL);
-                    PROC_STRING_ATTRIB(SPNameQualifier,SPNAMEQUALIFIER,NULL);
-                    PROC_BOOLEAN_ATTRIB(AllowCreate,ALLOWCREATE,NULL);
-                    AbstractXMLObjectUnmarshaller::processAttribute(attribute);
-                }
-        };
-
-        class SAML_DLLLOCAL IDPEntryImpl : public virtual IDPEntry,
-            public AbstractChildlessElement,
-            public AbstractDOMCachingXMLObject,
-            public AbstractXMLObjectMarshaller,
-            public AbstractXMLObjectUnmarshaller
-        {
-            void init() {
-                m_ProviderID=NULL;
-                m_Name=NULL;
-                m_Loc=NULL;
-            }
-            public:
-                virtual ~IDPEntryImpl()
-                {
-                    XMLString::release(&m_ProviderID);
-                    XMLString::release(&m_Name);
-                    XMLString::release(&m_Loc);
-                }
-
-                IDPEntryImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
-                    : AbstractXMLObject(nsURI, localName, prefix, schemaType)
-                {
-                        init();
-                }
-
-                IDPEntryImpl(const IDPEntryImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
-                    init();
-                    setProviderID(src.getProviderID());
-                    setName(src.getName());
-                    setLoc(src.getLoc());
-                }
-
-                IMPL_XMLOBJECT_CLONE(IDPEntry);
-                IMPL_STRING_ATTRIB(ProviderID);
-                IMPL_STRING_ATTRIB(Name);
-                IMPL_STRING_ATTRIB(Loc);
-
-            protected:
-                void marshallAttributes(DOMElement* domElement) const {
-                    MARSHALL_STRING_ATTRIB(ProviderID,PROVIDERID,NULL);
-                    MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
-                    MARSHALL_STRING_ATTRIB(Loc,LOC,NULL);
-                }
-
-                void processAttribute(const DOMAttr* attribute) {
-                    PROC_STRING_ATTRIB(ProviderID,PROVIDERID,NULL);
-                    PROC_STRING_ATTRIB(Name,NAME,NULL);
-                    PROC_STRING_ATTRIB(Loc,LOC,NULL);
-                    AbstractXMLObjectUnmarshaller::processAttribute(attribute);
-                }
-        };
-
-        class SAML_DLLLOCAL IDPListImpl : public virtual IDPList,
-            public AbstractComplexElement,
-            public AbstractDOMCachingXMLObject,
-            public AbstractXMLObjectMarshaller,
-            public AbstractXMLObjectUnmarshaller
-        {
-            void init() {
-                m_GetComplete=NULL;
-                m_children.push_back(NULL);
-                m_pos_GetComplete=m_children.begin();
-                
-            }
-        public:
-            virtual ~IDPListImpl() { }
-    
-            IDPListImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
-                : AbstractXMLObject(nsURI, localName, prefix, schemaType)
-            {
-                init();
-            }
-                
-            IDPListImpl(const IDPListImpl& src)
-                    : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
-                init();
-                if (src.getGetComplete())
-                    setGetComplete(src.getGetComplete()->cloneGetComplete());
-                for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
-                    if (*i) {
-                        IDPEntry* entry=dynamic_cast<IDPEntry*>(*i);
-                        if (entry) {
-                            getIDPEntrys().push_back(entry->cloneIDPEntry());
-                            continue;
-                        }
-                    }
-                }
-            }
-            
-            IMPL_XMLOBJECT_CLONE(IDPList);
-            IMPL_TYPED_CHILDREN(IDPEntry,m_pos_GetComplete);
-            IMPL_TYPED_CHILD(GetComplete);
-    
-        protected:
-            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
-                PROC_TYPED_CHILDREN(IDPEntry,SAMLConstants::SAML20P_NS,false);
-                PROC_TYPED_CHILD(GetComplete,SAMLConstants::SAML20P_NS,false);
-                AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
-            }
-        };
-
-
-        class SAML_DLLLOCAL ScopingImpl : public virtual Scoping,
-            public AbstractComplexElement,
-            public AbstractDOMCachingXMLObject,
-            public AbstractXMLObjectMarshaller,
-            public AbstractXMLObjectUnmarshaller
-        {
-            void init() {
-                m_ProxyCount=NULL;
-                m_IDPList=NULL;
-                m_children.push_back(NULL);
-                m_pos_IDPList=m_children.begin();
-                
-            }
-        public:
-            virtual ~ScopingImpl() {
-                XMLString::release(&m_ProxyCount); 
-            }
-    
-            ScopingImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
-                : AbstractXMLObject(nsURI, localName, prefix, schemaType)
-            {
-                init();
-            }
-                
-            ScopingImpl(const ScopingImpl& src)
-                    : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
-                init();
-                setProxyCount(m_ProxyCount);
-                if (src.getIDPList())
-                    setIDPList(src.getIDPList()->cloneIDPList());
-                for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
-                    if (*i) {
-                        RequesterID* reqid =dynamic_cast<RequesterID*>(*i);
-                        if (reqid) {
-                            getRequesterIDs().push_back(reqid->cloneRequesterID());
-                            continue;
-                        }
-                    }
-                }
-            }
-            
-            IMPL_XMLOBJECT_CLONE(Scoping);
-            IMPL_INTEGER_ATTRIB(ProxyCount);
-            IMPL_TYPED_CHILD(IDPList);
-            IMPL_TYPED_CHILDREN(RequesterID,m_children.end());
-    
-        protected:
-            void marshallAttributes(DOMElement* domElement) const {
-                    MARSHALL_INTEGER_ATTRIB(ProxyCount,PROXYCOUNT,NULL);
-            }
-    
-            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
-                PROC_TYPED_CHILD(IDPList,SAMLConstants::SAML20P_NS,false);
-                PROC_TYPED_CHILDREN(RequesterID,SAMLConstants::SAML20P_NS,false);
-                AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
-            }
-
-            void processAttribute(const DOMAttr* attribute) {
-                PROC_INTEGER_ATTRIB(ProxyCount,PROXYCOUNT,NULL);
-                AbstractXMLObjectUnmarshaller::processAttribute(attribute);
-            }
-        };
-
-        class SAML_DLLLOCAL AuthnRequestImpl : public virtual AuthnRequest, public RequestImpl
-        {
-            void init() {
-                m_ForceAuthn=XMLConstants::XML_BOOL_NULL;
-                m_IsPassive=XMLConstants::XML_BOOL_NULL;
-                m_ProtocolBinding=NULL;
-                m_AssertionConsumerServiceIndex=NULL;
-                m_AssertionConsumerServiceURL=NULL;
-                m_AttributeConsumingServiceIndex=NULL;
-                m_ProviderName=NULL;
-
-                m_Subject=NULL;
-                m_NameIDPolicy=NULL;
-                m_Conditions=NULL;
-                m_RequestedAuthnContext=NULL;
-                m_Scoping=NULL;
-                m_children.push_back(NULL);
-                m_children.push_back(NULL);
-                m_children.push_back(NULL);
-                m_children.push_back(NULL);
-                m_children.push_back(NULL);
-                m_pos_Subject=m_pos_Extensions;
-                ++m_pos_Subject;
-                m_pos_NameIDPolicy=m_pos_Subject;
-                ++m_pos_NameIDPolicy;
-                m_pos_Conditions=m_pos_NameIDPolicy;
-                ++m_pos_Conditions;
-                m_pos_RequestedAuthnContext=m_pos_Conditions;
-                ++m_pos_RequestedAuthnContext;
-                m_pos_Scoping=m_pos_RequestedAuthnContext;
-                ++m_pos_Scoping;
-                
-            }
-        public:
-            virtual ~AuthnRequestImpl() {
-                XMLString::release(&m_ProtocolBinding);
-                XMLString::release(&m_AssertionConsumerServiceURL);
-                XMLString::release(&m_ProviderName);
-                XMLString::release(&m_AssertionConsumerServiceIndex);
-                XMLString::release(&m_AttributeConsumingServiceIndex);
-            }
-    
-            AuthnRequestImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
-                : AbstractXMLObject(nsURI, localName, prefix, schemaType)
-            {
-                init();
-            }
-                
-            AuthnRequestImpl(const AuthnRequestImpl& src) : AbstractXMLObject(src), RequestImpl(src) {
-                init();
-
-                ForceAuthn(m_ForceAuthn);
-                IsPassive(m_IsPassive);
-                setProtocolBinding(src.getProtocolBinding());
-                setAssertionConsumerServiceIndex(m_AssertionConsumerServiceIndex);
-                setAssertionConsumerServiceURL(src.getAssertionConsumerServiceURL());
-                setAttributeConsumingServiceIndex(m_AttributeConsumingServiceIndex);
-                setProviderName(src.getProviderName());
-
-                if (src.getSubject())
-                    setSubject(src.getSubject()->cloneSubject());
-                if (src.getNameIDPolicy())
-                    setNameIDPolicy(src.getNameIDPolicy()->cloneNameIDPolicy());
-                if (src.getConditions())
-                    setConditions(src.getConditions()->cloneConditions());
-                if (src.getRequestedAuthnContext())
-                    setRequestedAuthnContext(src.getRequestedAuthnContext()->cloneRequestedAuthnContext());
-                if (src.getScoping())
-                    setScoping(src.getScoping()->cloneScoping());
-            }
-            
-            IMPL_XMLOBJECT_CLONE(AuthnRequest);
-
-            IMPL_BOOLEAN_ATTRIB(ForceAuthn);
-            IMPL_BOOLEAN_ATTRIB(IsPassive);
-            IMPL_STRING_ATTRIB(ProtocolBinding);
-            IMPL_INTEGER_ATTRIB(AssertionConsumerServiceIndex);
-            IMPL_STRING_ATTRIB(AssertionConsumerServiceURL);
-            IMPL_INTEGER_ATTRIB(AttributeConsumingServiceIndex);
-            IMPL_STRING_ATTRIB(ProviderName);
-
-            IMPL_TYPED_FOREIGN_CHILD(Subject,saml2);
-            IMPL_TYPED_CHILD(NameIDPolicy);
-            IMPL_TYPED_FOREIGN_CHILD(Conditions,saml2);
-            IMPL_TYPED_CHILD(RequestedAuthnContext);
-            IMPL_TYPED_CHILD(Scoping);
-    
-        protected:
-            void marshallAttributes(DOMElement* domElement) const {
-                MARSHALL_BOOLEAN_ATTRIB(ForceAuthn,FORCEAUTHN,NULL);
-                MARSHALL_BOOLEAN_ATTRIB(IsPassive,ISPASSIVE,NULL);
-                MARSHALL_STRING_ATTRIB(ProtocolBinding,PROTOCOLBINDING,NULL);
-                MARSHALL_INTEGER_ATTRIB(AssertionConsumerServiceIndex,ASSERTIONCONSUMERSERVICEINDEX,NULL);
-                MARSHALL_STRING_ATTRIB(AssertionConsumerServiceURL,ASSERTIONCONSUMERSERVICEURL,NULL);
-                MARSHALL_INTEGER_ATTRIB(AttributeConsumingServiceIndex,ATTRIBUTECONSUMINGSERVICEINDEX,NULL);
-                MARSHALL_STRING_ATTRIB(ProviderName,PROVIDERNAME,NULL);
-                RequestImpl::marshallAttributes(domElement);
-            }
-    
-            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
-                PROC_TYPED_FOREIGN_CHILD(Subject,saml2,SAMLConstants::SAML20_NS,false);
-                PROC_TYPED_CHILD(NameIDPolicy,SAMLConstants::SAML20P_NS,false);
-                PROC_TYPED_FOREIGN_CHILD(Conditions,saml2,SAMLConstants::SAML20_NS,false);
-                PROC_TYPED_CHILD(RequestedAuthnContext,SAMLConstants::SAML20P_NS,false);
-                PROC_TYPED_CHILD(Scoping,SAMLConstants::SAML20P_NS,false);
-                RequestImpl::processChildElement(childXMLObject,root);
-            }
-            void processAttribute(const DOMAttr* attribute) {
-                PROC_BOOLEAN_ATTRIB(ForceAuthn,FORCEAUTHN,NULL);
-                PROC_BOOLEAN_ATTRIB(IsPassive,ISPASSIVE,NULL);
-                PROC_STRING_ATTRIB(ProtocolBinding,PROTOCOLBINDING,NULL);
-                PROC_INTEGER_ATTRIB(AssertionConsumerServiceIndex,ASSERTIONCONSUMERSERVICEINDEX,NULL);
-                PROC_STRING_ATTRIB(AssertionConsumerServiceURL,ASSERTIONCONSUMERSERVICEURL,NULL);
-                PROC_INTEGER_ATTRIB(AttributeConsumingServiceIndex,ATTRIBUTECONSUMINGSERVICEINDEX,NULL);
-                PROC_STRING_ATTRIB(ProviderName,PROVIDERNAME,NULL);
-                RequestImpl::processAttribute(attribute);
-            }
-        };
-
-        class SAML_DLLLOCAL StatusResponseImpl : public virtual StatusResponse,
-            public AbstractComplexElement,
-            public AbstractDOMCachingXMLObject,
-            public AbstractXMLObjectMarshaller,
-            public AbstractXMLObjectUnmarshaller
-        {
-            void init() {
-                m_ID=NULL;
-                m_InResponseTo=NULL;
-                m_Version=NULL;
-                m_IssueInstant=NULL;
-                m_Destination=NULL;
-                m_Consent=NULL;
-                m_Issuer=NULL;
-                m_Signature=NULL;
-                m_Extensions=NULL;
-                m_Status=NULL;
-                m_children.push_back(NULL);
-                m_children.push_back(NULL);
-                m_children.push_back(NULL);
-                m_children.push_back(NULL);
-                m_pos_Issuer=m_children.begin();
-                m_pos_Signature=m_pos_Issuer;
-                ++m_pos_Signature;
-                m_pos_Extensions=m_pos_Signature;
-                ++m_pos_Extensions;
-                m_pos_Status=m_pos_Extensions;
-                ++m_pos_Status;
-            }
-        protected:
-            StatusResponseImpl() {
-                init();
-            }
-        public:
-            virtual ~StatusResponseImpl() {
-                XMLString::release(&m_ID);
-                XMLString::release(&m_InResponseTo);
-                XMLString::release(&m_Version);
-                XMLString::release(&m_Destination);
-                XMLString::release(&m_Consent);
-                delete m_IssueInstant;
-            }
-    
-            StatusResponseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
-                : AbstractXMLObject(nsURI, localName, prefix, schemaType)
-            {
-                init();
-            }
-                
-            StatusResponseImpl(const StatusResponseImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
-                init();
-                setID(src.getID());
-                setInResponseTo(src.getInResponseTo());
-                setVersion(src.getVersion());
-                setIssueInstant(src.getIssueInstant());
-                setDestination(src.getDestination());
-                setConsent(src.getConsent());
-                if (src.getIssuer())
-                    setIssuer(src.getIssuer()->cloneIssuer());
-                if (src.getSignature())
-                    setSignature(src.getSignature()->cloneSignature());
-                if (src.getExtensions())
-                    setExtensions(src.getExtensions()->cloneExtensions());
-                if (src.getStatus())
-                    setStatus(src.getStatus()->cloneStatus());
-            }
-            
-            //IMPL_TYPED_CHILD(Signature);
-            // Need customized setter.
-        protected:
-            Signature* m_Signature;
-            list<XMLObject*>::iterator m_pos_Signature;
-        public:
-            Signature* getSignature() const {
-                return m_Signature;
-            }
-            
-            void setSignature(Signature* sig) {
-                prepareForAssignment(m_Signature,sig);
-                *m_pos_Signature=m_Signature=sig;
-                // Sync content reference back up.
-                if (m_Signature)
-                    m_Signature->setContentReference(new opensaml::ContentReference(*this));
-            }
-            
-            IMPL_XMLOBJECT_CLONE(StatusResponse);
-            IMPL_STRING_ATTRIB(Version);
-            IMPL_ID_ATTRIB(ID);
-            IMPL_STRING_ATTRIB(InResponseTo);
-            IMPL_DATETIME_ATTRIB(IssueInstant,0);
-            IMPL_STRING_ATTRIB(Destination);
-            IMPL_STRING_ATTRIB(Consent);
-            IMPL_TYPED_FOREIGN_CHILD(Issuer,saml2);
-            IMPL_TYPED_CHILD(Extensions);
-            IMPL_TYPED_CHILD(Status);
-    
-        protected:
-            void marshallAttributes(DOMElement* domElement) const {
-                if (!m_Version)
-                    const_cast<StatusResponseImpl*>(this)->m_Version=XMLString::transcode("2.0");
-                MARSHALL_STRING_ATTRIB(Version,VER,NULL);
-                if (!m_ID)
-                    const_cast<StatusResponseImpl*>(this)->m_ID=SAMLConfig::getConfig().generateIdentifier();
-                MARSHALL_ID_ATTRIB(ID,ID,NULL);
-                if (!m_IssueInstant) {
-                    const_cast<StatusResponseImpl*>(this)->m_IssueInstantEpoch=time(NULL);
-                    const_cast<StatusResponseImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
-                }
-                MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
-                MARSHALL_STRING_ATTRIB(Destination,DESTINATION,NULL);
-                MARSHALL_STRING_ATTRIB(Consent,CONSENT,NULL);
-                MARSHALL_STRING_ATTRIB(InResponseTo,INRESPONSETO,NULL);
-            }
-    
-            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
-                PROC_TYPED_FOREIGN_CHILD(Issuer,saml2,SAMLConstants::SAML20_NS,false);
-                PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLConstants::XMLSIG_NS,false);
-                PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20P_NS,false);
-                PROC_TYPED_CHILD(Status,SAMLConstants::SAML20P_NS,false);
-                AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
-            }
-    
-            void processAttribute(const DOMAttr* attribute) {
-                PROC_ID_ATTRIB(ID,ID,NULL);
-                PROC_STRING_ATTRIB(Version,VER,NULL);
-                PROC_STRING_ATTRIB(InResponseTo,INRESPONSETO,NULL);
-                PROC_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
-                PROC_STRING_ATTRIB(Destination,DESTINATION,NULL);
-                PROC_STRING_ATTRIB(Consent,CONSENT,NULL);
-                AbstractXMLObjectUnmarshaller::processAttribute(attribute);
-            }
-        };
-
-        class SAML_DLLLOCAL ResponseImpl : public virtual Response, public StatusResponseImpl
-        {
-        public:
-            virtual ~ResponseImpl() { }
-    
-            ResponseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
-                : AbstractXMLObject(nsURI, localName, prefix, schemaType) { }
-                
-            ResponseImpl(const ResponseImpl& src) : AbstractXMLObject(src), StatusResponseImpl(src) {
-                for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
-                    if (*i) {
-                        Assertion* assertion=dynamic_cast<Assertion*>(*i);
-                        if (assertion) {
-                            getAssertions().push_back(assertion->cloneAssertion());
-                            continue;
-                        }
-                        EncryptedAssertion* encAssertion=dynamic_cast<EncryptedAssertion*>(*i);
-                        if (encAssertion) {
-                            getEncryptedAssertions().push_back(encAssertion->cloneEncryptedAssertion());
-                            continue;
-                        }
-                    }
-                }
-
-            }
-            
-            IMPL_XMLOBJECT_CLONE(Response);
-            IMPL_TYPED_FOREIGN_CHILDREN(Assertion,saml2,m_children.end());
-            IMPL_TYPED_FOREIGN_CHILDREN(EncryptedAssertion,saml2,m_children.end());
-    
-        protected:
-            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
-                PROC_TYPED_FOREIGN_CHILDREN(Assertion,saml2,SAMLConstants::SAML20_NS,false);
-                PROC_TYPED_FOREIGN_CHILDREN(EncryptedAssertion,saml2,SAMLConstants::SAML20_NS,false);
-                StatusResponseImpl::processChildElement(childXMLObject,root);
-            }
-        };
-
-        class SAML_DLLLOCAL ArtifactResolveImpl : public virtual ArtifactResolve, public RequestImpl
-        {
-            void init() {
-                m_Artifact=NULL;
-                m_children.push_back(NULL);
-                m_pos_Artifact=m_pos_Extensions;
-                ++m_pos_Artifact;
-            }
-        public:
-            virtual ~ArtifactResolveImpl() { }
-    
-            ArtifactResolveImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
-                : AbstractXMLObject(nsURI, localName, prefix, schemaType)
-            { 
-                init();
-            }
-                
-            ArtifactResolveImpl(const ArtifactResolveImpl& src) : AbstractXMLObject(src), RequestImpl(src) {
-                init();
-                if(src.getArtifact())
-                    setArtifact(src.getArtifact()->cloneArtifact());
-            }
-            
-            IMPL_XMLOBJECT_CLONE(ArtifactResolve);
-            IMPL_TYPED_CHILD(Artifact);
-    
-        protected:
-            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
-                PROC_TYPED_CHILD(Artifact,SAMLConstants::SAML20P_NS,false);
-                RequestImpl::processChildElement(childXMLObject,root);
-            }
-        };
-
-        class SAML_DLLLOCAL ArtifactResponseImpl : public virtual ArtifactResponse, public StatusResponseImpl
-        {
-            void init() {
-                m_Payload=NULL;
-                m_children.push_back(NULL);
-                m_pos_Payload=m_pos_Status;
-                ++m_pos_Payload;
-            }
-        public:
-            virtual ~ArtifactResponseImpl() { }
-    
-            ArtifactResponseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
-                : AbstractXMLObject(nsURI, localName, prefix, schemaType)
-            {
-                init();
-            }
-                
-            ArtifactResponseImpl(const ArtifactResponseImpl& src) : AbstractXMLObject(src), StatusResponseImpl(src) {
-                init();
-                if (src.getPayload())
-                    setPayload(getPayload()->clone());
-
-            }
-            
-            IMPL_XMLOBJECT_CLONE(ArtifactResponse);
-            IMPL_XMLOBJECT_CHILD(Payload);
-    
-        protected:
-            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
-                // These are valid elements for the parent StatusResponse, so don't process these.
-                // If not one of these, then it must be the payload.
-                if (
-                    ! XMLHelper::isNodeNamed(root,SAMLConstants::SAML20_NS,saml2::Issuer::LOCAL_NAME) &&
-                    ! XMLHelper::isNodeNamed(root,XMLConstants::XMLSIG_NS,xmlsignature::Signature::LOCAL_NAME) &&
-                    ! XMLHelper::isNodeNamed(root,SAMLConstants::SAML20P_NS,saml2p::Extensions::LOCAL_NAME) &&
-                    ! XMLHelper::isNodeNamed(root,SAMLConstants::SAML20P_NS,saml2p::Status::LOCAL_NAME)
-                   )
-                {
-                    setPayload(childXMLObject);
-                    return;
-                }
-
-                StatusResponseImpl::processChildElement(childXMLObject,root);
-            }
-        };
-
-        class SAML_DLLLOCAL NewEncryptedIDImpl : public virtual NewEncryptedID,
-            public AbstractComplexElement,
-            public AbstractDOMCachingXMLObject,
-            public AbstractXMLObjectMarshaller,
-            public AbstractXMLObjectUnmarshaller
-        {
-            void init() {
-                m_EncryptedData=NULL;
-                m_children.push_back(NULL);
-                m_pos_EncryptedData=m_children.begin();
-            }
-            
-        protected:
-            NewEncryptedIDImpl()
-            {
-                init();
-            }
-            
-        public:
-            virtual ~NewEncryptedIDImpl() {}
-    
-            NewEncryptedIDImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
-                    : AbstractXMLObject(nsURI, localName, prefix, schemaType)
-            {
-                init();
-            }
-                
-            NewEncryptedIDImpl(const NewEncryptedIDImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
-                init();
-                if (src.getEncryptedData())
-                    setEncryptedData(src.getEncryptedData()->cloneEncryptedData());
-                VectorOf(xmlencryption::EncryptedKey) v=getEncryptedKeys();
-                for (vector<xmlencryption::EncryptedKey*>::const_iterator i=src.m_EncryptedKeys.begin(); i!=src.m_EncryptedKeys.end(); i++) {
-                    if (*i) {
-                        v.push_back((*i)->cloneEncryptedKey());
-                    }
-                }
-            }
-    
-            XMLObject* decrypt(KeyResolver* KEKresolver, const XMLCh* recipient) const
-            {
-                if (!m_EncryptedData)
-                    throw DecryptionException("No encrypted data present.");
-                Decrypter decrypter(KEKresolver, new EncryptedKeyResolver(*this, recipient));
-                DOMDocumentFragment* frag = decrypter.decryptData(m_EncryptedData);
-                if (frag->hasChildNodes() && frag->getFirstChild()==frag->getLastChild()) {
-                    DOMNode* plaintext=frag->getFirstChild();
-                    if (plaintext->getNodeType()==DOMNode::ELEMENT_NODE) {
-                        auto_ptr<XMLObject> ret(XMLObjectBuilder::buildOneFromElement(static_cast<DOMElement*>(plaintext)));
-                        ret->releaseThisAndChildrenDOM();
-                        return ret.release();
-                    }
-                }
-                frag->release();
-                throw DecryptionException("Decryption did not result in a single element.");
-            }
-        
-            IMPL_XMLOBJECT_CLONE(NewEncryptedID);
-            EncryptedElementType* cloneEncryptedElementType() const {
-                return new NewEncryptedIDImpl(*this);
-            }
-
-            IMPL_TYPED_FOREIGN_CHILD(EncryptedData,xmlencryption);
-            IMPL_TYPED_FOREIGN_CHILDREN(EncryptedKey,xmlencryption,m_children.end());
-    
-        protected:
-            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
-                PROC_TYPED_FOREIGN_CHILD(EncryptedData,xmlencryption,XMLConstants::XMLENC_NS,false);
-                PROC_TYPED_FOREIGN_CHILDREN(EncryptedKey,xmlencryption,XMLConstants::XMLENC_NS,false);
-                AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
-            }
-        };
-
-        class SAML_DLLLOCAL TerminateImpl : public virtual Terminate,
-            public AbstractChildlessElement,
-            public AbstractDOMCachingXMLObject,
-            public AbstractXMLObjectMarshaller,
-            public AbstractXMLObjectUnmarshaller
-        {
-            public:
-                virtual ~TerminateImpl() { }
-
-                TerminateImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
-                    : AbstractXMLObject(nsURI, localName, prefix, schemaType) { }
-
-                TerminateImpl(const TerminateImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
-                }
-
-                IMPL_XMLOBJECT_CLONE(Terminate);
-
-            protected:
-                // has no attributes or children
-        };
-
-        class SAML_DLLLOCAL ManageNameIDRequestImpl : public virtual ManageNameIDRequest, public RequestImpl
-        {
-            void init() {
-                m_NameID=NULL;
-                m_EncryptedID=NULL;
-                m_NewID=NULL;
-                m_NewEncryptedID=NULL;
-                m_Terminate=NULL;
-                m_children.push_back(NULL);
-                m_children.push_back(NULL);
-                m_children.push_back(NULL);
-                m_children.push_back(NULL);
-                m_children.push_back(NULL);
-                m_pos_NameID=m_pos_Extensions;
-                ++m_pos_NameID;
-                m_pos_EncryptedID=m_pos_NameID;
-                ++m_pos_EncryptedID;
-                m_pos_NewID=m_pos_EncryptedID;
-                ++m_pos_NewID;
-                m_pos_NewEncryptedID=m_pos_NewID;
-                ++m_pos_NewEncryptedID;
-                m_pos_Terminate=m_pos_NewEncryptedID;
-                ++m_pos_Terminate;
-                
-            }
-        public:
-            virtual ~ManageNameIDRequestImpl() { }
-    
-            ManageNameIDRequestImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
-                : AbstractXMLObject(nsURI, localName, prefix, schemaType)
-            {
-                init();
-            }
-                
-            ManageNameIDRequestImpl(const ManageNameIDRequestImpl& src) : AbstractXMLObject(src), RequestImpl(src) {
-                init();
-
-                if (src.getNameID())
-                    setNameID(src.getNameID()->cloneNameID());
-                if (src.getEncryptedID())
-                    setEncryptedID(src.getEncryptedID()->cloneEncryptedID());
-                if (src.getNewID())
-                    setNewID(src.getNewID()->cloneNewID());
-                if (src.getNewEncryptedID())
-                    setNewEncryptedID(src.getNewEncryptedID()->cloneNewEncryptedID());
-                if (src.getTerminate())
-                    setTerminate(src.getTerminate()->cloneTerminate());
-
-            }
-            
-            IMPL_XMLOBJECT_CLONE(ManageNameIDRequest);
-
-            IMPL_TYPED_FOREIGN_CHILD(NameID,saml2);
-            IMPL_TYPED_FOREIGN_CHILD(EncryptedID,saml2);
-            IMPL_TYPED_CHILD(NewID);
-            IMPL_TYPED_CHILD(NewEncryptedID);
-            IMPL_TYPED_CHILD(Terminate);
-    
-        protected:
-            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
-                PROC_TYPED_FOREIGN_CHILD(NameID,saml2,SAMLConstants::SAML20_NS,false);
-                PROC_TYPED_FOREIGN_CHILD(EncryptedID,saml2,SAMLConstants::SAML20_NS,false);
-                PROC_TYPED_CHILD(NewID,SAMLConstants::SAML20P_NS,false);
-                PROC_TYPED_CHILD(NewEncryptedID,SAMLConstants::SAML20P_NS,false);
-                PROC_TYPED_CHILD(Terminate,SAMLConstants::SAML20P_NS,false);
-                RequestImpl::processChildElement(childXMLObject,root);
-            }
-        };
-
-        class SAML_DLLLOCAL ManageNameIDResponseImpl : public virtual ManageNameIDResponse, public StatusResponseImpl
-        {
-            public:
-                virtual ~ManageNameIDResponseImpl() { }
-    
-                ManageNameIDResponseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
-                    : AbstractXMLObject(nsURI, localName, prefix, schemaType) { }
-                
-                ManageNameIDResponseImpl(const ManageNameIDResponseImpl& src) : AbstractXMLObject(src), StatusResponseImpl(src) {
-                }
-
-                IMPL_XMLOBJECT_CLONE(ManageNameIDResponse);
-        };
-
-        class SAML_DLLLOCAL LogoutRequestImpl : public virtual LogoutRequest, public RequestImpl
-        {
-            void init() {
-                m_Reason=NULL;
-                m_NotOnOrAfter=NULL;
-
-                m_BaseID=NULL;
-                m_NameID=NULL;
-                m_EncryptedID=NULL;
-                m_children.push_back(NULL);
-                m_children.push_back(NULL);
-                m_children.push_back(NULL);
-                m_pos_BaseID=m_pos_Extensions;
-                ++m_pos_BaseID;
-                m_pos_NameID=m_pos_BaseID;
-                ++m_pos_NameID;
-                m_pos_EncryptedID=m_pos_NameID;
-                ++m_pos_EncryptedID;
-                
-            }
-        public:
-            virtual ~LogoutRequestImpl() {
-                XMLString::release(&m_Reason);
-                delete m_NotOnOrAfter;
-            }
-    
-            LogoutRequestImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
-                : AbstractXMLObject(nsURI, localName, prefix, schemaType)
-            {
-                init();
-            }
-                
-            LogoutRequestImpl(const LogoutRequestImpl& src) : AbstractXMLObject(src), RequestImpl(src) {
-                init();
-
-                setReason(src.getReason());
-                setNotOnOrAfter(src.getNotOnOrAfter());
-
-                if (src.getBaseID())
-                    setBaseID(src.getBaseID()->cloneBaseID());
-                if (src.getNameID())
-                    setNameID(src.getNameID()->cloneNameID());
-                if (src.getEncryptedID())
-                    setEncryptedID(src.getEncryptedID()->cloneEncryptedID());
-
-                for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
-                    if (*i) {
-                        SessionIndex* si = dynamic_cast<SessionIndex*>(*i);
-                        if (si) {
-                            getSessionIndexs().push_back(si->cloneSessionIndex());
-                            continue;
-                        }
-                    }
-                }
-            }
-            
-            IMPL_XMLOBJECT_CLONE(LogoutRequest);
-
-            IMPL_STRING_ATTRIB(Reason);
-            IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
-            IMPL_TYPED_FOREIGN_CHILD(BaseID,saml2);
-            IMPL_TYPED_FOREIGN_CHILD(NameID,saml2);
-            IMPL_TYPED_FOREIGN_CHILD(EncryptedID,saml2);
-            IMPL_TYPED_CHILDREN(SessionIndex,m_children.end());
-    
-        protected:
-            void marshallAttributes(DOMElement* domElement) const {
-                MARSHALL_STRING_ATTRIB(Reason,REASON,NULL);
-                MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
-                RequestImpl::marshallAttributes(domElement);
-            }
-    
-            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
-                PROC_TYPED_FOREIGN_CHILD(BaseID,saml2,SAMLConstants::SAML20_NS,false);
-                PROC_TYPED_FOREIGN_CHILD(NameID,saml2,SAMLConstants::SAML20_NS,false);
-                PROC_TYPED_FOREIGN_CHILD(EncryptedID,saml2,SAMLConstants::SAML20_NS,false);
-                PROC_TYPED_CHILDREN(SessionIndex,SAMLConstants::SAML20P_NS,false);
-                RequestImpl::processChildElement(childXMLObject,root);
-            }
-            void processAttribute(const DOMAttr* attribute) {
-                PROC_STRING_ATTRIB(Reason,REASON,NULL);
-                PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
-                RequestImpl::processAttribute(attribute);
-            }
-        };
-
-        class SAML_DLLLOCAL LogoutResponseImpl : public virtual LogoutResponse, public StatusResponseImpl
-        {
-            public:
-                virtual ~LogoutResponseImpl() { }
-    
-                LogoutResponseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
-                    : AbstractXMLObject(nsURI, localName, prefix, schemaType) { }
-                
-                LogoutResponseImpl(const LogoutResponseImpl& src) : AbstractXMLObject(src), StatusResponseImpl(src) {
-                }
-
-                IMPL_XMLOBJECT_CLONE(LogoutResponse);
-        };
-
-
-        class SAML_DLLLOCAL NameIDMappingRequestImpl : public virtual NameIDMappingRequest, public RequestImpl
-        {
-            void init() {
-                m_BaseID=NULL;
-                m_NameID=NULL;
-                m_EncryptedID=NULL;
-                m_NameIDPolicy=NULL;
-                m_children.push_back(NULL);
-                m_children.push_back(NULL);
-                m_children.push_back(NULL);
-                m_children.push_back(NULL);
-                m_pos_BaseID=m_pos_Extensions;
-                ++m_pos_BaseID;
-                m_pos_NameID=m_pos_BaseID;
-                ++m_pos_NameID;
-                m_pos_EncryptedID=m_pos_NameID;
-                ++m_pos_EncryptedID;
-                m_pos_NameIDPolicy=m_pos_EncryptedID;
-                ++m_pos_NameIDPolicy;
-                
-            }
-        public:
-            virtual ~NameIDMappingRequestImpl() { }
-    
-            NameIDMappingRequestImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
-                : AbstractXMLObject(nsURI, localName, prefix, schemaType)
-            {
-                init();
-            }
-                
-            NameIDMappingRequestImpl(const NameIDMappingRequestImpl& src) : AbstractXMLObject(src), RequestImpl(src) {
-                init();
-
-                if (src.getBaseID())
-                    setBaseID(src.getBaseID()->cloneBaseID());
-                if (src.getNameID())
-                    setNameID(src.getNameID()->cloneNameID());
-                if (src.getEncryptedID())
-                    setEncryptedID(src.getEncryptedID()->cloneEncryptedID());
-                if (src.getNameIDPolicy())
-                    setNameIDPolicy(src.getNameIDPolicy()->cloneNameIDPolicy());
-
-            }
-            
-            IMPL_XMLOBJECT_CLONE(NameIDMappingRequest);
-
-            IMPL_TYPED_FOREIGN_CHILD(BaseID,saml2);
-            IMPL_TYPED_FOREIGN_CHILD(NameID,saml2);
-            IMPL_TYPED_FOREIGN_CHILD(EncryptedID,saml2);
-            IMPL_TYPED_CHILD(NameIDPolicy);
-    
-        protected:
-            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
-                PROC_TYPED_FOREIGN_CHILD(BaseID,saml2,SAMLConstants::SAML20_NS,false);
-                PROC_TYPED_FOREIGN_CHILD(NameID,saml2,SAMLConstants::SAML20_NS,false);
-                PROC_TYPED_FOREIGN_CHILD(EncryptedID,saml2,SAMLConstants::SAML20_NS,false);
-                PROC_TYPED_CHILD(NameIDPolicy,SAMLConstants::SAML20P_NS,false);
-                RequestImpl::processChildElement(childXMLObject,root);
-            }
-        };
-
-        class SAML_DLLLOCAL NameIDMappingResponseImpl : public virtual NameIDMappingResponse, public StatusResponseImpl
-        {
-            void init() {
-                m_NameID=NULL;
-                m_EncryptedID=NULL;
-                m_children.push_back(NULL);
-                m_children.push_back(NULL);
-                m_pos_NameID=m_pos_Status;
-                ++m_pos_NameID;
-                m_pos_EncryptedID=m_pos_NameID;
-                ++m_pos_EncryptedID;
-            }
-        public:
-            virtual ~NameIDMappingResponseImpl() { }
-    
-            NameIDMappingResponseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
-                : AbstractXMLObject(nsURI, localName, prefix, schemaType)
-            {
-                init();
-            }
-                
-            NameIDMappingResponseImpl(const NameIDMappingResponseImpl& src) : AbstractXMLObject(src), StatusResponseImpl(src) {
-                init();
-
-                if (src.getNameID())
-                    setNameID(getNameID()->cloneNameID());
-                if (src.getEncryptedID())
-                    setEncryptedID(getEncryptedID()->cloneEncryptedID());
-
-            }
-            
-            IMPL_XMLOBJECT_CLONE(NameIDMappingResponse);
-            IMPL_TYPED_FOREIGN_CHILD(NameID,saml2);
-            IMPL_TYPED_FOREIGN_CHILD(EncryptedID,saml2);
-    
-        protected:
-            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
-                PROC_TYPED_FOREIGN_CHILD(NameID,saml2,SAMLConstants::SAML20_NS,false);
-                PROC_TYPED_FOREIGN_CHILD(EncryptedID,saml2,SAMLConstants::SAML20_NS,false);
-                StatusResponseImpl::processChildElement(childXMLObject,root);
-            }
-        };
-    };
-};
-
-#if defined (_MSC_VER)
-    #pragma warning( pop )
-#endif
-
-// Builder Implementations
-IMPL_XMLOBJECTBUILDER(Artifact);
-IMPL_XMLOBJECTBUILDER(ArtifactResolve);
-IMPL_XMLOBJECTBUILDER(ArtifactResponse);
-IMPL_XMLOBJECTBUILDER(AssertionIDRequest);
-IMPL_XMLOBJECTBUILDER(AttributeQuery);
-IMPL_XMLOBJECTBUILDER(AuthnQuery);
-IMPL_XMLOBJECTBUILDER(AuthnRequest);
-IMPL_XMLOBJECTBUILDER(AuthzDecisionQuery);
-IMPL_XMLOBJECTBUILDER(Extensions);
-IMPL_XMLOBJECTBUILDER(GetComplete);
-IMPL_XMLOBJECTBUILDER(IDPEntry);
-IMPL_XMLOBJECTBUILDER(IDPList);
-IMPL_XMLOBJECTBUILDER(LogoutRequest);
-IMPL_XMLOBJECTBUILDER(LogoutResponse);
-IMPL_XMLOBJECTBUILDER(ManageNameIDRequest);
-IMPL_XMLOBJECTBUILDER(ManageNameIDResponse);
-IMPL_XMLOBJECTBUILDER(NameIDMappingRequest);
-IMPL_XMLOBJECTBUILDER(NameIDMappingResponse);
-IMPL_XMLOBJECTBUILDER(NameIDPolicy);
-IMPL_XMLOBJECTBUILDER(NewEncryptedID);
-IMPL_XMLOBJECTBUILDER(NewID);
-IMPL_XMLOBJECTBUILDER(RequestedAuthnContext);
-IMPL_XMLOBJECTBUILDER(RequesterID);
-IMPL_XMLOBJECTBUILDER(Response);
-IMPL_XMLOBJECTBUILDER(Scoping);
-IMPL_XMLOBJECTBUILDER(SessionIndex);
-IMPL_XMLOBJECTBUILDER(Status);
-IMPL_XMLOBJECTBUILDER(StatusCode);
-IMPL_XMLOBJECTBUILDER(StatusDetail);
-IMPL_XMLOBJECTBUILDER(StatusMessage);
-IMPL_XMLOBJECTBUILDER(StatusResponse);
-IMPL_XMLOBJECTBUILDER(Terminate);
-
-IMPL_XMLOBJECTBUILDER(RespondTo);
-
-// Unicode literals
-const XMLCh Artifact::LOCAL_NAME[] = UNICODE_LITERAL_8(A,r,t,i,f,a,c,t);
-const XMLCh ArtifactResolve::LOCAL_NAME[] = UNICODE_LITERAL_15(A,r,t,i,f,a,c,t,R,e,s,o,l,v,e);
-const XMLCh ArtifactResolve::TYPE_NAME[] = UNICODE_LITERAL_19(A,r,t,i,f,a,c,t,R,e,s,o,l,v,e,T,y,p,e);
-const XMLCh ArtifactResponse::LOCAL_NAME[] = UNICODE_LITERAL_16(A,r,t,i,f,a,c,t,R,e,s,p,o,n,s,e);
-const XMLCh ArtifactResponse::TYPE_NAME[] = UNICODE_LITERAL_20(A,r,t,i,f,a,c,t,R,e,s,p,o,n,s,e,T,y,p,e);
-const XMLCh AssertionIDRequest::LOCAL_NAME[] = UNICODE_LITERAL_18(A,s,s,e,r,t,i,o,n,I,D,R,e,q,u,e,s,t);
-const XMLCh AssertionIDRequest::TYPE_NAME[] = UNICODE_LITERAL_22(A,s,s,e,r,t,i,o,n,I,D,R,e,q,u,e,s,t,T,y,p,e);
-const XMLCh AttributeQuery::LOCAL_NAME[] = UNICODE_LITERAL_14(A,t,t,r,i,b,u,t,e,Q,u,e,r,y);
-const XMLCh AttributeQuery::TYPE_NAME[] = UNICODE_LITERAL_18(A,t,t,r,i,b,u,t,e,Q,u,e,r,y,T,y,p,e);
-const XMLCh AuthnQuery::LOCAL_NAME[] = UNICODE_LITERAL_10(A,u,t,h,n,Q,u,e,r,y);
-const XMLCh AuthnQuery::TYPE_NAME[] = UNICODE_LITERAL_14(A,u,t,h,n,Q,u,e,r,y,T,y,p,e);
-const XMLCh AuthnQuery::SESSIONINDEX_ATTRIB_NAME[] = UNICODE_LITERAL_12(S,e,s,s,i,o,n,I,n,d,e,x);
-const XMLCh AuthnRequest::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,n,R,e,q,u,e,s,t);
-const XMLCh AuthnRequest::TYPE_NAME[] = UNICODE_LITERAL_16(A,u,t,h,n,R,e,q,u,e,s,t,T,y,p,e);
-const XMLCh AuthnRequest::FORCEAUTHN_ATTRIB_NAME[] = UNICODE_LITERAL_10(F,o,r,c,e,A,u,t,h,n);
-const XMLCh AuthnRequest::ISPASSIVE_ATTRIB_NAME[] = UNICODE_LITERAL_9(I,s,P,a,s,s,i,v,e);
-const XMLCh AuthnRequest::PROTOCOLBINDING_ATTRIB_NAME[] = UNICODE_LITERAL_15(P,r,o,t,o,c,o,l,B,i,n,d,i,n,g);
-const XMLCh AuthnRequest::ASSERTIONCONSUMERSERVICEINDEX_ATTRIB_NAME[] = UNICODE_LITERAL_29(A,s,s,e,r,t,i,o,n,C,o,n,s,u,m,e,r,S,e,r,v,i,c,e,I,n,d,e,x);
-const XMLCh AuthnRequest::ASSERTIONCONSUMERSERVICEURL_ATTRIB_NAME[] = UNICODE_LITERAL_27(A,s,s,e,r,t,i,o,n,C,o,n,s,u,m,e,r,S,e,r,v,i,c,e,U,R,L);
-const XMLCh AuthnRequest::ATTRIBUTECONSUMINGSERVICEINDEX_ATTRIB_NAME[] = UNICODE_LITERAL_30(A,t,t,r,i,b,u,t,e,C,o,n,s,u,m,i,n,g,S,e,r,v,i,c,e,I,n,d,e,x);
-const XMLCh AuthnRequest::PROVIDERNAME_ATTRIB_NAME[] = UNICODE_LITERAL_12(P,r,o,v,i,d,e,r,N,a,m,e);
-const XMLCh AuthzDecisionQuery::LOCAL_NAME[] = UNICODE_LITERAL_18(A,u,t,h,z,D,e,c,i,s,i,o,n,Q,u,e,r,y);
-const XMLCh AuthzDecisionQuery::TYPE_NAME[] = UNICODE_LITERAL_22(A,u,t,h,z,D,e,c,i,s,i,o,n,Q,u,e,r,y,T,y,p,e);
-const XMLCh AuthzDecisionQuery::RESOURCE_ATTRIB_NAME[] = UNICODE_LITERAL_8(R,e,s,o,u,r,c,e);
-const XMLCh Extensions::LOCAL_NAME[] = UNICODE_LITERAL_10(E,x,t,e,n,s,i,o,n,s);
-const XMLCh Extensions::TYPE_NAME[] = UNICODE_LITERAL_14(E,x,t,e,n,s,i,o,n,s,T,y,p,e);
-const XMLCh GetComplete::LOCAL_NAME[] = UNICODE_LITERAL_11(G,e,t,C,o,m,p,l,e,t,e);
-const XMLCh IDPEntry::LOCAL_NAME[] = UNICODE_LITERAL_8(I,D,P,E,n,t,r,y);
-const XMLCh IDPEntry::TYPE_NAME[] = UNICODE_LITERAL_12(I,D,P,E,n,t,r,y,T,y,p,e);
-const XMLCh IDPEntry::PROVIDERID_ATTRIB_NAME[] = UNICODE_LITERAL_10(P,r,o,v,i,d,e,r,I,D);
-const XMLCh IDPEntry::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e);
-const XMLCh IDPEntry::LOC_ATTRIB_NAME[] = UNICODE_LITERAL_3(L,o,c);
-const XMLCh IDPList::LOCAL_NAME[] = UNICODE_LITERAL_7(I,D,P,L,i,s,t);
-const XMLCh IDPList::TYPE_NAME[] = UNICODE_LITERAL_11(I,D,P,L,i,s,t,T,y,p,e);
-const XMLCh LogoutRequest::LOCAL_NAME[] = UNICODE_LITERAL_13(L,o,g,o,u,t,R,e,q,u,e,s,t);
-const XMLCh LogoutRequest::TYPE_NAME[] = UNICODE_LITERAL_17(L,o,g,o,u,t,R,e,q,u,e,s,t,T,y,p,e);
-const XMLCh LogoutRequest::REASON_ATTRIB_NAME[] = UNICODE_LITERAL_6(R,e,a,s,o,n);
-const XMLCh LogoutRequest::NOTONORAFTER_ATTRIB_NAME[] = UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
-const XMLCh LogoutResponse::LOCAL_NAME[] = UNICODE_LITERAL_14(L,o,g,o,u,t,R,e,s,p,o,n,s,e);
-const XMLCh ManageNameIDRequest::LOCAL_NAME[] = UNICODE_LITERAL_19(M,a,n,a,g,e,N,a,m,e,I,D,R,e,q,u,e,s,t);
-const XMLCh ManageNameIDRequest::TYPE_NAME[] = UNICODE_LITERAL_23(M,a,n,a,g,e,N,a,m,e,I,D,R,e,q,u,e,s,t,T,y,p,e);
-const XMLCh ManageNameIDResponse::LOCAL_NAME[] = UNICODE_LITERAL_20(M,a,n,a,g,e,N,a,m,e,I,D,R,e,s,p,o,n,s,e);
-const XMLCh NameIDMappingRequest::LOCAL_NAME[] = UNICODE_LITERAL_20(N,a,m,e,I,D,M,a,p,p,i,n,g,R,e,q,u,e,s,t);
-const XMLCh NameIDMappingRequest::TYPE_NAME[] = UNICODE_LITERAL_24(N,a,m,e,I,D,M,a,p,p,i,n,g,R,e,q,u,e,s,t,T,y,p,e);
-const XMLCh NameIDMappingResponse::LOCAL_NAME[] = UNICODE_LITERAL_21(N,a,m,e,I,D,M,a,p,p,i,n,g,R,e,s,p,o,n,s,e);
-const XMLCh NameIDMappingResponse::TYPE_NAME[] = UNICODE_LITERAL_25(N,a,m,e,I,D,M,a,p,p,i,n,g,R,e,s,p,o,n,s,e,T,y,p,e);
-const XMLCh NameIDPolicy::LOCAL_NAME[] = UNICODE_LITERAL_12(N,a,m,e,I,D,P,o,l,i,c,y);
-const XMLCh NameIDPolicy::TYPE_NAME[] = UNICODE_LITERAL_16(N,a,m,e,I,D,P,o,l,i,c,y,T,y,p,e);
-const XMLCh NameIDPolicy::FORMAT_ATTRIB_NAME[] = UNICODE_LITERAL_6(F,o,r,m,a,t);
-const XMLCh NameIDPolicy::SPNAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_15(S,P,N,a,m,e,Q,u,a,l,i,f,i,e,r);
-const XMLCh NameIDPolicy::ALLOWCREATE_ATTRIB_NAME[] = UNICODE_LITERAL_11(A,l,l,o,w,C,r,e,a,t,e);
-const XMLCh NewEncryptedID::LOCAL_NAME[] = UNICODE_LITERAL_14(N,e,w,E,n,c,r,y,p,t,e,d,I,D);
-const XMLCh NewID::LOCAL_NAME[] = UNICODE_LITERAL_5(N,e,w,I,D);
-const XMLCh RequesterID::LOCAL_NAME[] = UNICODE_LITERAL_11(R,e,q,u,e,s,t,e,r,I,D);
-const XMLCh RequestedAuthnContext::LOCAL_NAME[] = UNICODE_LITERAL_21(R,e,q,u,e,s,t,e,d,A,u,t,h,n,C,o,n,t,e,x,t);
-const XMLCh RequestedAuthnContext::TYPE_NAME[] = UNICODE_LITERAL_25(R,e,q,u,e,s,t,e,d,A,u,t,h,n,C,o,n,t,e,x,t,T,y,p,e);
-const XMLCh RequestedAuthnContext::COMPARISON_ATTRIB_NAME[] = UNICODE_LITERAL_10(C,o,m,p,a,r,i,s,o,n);
-const XMLCh RequestedAuthnContext::COMPARISON_EXACT[] = UNICODE_LITERAL_5(e,x,a,c,t);
-const XMLCh RequestedAuthnContext::COMPARISON_MINIMUM[] = UNICODE_LITERAL_7(m,i,n,i,m,u,m);
-const XMLCh RequestedAuthnContext::COMPARISON_MAXIMUM[] = UNICODE_LITERAL_7(m,a,x,i,m,u,m);
-const XMLCh RequestedAuthnContext::COMPARISON_BETTER[] = UNICODE_LITERAL_6(b,e,t,t,e,r);
-const XMLCh Request::LOCAL_NAME[] = {chNull};
-const XMLCh Request::TYPE_NAME[] = UNICODE_LITERAL_19(R,e,q,u,e,s,t,A,b,s,t,r,a,c,t,T,y,p,e);
-const XMLCh Request::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
-const XMLCh Request::VER_ATTRIB_NAME[] = UNICODE_LITERAL_7(V,e,r,s,i,o,n);
-const XMLCh Request::ISSUEINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,s,s,u,e,I,n,s,t,a,n,t);
-const XMLCh Request::DESTINATION_ATTRIB_NAME[] = UNICODE_LITERAL_11(D,e,s,t,i,n,a,t,i,o,n);
-const XMLCh Request::CONSENT_ATTRIB_NAME[] = UNICODE_LITERAL_7(C,o,n,s,e,n,t);
-const XMLCh RespondTo::LOCAL_NAME[] = UNICODE_LITERAL_9(R,e,s,p,o,n,d,T,o);
-const XMLCh Response::LOCAL_NAME[] = UNICODE_LITERAL_8(R,e,s,p,o,n,s,e);
-const XMLCh Response::TYPE_NAME[] = UNICODE_LITERAL_12(R,e,s,p,o,n,s,e,T,y,p,e);
-const XMLCh Scoping::LOCAL_NAME[] = UNICODE_LITERAL_7(S,c,o,p,i,n,g);
-const XMLCh Scoping::TYPE_NAME[] = UNICODE_LITERAL_11(S,c,o,p,i,n,g,T,y,p,e);
-const XMLCh Scoping::PROXYCOUNT_ATTRIB_NAME[] = UNICODE_LITERAL_10(P,r,o,x,y,C,o,u,n,t);
-const XMLCh SessionIndex::LOCAL_NAME[] = UNICODE_LITERAL_12(S,e,s,s,i,o,n,I,n,d,e,x);
-const XMLCh Status::LOCAL_NAME[] = UNICODE_LITERAL_6(S,t,a,t,u,s);
-const XMLCh Status::TYPE_NAME[] = UNICODE_LITERAL_10(S,t,a,t,u,s,T,y,p,e);
-const XMLCh StatusCode::LOCAL_NAME[] = UNICODE_LITERAL_10(S,t,a,t,u,s,C,o,d,e);
-const XMLCh StatusCode::TYPE_NAME[] = UNICODE_LITERAL_14(S,t,a,t,u,s,C,o,d,e,T,y,p,e);
-const XMLCh StatusCode::VALUE_ATTRIB_NAME[] = UNICODE_LITERAL_5(V,a,l,u,e);
-const XMLCh StatusDetail::LOCAL_NAME[] = UNICODE_LITERAL_12(S,t,a,t,u,s,D,e,t,a,i,l);
-const XMLCh StatusDetail::TYPE_NAME[] = UNICODE_LITERAL_16(S,t,a,t,u,s,D,e,t,a,i,l,T,y,p,e);
-const XMLCh StatusMessage::LOCAL_NAME[] = UNICODE_LITERAL_13(S,t,a,t,u,s,M,e,s,s,a,g,e);
-const XMLCh StatusResponse::LOCAL_NAME[] = {chNull};
-const XMLCh StatusResponse::TYPE_NAME[] = UNICODE_LITERAL_18(S,t,a,t,u,s,R,e,s,p,o,n,s,e,T,y,p,e);
-const XMLCh StatusResponse::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
-const XMLCh StatusResponse::INRESPONSETO_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,n,R,e,s,p,o,n,s,e,T,o);
-const XMLCh StatusResponse::VER_ATTRIB_NAME[] = UNICODE_LITERAL_7(V,e,r,s,i,o,n);
-const XMLCh StatusResponse::ISSUEINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,s,s,u,e,I,n,s,t,a,n,t);
-const XMLCh StatusResponse::DESTINATION_ATTRIB_NAME[] = UNICODE_LITERAL_11(D,e,s,t,i,n,a,t,i,o,n);
-const XMLCh StatusResponse::CONSENT_ATTRIB_NAME[] = UNICODE_LITERAL_7(C,o,n,s,e,n,t);
-const XMLCh SubjectQuery::LOCAL_NAME[] = {chNull};
-const XMLCh SubjectQuery::TYPE_NAME[] = UNICODE_LITERAL_16(S,u,b,j,e,c,t,Q,u,e,r,y,T,y,p,e);
-const XMLCh Terminate::LOCAL_NAME[] = UNICODE_LITERAL_9(T,e,r,m,i,n,a,t,e);
-const XMLCh Terminate::TYPE_NAME[] = UNICODE_LITERAL_13(T,e,r,m,i,n,a,t,e,T,y,p,e);
-
-// Unicode literals: LogoutRequest element, Reason attribute
-const XMLCh LogoutRequest::REASON_USER[] = // urn:oasis:names:tc:SAML:2.0:logout:user
-{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
-  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
-  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
-  chLatin_l, chLatin_o, chLatin_g, chLatin_o, chLatin_u, chLatin_t, chColon,
-  chLatin_u, chLatin_s, chLatin_e, chLatin_r, chNull
-};
-
-const XMLCh LogoutRequest::REASON_ADMIN[] = // urn:oasis:names:tc:SAML:2.0:logout:admin
-{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
-  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
-  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
-  chLatin_l, chLatin_o, chLatin_g, chLatin_o, chLatin_u, chLatin_t, chColon,
-  chLatin_a, chLatin_d, chLatin_m, chLatin_i, chLatin_n, chNull
-};
-
-
-const XMLCh LogoutRequest::REASON_GLOBAL_TIMEOUT[] = // urn:oasis:names:tc:SAML:2.0:logout:global-timeout
-{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
-  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
-  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
-  chLatin_l, chLatin_o, chLatin_g, chLatin_o, chLatin_u, chLatin_t, chColon,
-  chLatin_g, chLatin_l, chLatin_o, chLatin_b, chLatin_a, chLatin_l, 
-    chDash, chLatin_t, chLatin_i, chLatin_m, chLatin_e, chLatin_o, chLatin_u, chLatin_t, chNull
-};
-
-
-const XMLCh LogoutRequest::REASON_SP_TIMEOUT[] = // urn:oasis:names:tc:SAML:2.0:logout:sp-timeout
-{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
-  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
-  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
-  chLatin_l, chLatin_o, chLatin_g, chLatin_o, chLatin_u, chLatin_t, chColon,
-  chLatin_s, chLatin_p, chDash, chLatin_t, chLatin_i, chLatin_m, chLatin_e, chLatin_o, chLatin_u, chLatin_t, chNull
-};
-
-
-// Unicode literals, StatusCode Value
-const XMLCh StatusCode::SUCCESS[] = //  urn:oasis:names:tc:SAML:2.0:status:Success 
-{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
-  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
-  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
-  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
-  chLatin_S, chLatin_u, chLatin_c, chLatin_c, chLatin_e, chLatin_s, chLatin_s, chNull
-};
-
-const XMLCh StatusCode::REQUESTER[] = //  urn:oasis:names:tc:SAML:2.0:status:Requester 
-{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
-  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
-  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
-  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
-  chLatin_R, chLatin_e, chLatin_q, chLatin_u, chLatin_e, chLatin_s, chLatin_t, chLatin_e, chLatin_r, chNull
-};
-
-const XMLCh StatusCode::RESPONDER[] = //  urn:oasis:names:tc:SAML:2.0:status:Responder 
-{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
-  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
-  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
-  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
-  chLatin_R, chLatin_e, chLatin_s, chLatin_p, chLatin_o, chLatin_n, chLatin_d, chLatin_e, chLatin_r, chNull
-};
-
-const XMLCh StatusCode::VERSION_MISMATCH[] = //  urn:oasis:names:tc:SAML:2.0:status:VersionMismatch 
-{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
-  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
-  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
-  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
-  chLatin_V, chLatin_e, chLatin_r, chLatin_s, chLatin_i, chLatin_o, chLatin_n,
-    chLatin_M, chLatin_i, chLatin_s, chLatin_m, chLatin_a, chLatin_t, chLatin_c, chLatin_h, chNull
-};
-
-const XMLCh StatusCode::AUTHN_FAILED[] = //  urn:oasis:names:tc:SAML:2.0:status:AuthnFailed 
-{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
-  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
-  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
-  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
-  chLatin_A, chLatin_u, chLatin_t, chLatin_h, chLatin_n,
-    chLatin_F, chLatin_a, chLatin_i, chLatin_l, chLatin_e, chLatin_d, chNull
-};
-
-const XMLCh StatusCode::INVALID_ATTR_NAME_OR_VALUE[] = //  urn:oasis:names:tc:SAML:2.0:status:InvalidAttrNameOrValue 
-{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
-  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
-  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
-  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
-  chLatin_I, chLatin_n, chLatin_v, chLatin_a, chLatin_l, chLatin_i, chLatin_d, 
-    chLatin_A, chLatin_t, chLatin_t, chLatin_r, chLatin_N, chLatin_a, chLatin_m, chLatin_e, 
-    chLatin_O, chLatin_r, chLatin_V, chLatin_a, chLatin_l, chLatin_u, chLatin_e, chNull
-};
-
-const XMLCh StatusCode::INVALID_NAMEID_POLICY[] = //  urn:oasis:names:tc:SAML:2.0:status:InvalidNameIDPolicy 
-{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
-  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
-  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
-  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
-  chLatin_I, chLatin_n, chLatin_v, chLatin_a, chLatin_l, chLatin_i, chLatin_d, 
-   chLatin_N, chLatin_a, chLatin_m, chLatin_e, chLatin_I, chLatin_D, 
-   chLatin_P, chLatin_o, chLatin_l, chLatin_i, chLatin_c, chLatin_y, chNull
-};
-
-const XMLCh StatusCode::NO_AUTHN_CONTEXT[] = //  urn:oasis:names:tc:SAML:2.0:status:NoAuthnContext 
-{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
-  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
-  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
-  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
-  chLatin_N, chLatin_o, chLatin_A, chLatin_u, chLatin_t, chLatin_h, chLatin_n, 
-  chLatin_C, chLatin_o, chLatin_n, chLatin_t, chLatin_e, chLatin_x, chLatin_t, chNull
-};
-
-const XMLCh StatusCode::NO_AVAILABLE_IDP[] = //  urn:oasis:names:tc:SAML:2.0:status:NoAvailableIDP 
-{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
-  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
-  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
-  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
-  chLatin_N, chLatin_o, chLatin_A, chLatin_v, chLatin_a, chLatin_i, chLatin_l, chLatin_a, chLatin_b, chLatin_l, chLatin_e, 
-   chLatin_I, chLatin_D, chLatin_P, chNull
-};
-
-const XMLCh StatusCode::NO_PASSIVE[] = //  urn:oasis:names:tc:SAML:2.0:status:NoPassive 
-{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
-  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
-  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
-  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
-  chLatin_N, chLatin_o, chLatin_P, chLatin_a, chLatin_s, chLatin_s, chLatin_i, chLatin_v, chLatin_e, chNull
-};
-
-const XMLCh StatusCode::NO_SUPPORTED_IDP[] = //  urn:oasis:names:tc:SAML:2.0:status:NoSupportedIDP 
-{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
-  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
-  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
-  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
-  chLatin_N, chLatin_o, chLatin_S, chLatin_u, chLatin_p, chLatin_p, chLatin_o, chLatin_r, chLatin_t, chLatin_e, chLatin_d,
-      chLatin_I, chLatin_D, chLatin_P, chNull
-};
-
-const XMLCh StatusCode::PARTIAL_LOGOUT[] = //  urn:oasis:names:tc:SAML:2.0:status:PartialLogout 
-{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
-  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
-  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
-  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
-  chLatin_P, chLatin_a, chLatin_r, chLatin_t, chLatin_i, chLatin_a, chLatin_l, 
-    chLatin_L, chLatin_o, chLatin_g, chLatin_o, chLatin_u, chLatin_t, chNull
-};
-
-const XMLCh StatusCode::PROXY_COUNT_EXCEEDED[] = //  urn:oasis:names:tc:SAML:2.0:status:ProxyCountExceeded 
-{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
-  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
-  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
-  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
-  chLatin_P, chLatin_r, chLatin_o, chLatin_x, chLatin_y, chLatin_C, chLatin_o, chLatin_u, chLatin_n, chLatin_t, 
-    chLatin_E, chLatin_x, chLatin_c, chLatin_e, chLatin_e, chLatin_d, chLatin_e, chLatin_d, chNull
-};
-
-const XMLCh StatusCode::REQUEST_DENIED[] = //  urn:oasis:names:tc:SAML:2.0:status:RequestDenied 
-{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
-  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
-  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
-  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
-  chLatin_R, chLatin_e, chLatin_q, chLatin_u, chLatin_e, chLatin_s, chLatin_t, 
-    chLatin_D, chLatin_e, chLatin_n, chLatin_i, chLatin_e, chLatin_d, chNull
-};
-
-const XMLCh StatusCode::REQUEST_UNSUPPORTED[] = //  urn:oasis:names:tc:SAML:2.0:status:RequestUnsupported 
-{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
-  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
-  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
-  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
-  chLatin_R, chLatin_e, chLatin_q, chLatin_u, chLatin_e, chLatin_s, chLatin_t, 
-    chLatin_U, chLatin_n, chLatin_s, chLatin_u, chLatin_p, chLatin_p, chLatin_o, chLatin_r, chLatin_t, chLatin_e, chLatin_d, chNull
-};
-
-const XMLCh StatusCode::REQUEST_VERSION_DEPRECATED[] = //  urn:oasis:names:tc:SAML:2.0:status:RequestVersionDeprecated 
-{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
-  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
-  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
-  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
-  chLatin_R, chLatin_e, chLatin_q, chLatin_u, chLatin_e, chLatin_s, chLatin_t, 
-    chLatin_V, chLatin_e, chLatin_r, chLatin_s, chLatin_i, chLatin_o, chLatin_n, 
-    chLatin_D, chLatin_e, chLatin_p, chLatin_r, chLatin_e, chLatin_c, chLatin_a, chLatin_t, chLatin_e, chLatin_d, chNull
-};
-
-const XMLCh StatusCode::REQUEST_VERSION_TOO_HIGH[] = //  urn:oasis:names:tc:SAML:2.0:status:RequestVersionTooHigh 
-{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
-  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
-  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
-  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
-  chLatin_R, chLatin_e, chLatin_q, chLatin_u, chLatin_e, chLatin_s, chLatin_t, 
-  chLatin_V, chLatin_e, chLatin_r, chLatin_s, chLatin_i, chLatin_o, chLatin_n, 
-  chLatin_T, chLatin_o, chLatin_o, chLatin_H, chLatin_i, chLatin_g, chLatin_h, chNull
-};
-
-const XMLCh StatusCode::REQUEST_VERSION_TOO_LOW[] = //  urn:oasis:names:tc:SAML:2.0:status:RequestVersionTooLow 
-{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
-  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
-  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
-  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
-  chLatin_R, chLatin_e, chLatin_q, chLatin_u, chLatin_e, chLatin_s, chLatin_t, 
-    chLatin_V, chLatin_e, chLatin_r, chLatin_s, chLatin_i, chLatin_o, chLatin_n, 
-    chLatin_T, chLatin_o, chLatin_o, chLatin_L, chLatin_o, chLatin_w, chNull
-};
-
-const XMLCh StatusCode::RESOURCE_NOT_RECOGNIZED[] = //  urn:oasis:names:tc:SAML:2.0:status:ResourceNotRecognized 
-{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
-  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
-  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
-  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
-  chLatin_R, chLatin_e, chLatin_s, chLatin_o, chLatin_u, chLatin_r, chLatin_c, chLatin_e, 
-    chLatin_N, chLatin_o, chLatin_t, 
-    chLatin_R, chLatin_e, chLatin_c, chLatin_o, chLatin_g, chLatin_n, chLatin_i, chLatin_z, chLatin_e, chLatin_d, chNull
-};
-
-const XMLCh StatusCode::TOO_MANY_RESPONSES[] = //  urn:oasis:names:tc:SAML:2.0:status:TooManyResponses 
-{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
-  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
-  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
-  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
-  chLatin_T, chLatin_o, chLatin_o, chLatin_M, chLatin_a, chLatin_n, chLatin_y, 
-    chLatin_R, chLatin_e, chLatin_s, chLatin_p, chLatin_o, chLatin_n, chLatin_s, chLatin_e, chLatin_s, chNull
-};
-
-const XMLCh StatusCode::UNKNOWN_ATTR_PROFILE[] = //  urn:oasis:names:tc:SAML:2.0:status:UnknownAttrProfile 
-{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
-  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
-  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
-  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
-  chLatin_U, chLatin_n, chLatin_k, chLatin_n, chLatin_o, chLatin_w, chLatin_n, 
-    chLatin_A, chLatin_t, chLatin_t, chLatin_r, 
-    chLatin_P, chLatin_r, chLatin_o, chLatin_f, chLatin_i, chLatin_l, chLatin_e, chNull
-};
-
-const XMLCh StatusCode::UNKNOWN_PRINCIPAL[] = //  urn:oasis:names:tc:SAML:2.0:status:UnknownPrincipal 
-{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
-  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
-  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
-  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
-  chLatin_U, chLatin_n, chLatin_k, chLatin_n, chLatin_o, chLatin_w, chLatin_n, 
-    chLatin_P, chLatin_r, chLatin_i, chLatin_n, chLatin_c, chLatin_i, chLatin_p, chLatin_a, chLatin_l, chNull
-};
-
-const XMLCh StatusCode::UNSUPPORTED_BINDING[] = //  urn:oasis:names:tc:SAML:2.0:status:UnsupportedBinding 
-{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
-  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
-  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
-  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
-  chLatin_U, chLatin_n, chLatin_s, chLatin_u, chLatin_p, chLatin_p, chLatin_o, chLatin_r, chLatin_t, chLatin_e, chLatin_d, 
-    chLatin_B, chLatin_i, chLatin_n, chLatin_d, chLatin_i, chLatin_n, chLatin_g, chNull
-};
-
+/*\r
+ *  Copyright 2001-2006 Internet2\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+/**\r
+ * Protocols20Impl.cpp\r
+ * \r
+ * Implementation classes for SAML 2.0 Protocols schema\r
+ */\r
+\r
+#include "internal.h"\r
+#include "exceptions.h"\r
+#include "saml/encryption/EncryptedKeyResolver.h"\r
+#include "saml2/core/Protocols.h"\r
+\r
+#include <xmltooling/AbstractChildlessElement.h>\r
+#include <xmltooling/AbstractComplexElement.h>\r
+#include <xmltooling/AbstractElementProxy.h>\r
+#include <xmltooling/AbstractSimpleElement.h>\r
+#include <xmltooling/encryption/Decrypter.h>\r
+#include <xmltooling/impl/AnyElement.h>\r
+#include <xmltooling/io/AbstractXMLObjectMarshaller.h>\r
+#include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>\r
+#include <xmltooling/util/XMLHelper.h>\r
+\r
+#include <ctime>\r
+#include <xercesc/util/XMLUniDefs.hpp>\r
+\r
+using namespace opensaml::saml2p;\r
+using namespace opensaml::saml2;\r
+using namespace opensaml;\r
+using namespace xmlsignature;\r
+using namespace xmlencryption;\r
+using namespace xmltooling;\r
+using namespace std;\r
+\r
+#if defined (_MSC_VER)\r
+    #pragma warning( push )\r
+    #pragma warning( disable : 4250 4251 )\r
+#endif\r
+\r
+namespace opensaml {\r
+    namespace saml2p {\r
+\r
+        DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Artifact);\r
+        DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,GetComplete);\r
+        DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,NewID);\r
+        DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,RequesterID);\r
+        DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,SessionIndex);\r
+        DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,StatusMessage);\r
+\r
+        DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,RespondTo);\r
+\r
+        //TODO need unit test for this, using objects from another namespace\r
+        class SAML_DLLLOCAL ExtensionsImpl : public virtual Extensions,\r
+             public AbstractElementProxy,\r
+             public AbstractDOMCachingXMLObject,\r
+             public AbstractXMLObjectMarshaller,\r
+             public AbstractXMLObjectUnmarshaller\r
+        {\r
+        public:\r
+            virtual ~ExtensionsImpl() {}\r
+    \r
+            ExtensionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)\r
+                : AbstractXMLObject(nsURI, localName, prefix, schemaType) {\r
+            }\r
+                \r
+            ExtensionsImpl(const ExtensionsImpl& src)\r
+                    : AbstractXMLObject(src), AbstractElementProxy(src), AbstractDOMCachingXMLObject(src) {\r
+                for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {\r
+                    if (*i) {\r
+                        getXMLObjects().push_back((*i)->clone());\r
+                    }\r
+                }\r
+            }\r
+            \r
+            IMPL_XMLOBJECT_CLONE(Extensions);\r
+    \r
+        protected:\r
+            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {\r
+                // Unknown child.\r
+                const XMLCh* nsURI=root->getNamespaceURI();\r
+                if (!XMLString::equals(nsURI,SAMLConstants::SAML20P_NS) && nsURI && *nsURI) {\r
+                    getXMLObjects().push_back(childXMLObject);\r
+                    return;\r
+                }\r
+                \r
+                AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);\r
+            }\r
+        };\r
+\r
+        class SAML_DLLLOCAL StatusCodeImpl : public virtual StatusCode,\r
+             public AbstractComplexElement,\r
+             public AbstractDOMCachingXMLObject,\r
+             public AbstractXMLObjectMarshaller,\r
+             public AbstractXMLObjectUnmarshaller\r
+        {\r
+            void init() {\r
+                m_Value=NULL;\r
+                m_StatusCode=NULL;\r
+                m_children.push_back(NULL);\r
+                m_pos_StatusCode=m_children.begin();\r
+            }\r
+            public:\r
+                virtual ~StatusCodeImpl() {}\r
+\r
+                StatusCodeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)\r
+                    : AbstractXMLObject(nsURI, localName, prefix, schemaType)\r
+                {\r
+                        init();\r
+                }\r
+\r
+                StatusCodeImpl(const StatusCodeImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {\r
+                    init();\r
+                    setValue(src.getValue());\r
+                    if (src.getStatusCode())\r
+                        setStatusCode(src.getStatusCode()->cloneStatusCode());\r
+                }\r
+\r
+                IMPL_XMLOBJECT_CLONE(StatusCode);\r
+                IMPL_STRING_ATTRIB(Value);\r
+                IMPL_TYPED_CHILD(StatusCode);\r
+\r
+            protected:\r
+                void marshallAttributes(DOMElement* domElement) const {\r
+                    MARSHALL_STRING_ATTRIB(Value,VALUE,NULL);\r
+                }\r
+\r
+                void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {\r
+                    PROC_TYPED_CHILD(StatusCode,SAMLConstants::SAML20P_NS,false);\r
+                    AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);\r
+                }\r
+\r
+                void processAttribute(const DOMAttr* attribute) {\r
+                    PROC_STRING_ATTRIB(Value,VALUE,NULL);\r
+                    AbstractXMLObjectUnmarshaller::processAttribute(attribute);\r
+                }\r
+        };\r
+\r
+        //TODO need unit tests for non-SAML namespace children\r
+        class SAML_DLLLOCAL StatusDetailImpl : public virtual StatusDetail,\r
+            public AbstractComplexElement,\r
+            public AbstractDOMCachingXMLObject,\r
+            public AbstractXMLObjectMarshaller,\r
+            public AbstractXMLObjectUnmarshaller\r
+        {\r
+            public:\r
+                virtual ~StatusDetailImpl() {}\r
+\r
+                StatusDetailImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)\r
+                    : AbstractXMLObject(nsURI, localName, prefix, schemaType) { }\r
+\r
+                StatusDetailImpl(const StatusDetailImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {\r
+                        VectorOf(XMLObject) v=getDetails();\r
+                        for (vector<XMLObject*>::const_iterator i=src.m_Details.begin(); i!=src.m_Details.end(); i++) {\r
+                            if (*i) {\r
+                                v.push_back((*i)->clone());\r
+                            }\r
+                        }\r
+                    }\r
+\r
+                IMPL_XMLOBJECT_CLONE(StatusDetail);\r
+                IMPL_XMLOBJECT_CHILDREN(Detail,m_children.end());\r
+\r
+            protected:\r
+                void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {\r
+                    getDetails().push_back(childXMLObject);\r
+                    AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);\r
+                }\r
+        };\r
+\r
+\r
+        class SAML_DLLLOCAL StatusImpl : public virtual Status,\r
+             public AbstractComplexElement,\r
+             public AbstractDOMCachingXMLObject,\r
+             public AbstractXMLObjectMarshaller,\r
+             public AbstractXMLObjectUnmarshaller\r
+        {\r
+            void init() {\r
+                m_StatusCode=NULL;\r
+                m_StatusMessage=NULL;\r
+                m_StatusDetail=NULL;\r
+                m_children.push_back(NULL);\r
+                m_children.push_back(NULL);\r
+                m_children.push_back(NULL);\r
+                m_pos_StatusCode=m_children.begin();\r
+                m_pos_StatusMessage=m_pos_StatusCode;\r
+                ++m_pos_StatusMessage;\r
+                m_pos_StatusDetail=m_pos_StatusMessage;\r
+                ++m_pos_StatusDetail;\r
+            }\r
+        public:\r
+            virtual ~StatusImpl() { }\r
+    \r
+            StatusImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)\r
+                : AbstractXMLObject(nsURI, localName, prefix, schemaType)\r
+            {\r
+                    init();\r
+            }\r
+                \r
+            StatusImpl(const StatusImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {\r
+                init();\r
+                if (src.getStatusCode())\r
+                    setStatusCode(src.getStatusCode()->cloneStatusCode());\r
+                if (src.getStatusMessage())\r
+                    setStatusMessage(src.getStatusMessage()->cloneStatusMessage());\r
+                if (src.getStatusDetail())\r
+                    setStatusDetail(src.getStatusDetail()->cloneStatusDetail());\r
+            }\r
+            \r
+            IMPL_XMLOBJECT_CLONE(Status);\r
+            IMPL_TYPED_CHILD(StatusCode);\r
+            IMPL_TYPED_CHILD(StatusMessage);\r
+            IMPL_TYPED_CHILD(StatusDetail);\r
+    \r
+        protected:\r
+    \r
+            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {\r
+                PROC_TYPED_CHILD(StatusCode,SAMLConstants::SAML20P_NS,false);\r
+                PROC_TYPED_CHILD(StatusMessage,SAMLConstants::SAML20P_NS,false);\r
+                PROC_TYPED_CHILD(StatusDetail,SAMLConstants::SAML20P_NS,false);\r
+                AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);\r
+            }\r
+    \r
+        };\r
+\r
+\r
+        class SAML_DLLLOCAL RequestAbstractTypeImpl : public virtual RequestAbstractType,\r
+            public AbstractComplexElement,\r
+            public AbstractDOMCachingXMLObject,\r
+            public AbstractXMLObjectMarshaller,\r
+            public AbstractXMLObjectUnmarshaller\r
+        {\r
+            void init() {\r
+                m_ID=NULL;\r
+                m_Version=NULL;\r
+                m_IssueInstant=NULL;\r
+                m_Destination=NULL;\r
+                m_Consent=NULL;\r
+                m_Issuer=NULL;\r
+                m_Signature=NULL;\r
+                m_Extensions=NULL;\r
+                m_children.push_back(NULL);\r
+                m_children.push_back(NULL);\r
+                m_children.push_back(NULL);\r
+                m_pos_Issuer=m_children.begin();\r
+                m_pos_Signature=m_pos_Issuer;\r
+                ++m_pos_Signature;\r
+                m_pos_Extensions=m_pos_Signature;\r
+                ++m_pos_Extensions;\r
+            }\r
+        protected:\r
+            RequestAbstractTypeImpl() {\r
+                init();\r
+            }\r
+        public:\r
+            virtual ~RequestAbstractTypeImpl() {\r
+                XMLString::release(&m_ID);\r
+                XMLString::release(&m_Version);\r
+                XMLString::release(&m_Destination);\r
+                XMLString::release(&m_Consent);\r
+                delete m_IssueInstant;\r
+            }\r
+    \r
+            RequestAbstractTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)\r
+                : AbstractXMLObject(nsURI, localName, prefix, schemaType) {\r
+                init();\r
+            }\r
+                \r
+            RequestAbstractTypeImpl(const RequestAbstractTypeImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {\r
+                init();\r
+                setID(src.getID());\r
+                setVersion(src.getVersion());\r
+                setIssueInstant(src.getIssueInstant());\r
+                setDestination(src.getDestination());\r
+                setConsent(src.getConsent());\r
+                if (src.getIssuer())\r
+                    setIssuer(src.getIssuer()->cloneIssuer());\r
+                if (src.getSignature())\r
+                    setSignature(src.getSignature()->cloneSignature());\r
+                if (src.getExtensions())\r
+                    setExtensions(src.getExtensions()->cloneExtensions());\r
+            }\r
+            \r
+            //IMPL_TYPED_CHILD(Signature);\r
+            // Need customized setter.\r
+        protected:\r
+            Signature* m_Signature;\r
+            list<XMLObject*>::iterator m_pos_Signature;\r
+        public:\r
+            Signature* getSignature() const {\r
+                return m_Signature;\r
+            }\r
+            \r
+            void setSignature(Signature* sig) {\r
+                prepareForAssignment(m_Signature,sig);\r
+                *m_pos_Signature=m_Signature=sig;\r
+                // Sync content reference back up.\r
+                if (m_Signature)\r
+                    m_Signature->setContentReference(new opensaml::ContentReference(*this));\r
+            }\r
+            \r
+            IMPL_STRING_ATTRIB(Version);\r
+            IMPL_ID_ATTRIB(ID);\r
+            IMPL_DATETIME_ATTRIB(IssueInstant,0);\r
+            IMPL_STRING_ATTRIB(Destination);\r
+            IMPL_STRING_ATTRIB(Consent);\r
+            IMPL_TYPED_FOREIGN_CHILD(Issuer,saml2);\r
+            IMPL_TYPED_CHILD(Extensions);\r
+    \r
+        protected:\r
+            void marshallAttributes(DOMElement* domElement) const {\r
+                if (!m_Version)\r
+                    const_cast<RequestAbstractTypeImpl*>(this)->m_Version=XMLString::transcode("2.0");\r
+                MARSHALL_STRING_ATTRIB(Version,VER,NULL);\r
+                if (!m_ID)\r
+                    const_cast<RequestAbstractTypeImpl*>(this)->m_ID=SAMLConfig::getConfig().generateIdentifier();\r
+                MARSHALL_ID_ATTRIB(ID,ID,NULL);\r
+                if (!m_IssueInstant) {\r
+                    const_cast<RequestAbstractTypeImpl*>(this)->m_IssueInstantEpoch=time(NULL);\r
+                    const_cast<RequestAbstractTypeImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);\r
+                }\r
+                MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);\r
+                MARSHALL_STRING_ATTRIB(Destination,DESTINATION,NULL);\r
+                MARSHALL_STRING_ATTRIB(Consent,CONSENT,NULL);\r
+            }\r
+    \r
+            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {\r
+                PROC_TYPED_FOREIGN_CHILD(Issuer,saml2,SAMLConstants::SAML20_NS,false);\r
+                PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLConstants::XMLSIG_NS,false);\r
+                PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20P_NS,false);\r
+                AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);\r
+            }\r
+    \r
+            void processAttribute(const DOMAttr* attribute) {\r
+                PROC_ID_ATTRIB(ID,ID,NULL);\r
+                PROC_STRING_ATTRIB(Version,VER,NULL);\r
+                PROC_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);\r
+                PROC_STRING_ATTRIB(Destination,DESTINATION,NULL);\r
+                PROC_STRING_ATTRIB(Consent,CONSENT,NULL);\r
+                AbstractXMLObjectUnmarshaller::processAttribute(attribute);\r
+            }\r
+        };\r
+\r
+\r
+        class SAML_DLLLOCAL AssertionIDRequestImpl : public virtual AssertionIDRequest, public RequestAbstractTypeImpl\r
+        {\r
+        public:\r
+            virtual ~AssertionIDRequestImpl() { }\r
+    \r
+            AssertionIDRequestImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)\r
+                : AbstractXMLObject(nsURI, localName, prefix, schemaType) { }\r
+                \r
+            AssertionIDRequestImpl(const AssertionIDRequestImpl& src) : AbstractXMLObject(src), RequestAbstractTypeImpl(src) {\r
+                VectorOf(AssertionIDRef) v=getAssertionIDRefs();\r
+                for (vector<AssertionIDRef*>::const_iterator i=src.m_AssertionIDRefs.begin(); i!=src.m_AssertionIDRefs.end(); i++) {\r
+                    if (*i) {                               \r
+                        v.push_back((*i)->cloneAssertionIDRef());\r
+                    }\r
+                }\r
+\r
+            }\r
+            \r
+            IMPL_XMLOBJECT_CLONE(AssertionIDRequest);\r
+            RequestAbstractType* cloneRequestAbstractType() const {\r
+                return cloneAssertionIDRequest();\r
+            }\r
+\r
+            IMPL_TYPED_FOREIGN_CHILDREN(AssertionIDRef,saml2,m_children.end());\r
+    \r
+        protected:\r
+            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {\r
+                PROC_TYPED_FOREIGN_CHILDREN(AssertionIDRef,saml2,SAMLConstants::SAML20_NS,false);\r
+                RequestAbstractTypeImpl::processChildElement(childXMLObject,root);\r
+            }\r
+        };\r
+\r
+        class SAML_DLLLOCAL SubjectQueryImpl : public virtual SubjectQuery, public RequestAbstractTypeImpl\r
+        {\r
+            void init()\r
+            {\r
+                m_Subject = NULL;\r
+                m_children.push_back(NULL);\r
+                m_pos_Subject = m_pos_Extensions;\r
+                ++m_pos_Subject;\r
+            }\r
+        protected:\r
+            SubjectQueryImpl() {\r
+                init();\r
+            }\r
+        public:\r
+            virtual ~SubjectQueryImpl() { }\r
+    \r
+            SubjectQueryImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)\r
+                : AbstractXMLObject(nsURI, localName, prefix, schemaType)\r
+            { \r
+                init();\r
+            }\r
+                \r
+            SubjectQueryImpl(const SubjectQueryImpl& src) : AbstractXMLObject(src), RequestAbstractTypeImpl(src) {\r
+                init();\r
+                if (src.getSubject())\r
+                    setSubject(src.getSubject()->cloneSubject());\r
+            }\r
+            \r
+            IMPL_TYPED_FOREIGN_CHILD(Subject,saml2);\r
+    \r
+        protected:\r
+            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {\r
+                PROC_TYPED_FOREIGN_CHILD(Subject,saml2,SAMLConstants::SAML20_NS,false);\r
+                RequestAbstractTypeImpl::processChildElement(childXMLObject,root);\r
+            }\r
+        };\r
+\r
+\r
+        class SAML_DLLLOCAL RequestedAuthnContextImpl : public virtual RequestedAuthnContext,\r
+            public AbstractComplexElement,\r
+            public AbstractDOMCachingXMLObject,\r
+            public AbstractXMLObjectMarshaller,\r
+            public AbstractXMLObjectUnmarshaller\r
+        {\r
+            void init() {\r
+                m_Comparison=NULL;\r
+            }\r
+        public:\r
+            virtual ~RequestedAuthnContextImpl() {\r
+                XMLString::release(&m_Comparison);\r
+            }\r
+    \r
+            RequestedAuthnContextImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)\r
+                : AbstractXMLObject(nsURI, localName, prefix, schemaType)\r
+            {\r
+                init();\r
+            }\r
+                \r
+            RequestedAuthnContextImpl(const RequestedAuthnContextImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {\r
+                init();\r
+                setComparison(src.getComparison());\r
+                for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {\r
+                    if (*i) {\r
+                        AuthnContextClassRef* classref=dynamic_cast<AuthnContextClassRef*>(*i);\r
+                        if (classref) {\r
+                            getAuthnContextClassRefs().push_back(classref->cloneAuthnContextClassRef());\r
+                            continue;\r
+                        }\r
+\r
+                        AuthnContextDeclRef* declref=dynamic_cast<AuthnContextDeclRef*>(*i);\r
+                        if (declref) {\r
+                            getAuthnContextDeclRefs().push_back(declref->cloneAuthnContextDeclRef());\r
+                            continue;\r
+                        }\r
+                    }\r
+                }\r
+            }\r
+            \r
+            IMPL_XMLOBJECT_CLONE(RequestedAuthnContext);\r
+            IMPL_STRING_ATTRIB(Comparison);\r
+            IMPL_TYPED_FOREIGN_CHILDREN(AuthnContextClassRef,saml2,m_children.end());\r
+            IMPL_TYPED_FOREIGN_CHILDREN(AuthnContextDeclRef,saml2,m_children.end());\r
+    \r
+        protected:\r
+            void marshallAttributes(DOMElement* domElement) const {\r
+                MARSHALL_STRING_ATTRIB(Comparison,COMPARISON,NULL);\r
+            }\r
+    \r
+            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {\r
+                PROC_TYPED_FOREIGN_CHILDREN(AuthnContextClassRef,saml2,SAMLConstants::SAML20_NS,false);\r
+                PROC_TYPED_FOREIGN_CHILDREN(AuthnContextDeclRef,saml2,SAMLConstants::SAML20_NS,false);\r
+                AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);\r
+            }\r
+    \r
+            void processAttribute(const DOMAttr* attribute) {\r
+                PROC_STRING_ATTRIB(Comparison,COMPARISON,NULL);\r
+                AbstractXMLObjectUnmarshaller::processAttribute(attribute);\r
+            }\r
+        };\r
+\r
+\r
+        class SAML_DLLLOCAL AuthnQueryImpl : public virtual AuthnQuery, public SubjectQueryImpl\r
+        {\r
+            void init() {\r
+                m_SessionIndex=NULL;\r
+                m_RequestedAuthnContext=NULL;\r
+                m_children.push_back(NULL);\r
+                m_pos_RequestedAuthnContext = m_pos_Subject;\r
+                ++m_pos_RequestedAuthnContext;\r
+                \r
+            }\r
+        public:\r
+            virtual ~AuthnQueryImpl() {\r
+                XMLString::release(&m_SessionIndex);\r
+            }\r
+    \r
+            AuthnQueryImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)\r
+                : AbstractXMLObject(nsURI, localName, prefix, schemaType)\r
+            {\r
+                init();\r
+            }\r
+                \r
+            AuthnQueryImpl(const AuthnQueryImpl& src) : AbstractXMLObject(src), SubjectQueryImpl(src) {\r
+                init();\r
+                setSessionIndex(src.getSessionIndex());\r
+                if (src.getRequestedAuthnContext())\r
+                    setRequestedAuthnContext(src.getRequestedAuthnContext()->cloneRequestedAuthnContext());\r
+            }\r
+            \r
+            IMPL_XMLOBJECT_CLONE(AuthnQuery);\r
+            SubjectQuery* cloneSubjectQuery() const {\r
+                return cloneAuthnQuery();\r
+            }\r
+            RequestAbstractType* cloneRequestAbstractType() const {\r
+                return cloneAuthnQuery();\r
+            }\r
+\r
+            IMPL_STRING_ATTRIB(SessionIndex);\r
+            IMPL_TYPED_CHILD(RequestedAuthnContext);\r
+    \r
+        protected:\r
+            void marshallAttributes(DOMElement* domElement) const {\r
+                MARSHALL_STRING_ATTRIB(SessionIndex,SESSIONINDEX,NULL);\r
+                SubjectQueryImpl::marshallAttributes(domElement);\r
+            }\r
+    \r
+            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {\r
+                PROC_TYPED_CHILD(RequestedAuthnContext,SAMLConstants::SAML20P_NS,false);\r
+                SubjectQueryImpl::processChildElement(childXMLObject,root);\r
+            }\r
+            void processAttribute(const DOMAttr* attribute) {\r
+                PROC_STRING_ATTRIB(SessionIndex,SESSIONINDEX,NULL);\r
+                SubjectQueryImpl::processAttribute(attribute);\r
+            }\r
+        };\r
+\r
+        class SAML_DLLLOCAL AttributeQueryImpl : public virtual AttributeQuery, public SubjectQueryImpl\r
+        {\r
+        public:\r
+            virtual ~AttributeQueryImpl() { }\r
+    \r
+            AttributeQueryImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)\r
+                : AbstractXMLObject(nsURI, localName, prefix, schemaType) { }\r
+                \r
+            AttributeQueryImpl(const AttributeQueryImpl& src) : AbstractXMLObject(src), SubjectQueryImpl(src) {\r
+                for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {\r
+                    if (*i) {\r
+                        Attribute* attrib=dynamic_cast<Attribute*>(*i);\r
+                        if (attrib) {\r
+                            getAttributes().push_back(attrib->cloneAttribute());\r
+                            continue;\r
+                        }\r
+                    }\r
+                }\r
+\r
+            }\r
+            \r
+            IMPL_XMLOBJECT_CLONE(AttributeQuery);\r
+            SubjectQuery* cloneSubjectQuery() const {\r
+                return cloneAttributeQuery();\r
+            }\r
+            RequestAbstractType* cloneRequestAbstractType() const {\r
+                return cloneAttributeQuery();\r
+            }\r
+\r
+            IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());\r
+    \r
+        protected:\r
+            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {\r
+                PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAMLConstants::SAML20_NS,false);\r
+                SubjectQueryImpl::processChildElement(childXMLObject,root);\r
+            }\r
+        };\r
+\r
+        class SAML_DLLLOCAL AuthzDecisionQueryImpl : public virtual AuthzDecisionQuery, public SubjectQueryImpl\r
+        {\r
+            void init() {\r
+                m_Resource=NULL;\r
+                m_Evidence=NULL;\r
+                m_children.push_back(NULL);\r
+                m_pos_Evidence=m_pos_Subject;\r
+                ++m_pos_Evidence;\r
+                \r
+            }\r
+        public:\r
+            virtual ~AuthzDecisionQueryImpl() {\r
+                XMLString::release(&m_Resource);\r
+            }\r
+    \r
+            AuthzDecisionQueryImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)\r
+                : AbstractXMLObject(nsURI, localName, prefix, schemaType)\r
+            {\r
+                init();\r
+            }\r
+                \r
+            AuthzDecisionQueryImpl(const AuthzDecisionQueryImpl& src) : AbstractXMLObject(src), SubjectQueryImpl(src) {\r
+                init();\r
+                setResource(src.getResource());\r
+                if (src.getEvidence())\r
+                    setEvidence(src.getEvidence()->cloneEvidence());\r
+                for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {\r
+                    if (*i) {\r
+                        Action* action=dynamic_cast<Action*>(*i);\r
+                        if (action) {\r
+                            getActions().push_back(action->cloneAction());\r
+                            continue;\r
+                        }\r
+                    }\r
+                }\r
+            }\r
+            \r
+            IMPL_XMLOBJECT_CLONE(AuthzDecisionQuery);\r
+            SubjectQuery* cloneSubjectQuery() const {\r
+                return cloneAuthzDecisionQuery();\r
+            }\r
+            RequestAbstractType* cloneRequestAbstractType() const {\r
+                return cloneAuthzDecisionQuery();\r
+            }\r
+\r
+            IMPL_STRING_ATTRIB(Resource);\r
+            IMPL_TYPED_FOREIGN_CHILDREN(Action,saml2,m_pos_Evidence);\r
+            IMPL_TYPED_FOREIGN_CHILD(Evidence,saml2);\r
+    \r
+        protected:\r
+            void marshallAttributes(DOMElement* domElement) const {\r
+                MARSHALL_STRING_ATTRIB(Resource,RESOURCE,NULL);\r
+                SubjectQueryImpl::marshallAttributes(domElement);\r
+            }\r
+    \r
+            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {\r
+                PROC_TYPED_FOREIGN_CHILD(Evidence,saml2,SAMLConstants::SAML20_NS,false);\r
+                PROC_TYPED_FOREIGN_CHILDREN(Action,saml2,SAMLConstants::SAML20_NS,false);\r
+                SubjectQueryImpl::processChildElement(childXMLObject,root);\r
+            }\r
+            void processAttribute(const DOMAttr* attribute) {\r
+                PROC_STRING_ATTRIB(Resource,RESOURCE,NULL);\r
+                SubjectQueryImpl::processAttribute(attribute);\r
+            }\r
+        };\r
+\r
+        class SAML_DLLLOCAL NameIDPolicyImpl : public virtual NameIDPolicy,\r
+            public AbstractChildlessElement,\r
+            public AbstractDOMCachingXMLObject,\r
+            public AbstractXMLObjectMarshaller,\r
+            public AbstractXMLObjectUnmarshaller\r
+        {\r
+            void init() {\r
+                m_Format=NULL;\r
+                m_SPNameQualifier=NULL;\r
+                m_AllowCreate=XMLConstants::XML_BOOL_NULL;\r
+            }\r
+            public:\r
+                virtual ~NameIDPolicyImpl()\r
+                {\r
+                    XMLString::release(&m_Format);\r
+                    XMLString::release(&m_SPNameQualifier);\r
+                }\r
+\r
+                NameIDPolicyImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)\r
+                    : AbstractXMLObject(nsURI, localName, prefix, schemaType)\r
+                {\r
+                        init();\r
+                }\r
+\r
+                NameIDPolicyImpl(const NameIDPolicyImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {\r
+                    init();\r
+                    setFormat(src.getFormat());\r
+                    setSPNameQualifier(src.getSPNameQualifier());\r
+                    AllowCreate(m_AllowCreate);\r
+                }\r
+\r
+                IMPL_XMLOBJECT_CLONE(NameIDPolicy);\r
+                IMPL_STRING_ATTRIB(Format);\r
+                IMPL_STRING_ATTRIB(SPNameQualifier);\r
+                IMPL_BOOLEAN_ATTRIB(AllowCreate);\r
+\r
+            protected:\r
+                void marshallAttributes(DOMElement* domElement) const {\r
+                    MARSHALL_STRING_ATTRIB(Format,FORMAT,NULL);\r
+                    MARSHALL_STRING_ATTRIB(SPNameQualifier,SPNAMEQUALIFIER,NULL);\r
+                    MARSHALL_BOOLEAN_ATTRIB(AllowCreate,ALLOWCREATE,NULL);\r
+                }\r
+\r
+                void processAttribute(const DOMAttr* attribute) {\r
+                    PROC_STRING_ATTRIB(Format,FORMAT,NULL);\r
+                    PROC_STRING_ATTRIB(SPNameQualifier,SPNAMEQUALIFIER,NULL);\r
+                    PROC_BOOLEAN_ATTRIB(AllowCreate,ALLOWCREATE,NULL);\r
+                    AbstractXMLObjectUnmarshaller::processAttribute(attribute);\r
+                }\r
+        };\r
+\r
+        class SAML_DLLLOCAL IDPEntryImpl : public virtual IDPEntry,\r
+            public AbstractChildlessElement,\r
+            public AbstractDOMCachingXMLObject,\r
+            public AbstractXMLObjectMarshaller,\r
+            public AbstractXMLObjectUnmarshaller\r
+        {\r
+            void init() {\r
+                m_ProviderID=NULL;\r
+                m_Name=NULL;\r
+                m_Loc=NULL;\r
+            }\r
+            public:\r
+                virtual ~IDPEntryImpl()\r
+                {\r
+                    XMLString::release(&m_ProviderID);\r
+                    XMLString::release(&m_Name);\r
+                    XMLString::release(&m_Loc);\r
+                }\r
+\r
+                IDPEntryImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)\r
+                    : AbstractXMLObject(nsURI, localName, prefix, schemaType)\r
+                {\r
+                        init();\r
+                }\r
+\r
+                IDPEntryImpl(const IDPEntryImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {\r
+                    init();\r
+                    setProviderID(src.getProviderID());\r
+                    setName(src.getName());\r
+                    setLoc(src.getLoc());\r
+                }\r
+\r
+                IMPL_XMLOBJECT_CLONE(IDPEntry);\r
+                IMPL_STRING_ATTRIB(ProviderID);\r
+                IMPL_STRING_ATTRIB(Name);\r
+                IMPL_STRING_ATTRIB(Loc);\r
+\r
+            protected:\r
+                void marshallAttributes(DOMElement* domElement) const {\r
+                    MARSHALL_STRING_ATTRIB(ProviderID,PROVIDERID,NULL);\r
+                    MARSHALL_STRING_ATTRIB(Name,NAME,NULL);\r
+                    MARSHALL_STRING_ATTRIB(Loc,LOC,NULL);\r
+                }\r
+\r
+                void processAttribute(const DOMAttr* attribute) {\r
+                    PROC_STRING_ATTRIB(ProviderID,PROVIDERID,NULL);\r
+                    PROC_STRING_ATTRIB(Name,NAME,NULL);\r
+                    PROC_STRING_ATTRIB(Loc,LOC,NULL);\r
+                    AbstractXMLObjectUnmarshaller::processAttribute(attribute);\r
+                }\r
+        };\r
+\r
+        class SAML_DLLLOCAL IDPListImpl : public virtual IDPList,\r
+            public AbstractComplexElement,\r
+            public AbstractDOMCachingXMLObject,\r
+            public AbstractXMLObjectMarshaller,\r
+            public AbstractXMLObjectUnmarshaller\r
+        {\r
+            void init() {\r
+                m_GetComplete=NULL;\r
+                m_children.push_back(NULL);\r
+                m_pos_GetComplete=m_children.begin();\r
+                \r
+            }\r
+        public:\r
+            virtual ~IDPListImpl() { }\r
+    \r
+            IDPListImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)\r
+                : AbstractXMLObject(nsURI, localName, prefix, schemaType)\r
+            {\r
+                init();\r
+            }\r
+                \r
+            IDPListImpl(const IDPListImpl& src)\r
+                    : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {\r
+                init();\r
+                if (src.getGetComplete())\r
+                    setGetComplete(src.getGetComplete()->cloneGetComplete());\r
+                for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {\r
+                    if (*i) {\r
+                        IDPEntry* entry=dynamic_cast<IDPEntry*>(*i);\r
+                        if (entry) {\r
+                            getIDPEntrys().push_back(entry->cloneIDPEntry());\r
+                            continue;\r
+                        }\r
+                    }\r
+                }\r
+            }\r
+            \r
+            IMPL_XMLOBJECT_CLONE(IDPList);\r
+            IMPL_TYPED_CHILDREN(IDPEntry,m_pos_GetComplete);\r
+            IMPL_TYPED_CHILD(GetComplete);\r
+    \r
+        protected:\r
+            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {\r
+                PROC_TYPED_CHILDREN(IDPEntry,SAMLConstants::SAML20P_NS,false);\r
+                PROC_TYPED_CHILD(GetComplete,SAMLConstants::SAML20P_NS,false);\r
+                AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);\r
+            }\r
+        };\r
+\r
+\r
+        class SAML_DLLLOCAL ScopingImpl : public virtual Scoping,\r
+            public AbstractComplexElement,\r
+            public AbstractDOMCachingXMLObject,\r
+            public AbstractXMLObjectMarshaller,\r
+            public AbstractXMLObjectUnmarshaller\r
+        {\r
+            void init() {\r
+                m_ProxyCount=NULL;\r
+                m_IDPList=NULL;\r
+                m_children.push_back(NULL);\r
+                m_pos_IDPList=m_children.begin();\r
+                \r
+            }\r
+        public:\r
+            virtual ~ScopingImpl() {\r
+                XMLString::release(&m_ProxyCount); \r
+            }\r
+    \r
+            ScopingImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)\r
+                : AbstractXMLObject(nsURI, localName, prefix, schemaType)\r
+            {\r
+                init();\r
+            }\r
+                \r
+            ScopingImpl(const ScopingImpl& src)\r
+                    : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {\r
+                init();\r
+                setProxyCount(m_ProxyCount);\r
+                if (src.getIDPList())\r
+                    setIDPList(src.getIDPList()->cloneIDPList());\r
+                for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {\r
+                    if (*i) {\r
+                        RequesterID* reqid =dynamic_cast<RequesterID*>(*i);\r
+                        if (reqid) {\r
+                            getRequesterIDs().push_back(reqid->cloneRequesterID());\r
+                            continue;\r
+                        }\r
+                    }\r
+                }\r
+            }\r
+            \r
+            IMPL_XMLOBJECT_CLONE(Scoping);\r
+            IMPL_INTEGER_ATTRIB(ProxyCount);\r
+            IMPL_TYPED_CHILD(IDPList);\r
+            IMPL_TYPED_CHILDREN(RequesterID,m_children.end());\r
+    \r
+        protected:\r
+            void marshallAttributes(DOMElement* domElement) const {\r
+                    MARSHALL_INTEGER_ATTRIB(ProxyCount,PROXYCOUNT,NULL);\r
+            }\r
+    \r
+            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {\r
+                PROC_TYPED_CHILD(IDPList,SAMLConstants::SAML20P_NS,false);\r
+                PROC_TYPED_CHILDREN(RequesterID,SAMLConstants::SAML20P_NS,false);\r
+                AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);\r
+            }\r
+\r
+            void processAttribute(const DOMAttr* attribute) {\r
+                PROC_INTEGER_ATTRIB(ProxyCount,PROXYCOUNT,NULL);\r
+                AbstractXMLObjectUnmarshaller::processAttribute(attribute);\r
+            }\r
+        };\r
+\r
+        class SAML_DLLLOCAL AuthnRequestImpl : public virtual AuthnRequest, public RequestAbstractTypeImpl\r
+        {\r
+            void init() {\r
+                m_ForceAuthn=XMLConstants::XML_BOOL_NULL;\r
+                m_IsPassive=XMLConstants::XML_BOOL_NULL;\r
+                m_ProtocolBinding=NULL;\r
+                m_AssertionConsumerServiceIndex=NULL;\r
+                m_AssertionConsumerServiceURL=NULL;\r
+                m_AttributeConsumingServiceIndex=NULL;\r
+                m_ProviderName=NULL;\r
+\r
+                m_Subject=NULL;\r
+                m_NameIDPolicy=NULL;\r
+                m_Conditions=NULL;\r
+                m_RequestedAuthnContext=NULL;\r
+                m_Scoping=NULL;\r
+                m_children.push_back(NULL);\r
+                m_children.push_back(NULL);\r
+                m_children.push_back(NULL);\r
+                m_children.push_back(NULL);\r
+                m_children.push_back(NULL);\r
+                m_pos_Subject=m_pos_Extensions;\r
+                ++m_pos_Subject;\r
+                m_pos_NameIDPolicy=m_pos_Subject;\r
+                ++m_pos_NameIDPolicy;\r
+                m_pos_Conditions=m_pos_NameIDPolicy;\r
+                ++m_pos_Conditions;\r
+                m_pos_RequestedAuthnContext=m_pos_Conditions;\r
+                ++m_pos_RequestedAuthnContext;\r
+                m_pos_Scoping=m_pos_RequestedAuthnContext;\r
+                ++m_pos_Scoping;\r
+                \r
+            }\r
+        public:\r
+            virtual ~AuthnRequestImpl() {\r
+                XMLString::release(&m_ProtocolBinding);\r
+                XMLString::release(&m_AssertionConsumerServiceURL);\r
+                XMLString::release(&m_ProviderName);\r
+                XMLString::release(&m_AssertionConsumerServiceIndex);\r
+                XMLString::release(&m_AttributeConsumingServiceIndex);\r
+            }\r
+    \r
+            AuthnRequestImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)\r
+                : AbstractXMLObject(nsURI, localName, prefix, schemaType)\r
+            {\r
+                init();\r
+            }\r
+                \r
+            AuthnRequestImpl(const AuthnRequestImpl& src) : AbstractXMLObject(src), RequestAbstractTypeImpl(src) {\r
+                init();\r
+\r
+                ForceAuthn(m_ForceAuthn);\r
+                IsPassive(m_IsPassive);\r
+                setProtocolBinding(src.getProtocolBinding());\r
+                setAssertionConsumerServiceIndex(m_AssertionConsumerServiceIndex);\r
+                setAssertionConsumerServiceURL(src.getAssertionConsumerServiceURL());\r
+                setAttributeConsumingServiceIndex(m_AttributeConsumingServiceIndex);\r
+                setProviderName(src.getProviderName());\r
+\r
+                if (src.getSubject())\r
+                    setSubject(src.getSubject()->cloneSubject());\r
+                if (src.getNameIDPolicy())\r
+                    setNameIDPolicy(src.getNameIDPolicy()->cloneNameIDPolicy());\r
+                if (src.getConditions())\r
+                    setConditions(src.getConditions()->cloneConditions());\r
+                if (src.getRequestedAuthnContext())\r
+                    setRequestedAuthnContext(src.getRequestedAuthnContext()->cloneRequestedAuthnContext());\r
+                if (src.getScoping())\r
+                    setScoping(src.getScoping()->cloneScoping());\r
+            }\r
+            \r
+            IMPL_XMLOBJECT_CLONE(AuthnRequest);\r
+            RequestAbstractType* cloneRequestAbstractType() const {\r
+                return cloneAuthnRequest();\r
+            }\r
+\r
+            IMPL_BOOLEAN_ATTRIB(ForceAuthn);\r
+            IMPL_BOOLEAN_ATTRIB(IsPassive);\r
+            IMPL_STRING_ATTRIB(ProtocolBinding);\r
+            IMPL_INTEGER_ATTRIB(AssertionConsumerServiceIndex);\r
+            IMPL_STRING_ATTRIB(AssertionConsumerServiceURL);\r
+            IMPL_INTEGER_ATTRIB(AttributeConsumingServiceIndex);\r
+            IMPL_STRING_ATTRIB(ProviderName);\r
+\r
+            IMPL_TYPED_FOREIGN_CHILD(Subject,saml2);\r
+            IMPL_TYPED_CHILD(NameIDPolicy);\r
+            IMPL_TYPED_FOREIGN_CHILD(Conditions,saml2);\r
+            IMPL_TYPED_CHILD(RequestedAuthnContext);\r
+            IMPL_TYPED_CHILD(Scoping);\r
+    \r
+        protected:\r
+            void marshallAttributes(DOMElement* domElement) const {\r
+                MARSHALL_BOOLEAN_ATTRIB(ForceAuthn,FORCEAUTHN,NULL);\r
+                MARSHALL_BOOLEAN_ATTRIB(IsPassive,ISPASSIVE,NULL);\r
+                MARSHALL_STRING_ATTRIB(ProtocolBinding,PROTOCOLBINDING,NULL);\r
+                MARSHALL_INTEGER_ATTRIB(AssertionConsumerServiceIndex,ASSERTIONCONSUMERSERVICEINDEX,NULL);\r
+                MARSHALL_STRING_ATTRIB(AssertionConsumerServiceURL,ASSERTIONCONSUMERSERVICEURL,NULL);\r
+                MARSHALL_INTEGER_ATTRIB(AttributeConsumingServiceIndex,ATTRIBUTECONSUMINGSERVICEINDEX,NULL);\r
+                MARSHALL_STRING_ATTRIB(ProviderName,PROVIDERNAME,NULL);\r
+                RequestAbstractTypeImpl::marshallAttributes(domElement);\r
+            }\r
+    \r
+            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {\r
+                PROC_TYPED_FOREIGN_CHILD(Subject,saml2,SAMLConstants::SAML20_NS,false);\r
+                PROC_TYPED_CHILD(NameIDPolicy,SAMLConstants::SAML20P_NS,false);\r
+                PROC_TYPED_FOREIGN_CHILD(Conditions,saml2,SAMLConstants::SAML20_NS,false);\r
+                PROC_TYPED_CHILD(RequestedAuthnContext,SAMLConstants::SAML20P_NS,false);\r
+                PROC_TYPED_CHILD(Scoping,SAMLConstants::SAML20P_NS,false);\r
+                RequestAbstractTypeImpl::processChildElement(childXMLObject,root);\r
+            }\r
+            void processAttribute(const DOMAttr* attribute) {\r
+                PROC_BOOLEAN_ATTRIB(ForceAuthn,FORCEAUTHN,NULL);\r
+                PROC_BOOLEAN_ATTRIB(IsPassive,ISPASSIVE,NULL);\r
+                PROC_STRING_ATTRIB(ProtocolBinding,PROTOCOLBINDING,NULL);\r
+                PROC_INTEGER_ATTRIB(AssertionConsumerServiceIndex,ASSERTIONCONSUMERSERVICEINDEX,NULL);\r
+                PROC_STRING_ATTRIB(AssertionConsumerServiceURL,ASSERTIONCONSUMERSERVICEURL,NULL);\r
+                PROC_INTEGER_ATTRIB(AttributeConsumingServiceIndex,ATTRIBUTECONSUMINGSERVICEINDEX,NULL);\r
+                PROC_STRING_ATTRIB(ProviderName,PROVIDERNAME,NULL);\r
+                RequestAbstractTypeImpl::processAttribute(attribute);\r
+            }\r
+        };\r
+\r
+        class SAML_DLLLOCAL StatusResponseTypeImpl : public virtual StatusResponseType,\r
+            public AbstractComplexElement,\r
+            public AbstractDOMCachingXMLObject,\r
+            public AbstractXMLObjectMarshaller,\r
+            public AbstractXMLObjectUnmarshaller\r
+        {\r
+            void init() {\r
+                m_ID=NULL;\r
+                m_InResponseTo=NULL;\r
+                m_Version=NULL;\r
+                m_IssueInstant=NULL;\r
+                m_Destination=NULL;\r
+                m_Consent=NULL;\r
+                m_Issuer=NULL;\r
+                m_Signature=NULL;\r
+                m_Extensions=NULL;\r
+                m_Status=NULL;\r
+                m_children.push_back(NULL);\r
+                m_children.push_back(NULL);\r
+                m_children.push_back(NULL);\r
+                m_children.push_back(NULL);\r
+                m_pos_Issuer=m_children.begin();\r
+                m_pos_Signature=m_pos_Issuer;\r
+                ++m_pos_Signature;\r
+                m_pos_Extensions=m_pos_Signature;\r
+                ++m_pos_Extensions;\r
+                m_pos_Status=m_pos_Extensions;\r
+                ++m_pos_Status;\r
+            }\r
+        protected:\r
+            StatusResponseTypeImpl() {\r
+                init();\r
+            }\r
+        public:\r
+            virtual ~StatusResponseTypeImpl() {\r
+                XMLString::release(&m_ID);\r
+                XMLString::release(&m_InResponseTo);\r
+                XMLString::release(&m_Version);\r
+                XMLString::release(&m_Destination);\r
+                XMLString::release(&m_Consent);\r
+                delete m_IssueInstant;\r
+            }\r
+    \r
+            StatusResponseTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)\r
+                : AbstractXMLObject(nsURI, localName, prefix, schemaType)\r
+            {\r
+                init();\r
+            }\r
+                \r
+            StatusResponseTypeImpl(const StatusResponseTypeImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {\r
+                init();\r
+                setID(src.getID());\r
+                setInResponseTo(src.getInResponseTo());\r
+                setVersion(src.getVersion());\r
+                setIssueInstant(src.getIssueInstant());\r
+                setDestination(src.getDestination());\r
+                setConsent(src.getConsent());\r
+                if (src.getIssuer())\r
+                    setIssuer(src.getIssuer()->cloneIssuer());\r
+                if (src.getSignature())\r
+                    setSignature(src.getSignature()->cloneSignature());\r
+                if (src.getExtensions())\r
+                    setExtensions(src.getExtensions()->cloneExtensions());\r
+                if (src.getStatus())\r
+                    setStatus(src.getStatus()->cloneStatus());\r
+            }\r
+            \r
+            //IMPL_TYPED_CHILD(Signature);\r
+            // Need customized setter.\r
+        protected:\r
+            Signature* m_Signature;\r
+            list<XMLObject*>::iterator m_pos_Signature;\r
+        public:\r
+            Signature* getSignature() const {\r
+                return m_Signature;\r
+            }\r
+            \r
+            void setSignature(Signature* sig) {\r
+                prepareForAssignment(m_Signature,sig);\r
+                *m_pos_Signature=m_Signature=sig;\r
+                // Sync content reference back up.\r
+                if (m_Signature)\r
+                    m_Signature->setContentReference(new opensaml::ContentReference(*this));\r
+            }\r
+            \r
+            IMPL_STRING_ATTRIB(Version);\r
+            IMPL_ID_ATTRIB(ID);\r
+            IMPL_STRING_ATTRIB(InResponseTo);\r
+            IMPL_DATETIME_ATTRIB(IssueInstant,0);\r
+            IMPL_STRING_ATTRIB(Destination);\r
+            IMPL_STRING_ATTRIB(Consent);\r
+            IMPL_TYPED_FOREIGN_CHILD(Issuer,saml2);\r
+            IMPL_TYPED_CHILD(Extensions);\r
+            IMPL_TYPED_CHILD(Status);\r
+    \r
+        protected:\r
+            void marshallAttributes(DOMElement* domElement) const {\r
+                if (!m_Version)\r
+                    const_cast<StatusResponseTypeImpl*>(this)->m_Version=XMLString::transcode("2.0");\r
+                MARSHALL_STRING_ATTRIB(Version,VER,NULL);\r
+                if (!m_ID)\r
+                    const_cast<StatusResponseTypeImpl*>(this)->m_ID=SAMLConfig::getConfig().generateIdentifier();\r
+                MARSHALL_ID_ATTRIB(ID,ID,NULL);\r
+                if (!m_IssueInstant) {\r
+                    const_cast<StatusResponseTypeImpl*>(this)->m_IssueInstantEpoch=time(NULL);\r
+                    const_cast<StatusResponseTypeImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);\r
+                }\r
+                MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);\r
+                MARSHALL_STRING_ATTRIB(Destination,DESTINATION,NULL);\r
+                MARSHALL_STRING_ATTRIB(Consent,CONSENT,NULL);\r
+                MARSHALL_STRING_ATTRIB(InResponseTo,INRESPONSETO,NULL);\r
+            }\r
+    \r
+            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {\r
+                PROC_TYPED_FOREIGN_CHILD(Issuer,saml2,SAMLConstants::SAML20_NS,false);\r
+                PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLConstants::XMLSIG_NS,false);\r
+                PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20P_NS,false);\r
+                PROC_TYPED_CHILD(Status,SAMLConstants::SAML20P_NS,false);\r
+                AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);\r
+            }\r
+    \r
+            void processAttribute(const DOMAttr* attribute) {\r
+                PROC_ID_ATTRIB(ID,ID,NULL);\r
+                PROC_STRING_ATTRIB(Version,VER,NULL);\r
+                PROC_STRING_ATTRIB(InResponseTo,INRESPONSETO,NULL);\r
+                PROC_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);\r
+                PROC_STRING_ATTRIB(Destination,DESTINATION,NULL);\r
+                PROC_STRING_ATTRIB(Consent,CONSENT,NULL);\r
+                AbstractXMLObjectUnmarshaller::processAttribute(attribute);\r
+            }\r
+        };\r
+\r
+        class SAML_DLLLOCAL ResponseImpl : public virtual Response, public StatusResponseTypeImpl\r
+        {\r
+        public:\r
+            virtual ~ResponseImpl() { }\r
+    \r
+            ResponseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)\r
+                : AbstractXMLObject(nsURI, localName, prefix, schemaType) { }\r
+                \r
+            ResponseImpl(const ResponseImpl& src) : AbstractXMLObject(src), StatusResponseTypeImpl(src) {\r
+                for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {\r
+                    if (*i) {\r
+                        Assertion* assertion=dynamic_cast<Assertion*>(*i);\r
+                        if (assertion) {\r
+                            getAssertions().push_back(assertion->cloneAssertion());\r
+                            continue;\r
+                        }\r
+                        EncryptedAssertion* encAssertion=dynamic_cast<EncryptedAssertion*>(*i);\r
+                        if (encAssertion) {\r
+                            getEncryptedAssertions().push_back(encAssertion->cloneEncryptedAssertion());\r
+                            continue;\r
+                        }\r
+                    }\r
+                }\r
+\r
+            }\r
+            \r
+            IMPL_XMLOBJECT_CLONE(Response);\r
+            StatusResponseType* cloneStatusResponseType() const {\r
+                return cloneResponse();\r
+            }\r
+\r
+            IMPL_TYPED_FOREIGN_CHILDREN(Assertion,saml2,m_children.end());\r
+            IMPL_TYPED_FOREIGN_CHILDREN(EncryptedAssertion,saml2,m_children.end());\r
+    \r
+        protected:\r
+            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {\r
+                PROC_TYPED_FOREIGN_CHILDREN(Assertion,saml2,SAMLConstants::SAML20_NS,false);\r
+                PROC_TYPED_FOREIGN_CHILDREN(EncryptedAssertion,saml2,SAMLConstants::SAML20_NS,false);\r
+                StatusResponseTypeImpl::processChildElement(childXMLObject,root);\r
+            }\r
+        };\r
+\r
+        class SAML_DLLLOCAL ArtifactResolveImpl : public virtual ArtifactResolve, public RequestAbstractTypeImpl\r
+        {\r
+            void init() {\r
+                m_Artifact=NULL;\r
+                m_children.push_back(NULL);\r
+                m_pos_Artifact=m_pos_Extensions;\r
+                ++m_pos_Artifact;\r
+            }\r
+        public:\r
+            virtual ~ArtifactResolveImpl() { }\r
+    \r
+            ArtifactResolveImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)\r
+                : AbstractXMLObject(nsURI, localName, prefix, schemaType)\r
+            { \r
+                init();\r
+            }\r
+                \r
+            ArtifactResolveImpl(const ArtifactResolveImpl& src) : AbstractXMLObject(src), RequestAbstractTypeImpl(src) {\r
+                init();\r
+                if(src.getArtifact())\r
+                    setArtifact(src.getArtifact()->cloneArtifact());\r
+            }\r
+            \r
+            IMPL_XMLOBJECT_CLONE(ArtifactResolve);\r
+            RequestAbstractType* cloneRequestAbstractType() const {\r
+                return cloneArtifactResolve();\r
+            }\r
+\r
+            IMPL_TYPED_CHILD(Artifact);\r
+    \r
+        protected:\r
+            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {\r
+                PROC_TYPED_CHILD(Artifact,SAMLConstants::SAML20P_NS,false);\r
+                RequestAbstractTypeImpl::processChildElement(childXMLObject,root);\r
+            }\r
+        };\r
+\r
+        class SAML_DLLLOCAL ArtifactResponseImpl : public virtual ArtifactResponse, public StatusResponseTypeImpl\r
+        {\r
+            void init() {\r
+                m_Payload=NULL;\r
+                m_children.push_back(NULL);\r
+                m_pos_Payload=m_pos_Status;\r
+                ++m_pos_Payload;\r
+            }\r
+        public:\r
+            virtual ~ArtifactResponseImpl() { }\r
+    \r
+            ArtifactResponseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)\r
+                : AbstractXMLObject(nsURI, localName, prefix, schemaType)\r
+            {\r
+                init();\r
+            }\r
+                \r
+            ArtifactResponseImpl(const ArtifactResponseImpl& src) : AbstractXMLObject(src), StatusResponseTypeImpl(src) {\r
+                init();\r
+                if (src.getPayload())\r
+                    setPayload(getPayload()->clone());\r
+\r
+            }\r
+            \r
+            IMPL_XMLOBJECT_CLONE(ArtifactResponse);\r
+            StatusResponseType* cloneStatusResponseType() const {\r
+                return cloneArtifactResponse();\r
+            }\r
+\r
+            IMPL_XMLOBJECT_CHILD(Payload);\r
+    \r
+        protected:\r
+            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {\r
+                // These are valid elements for the parent StatusResponseType, so don't process these.\r
+                // If not one of these, then it must be the payload.\r
+                if (\r
+                    ! XMLHelper::isNodeNamed(root,SAMLConstants::SAML20_NS,saml2::Issuer::LOCAL_NAME) &&\r
+                    ! XMLHelper::isNodeNamed(root,XMLConstants::XMLSIG_NS,xmlsignature::Signature::LOCAL_NAME) &&\r
+                    ! XMLHelper::isNodeNamed(root,SAMLConstants::SAML20P_NS,saml2p::Extensions::LOCAL_NAME) &&\r
+                    ! XMLHelper::isNodeNamed(root,SAMLConstants::SAML20P_NS,saml2p::Status::LOCAL_NAME)\r
+                   )\r
+                {\r
+                    setPayload(childXMLObject);\r
+                    return;\r
+                }\r
+\r
+                StatusResponseTypeImpl::processChildElement(childXMLObject,root);\r
+            }\r
+        };\r
+\r
+        class SAML_DLLLOCAL NewEncryptedIDImpl : public virtual NewEncryptedID,\r
+            public AbstractComplexElement,\r
+            public AbstractDOMCachingXMLObject,\r
+            public AbstractXMLObjectMarshaller,\r
+            public AbstractXMLObjectUnmarshaller\r
+        {\r
+            void init() {\r
+                m_EncryptedData=NULL;\r
+                m_children.push_back(NULL);\r
+                m_pos_EncryptedData=m_children.begin();\r
+            }\r
+            \r
+        protected:\r
+            NewEncryptedIDImpl()\r
+            {\r
+                init();\r
+            }\r
+            \r
+        public:\r
+            virtual ~NewEncryptedIDImpl() {}\r
+    \r
+            NewEncryptedIDImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)\r
+                    : AbstractXMLObject(nsURI, localName, prefix, schemaType)\r
+            {\r
+                init();\r
+            }\r
+                \r
+            NewEncryptedIDImpl(const NewEncryptedIDImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {\r
+                init();\r
+                if (src.getEncryptedData())\r
+                    setEncryptedData(src.getEncryptedData()->cloneEncryptedData());\r
+                VectorOf(xmlencryption::EncryptedKey) v=getEncryptedKeys();\r
+                for (vector<xmlencryption::EncryptedKey*>::const_iterator i=src.m_EncryptedKeys.begin(); i!=src.m_EncryptedKeys.end(); i++) {\r
+                    if (*i) {\r
+                        v.push_back((*i)->cloneEncryptedKey());\r
+                    }\r
+                }\r
+            }\r
+    \r
+            XMLObject* decrypt(KeyResolver* KEKresolver, const XMLCh* recipient) const\r
+            {\r
+                if (!m_EncryptedData)\r
+                    throw DecryptionException("No encrypted data present.");\r
+                Decrypter decrypter(KEKresolver, new EncryptedKeyResolver(*this, recipient));\r
+                DOMDocumentFragment* frag = decrypter.decryptData(m_EncryptedData);\r
+                if (frag->hasChildNodes() && frag->getFirstChild()==frag->getLastChild()) {\r
+                    DOMNode* plaintext=frag->getFirstChild();\r
+                    if (plaintext->getNodeType()==DOMNode::ELEMENT_NODE) {\r
+                        auto_ptr<XMLObject> ret(XMLObjectBuilder::buildOneFromElement(static_cast<DOMElement*>(plaintext)));\r
+                        ret->releaseThisAndChildrenDOM();\r
+                        return ret.release();\r
+                    }\r
+                }\r
+                frag->release();\r
+                throw DecryptionException("Decryption did not result in a single element.");\r
+            }\r
+        \r
+            IMPL_XMLOBJECT_CLONE(NewEncryptedID);\r
+            EncryptedElementType* cloneEncryptedElementType() const {\r
+                return new NewEncryptedIDImpl(*this);\r
+            }\r
+\r
+            IMPL_TYPED_FOREIGN_CHILD(EncryptedData,xmlencryption);\r
+            IMPL_TYPED_FOREIGN_CHILDREN(EncryptedKey,xmlencryption,m_children.end());\r
+    \r
+        protected:\r
+            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {\r
+                PROC_TYPED_FOREIGN_CHILD(EncryptedData,xmlencryption,XMLConstants::XMLENC_NS,false);\r
+                PROC_TYPED_FOREIGN_CHILDREN(EncryptedKey,xmlencryption,XMLConstants::XMLENC_NS,false);\r
+                AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);\r
+            }\r
+        };\r
+\r
+        class SAML_DLLLOCAL TerminateImpl : public virtual Terminate,\r
+            public AbstractChildlessElement,\r
+            public AbstractDOMCachingXMLObject,\r
+            public AbstractXMLObjectMarshaller,\r
+            public AbstractXMLObjectUnmarshaller\r
+        {\r
+            public:\r
+                virtual ~TerminateImpl() { }\r
+\r
+                TerminateImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)\r
+                    : AbstractXMLObject(nsURI, localName, prefix, schemaType) { }\r
+\r
+                TerminateImpl(const TerminateImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {\r
+                }\r
+\r
+                IMPL_XMLOBJECT_CLONE(Terminate);\r
+\r
+            protected:\r
+                // has no attributes or children\r
+        };\r
+\r
+        class SAML_DLLLOCAL ManageNameIDRequestImpl : public virtual ManageNameIDRequest, public RequestAbstractTypeImpl\r
+        {\r
+            void init() {\r
+                m_NameID=NULL;\r
+                m_EncryptedID=NULL;\r
+                m_NewID=NULL;\r
+                m_NewEncryptedID=NULL;\r
+                m_Terminate=NULL;\r
+                m_children.push_back(NULL);\r
+                m_children.push_back(NULL);\r
+                m_children.push_back(NULL);\r
+                m_children.push_back(NULL);\r
+                m_children.push_back(NULL);\r
+                m_pos_NameID=m_pos_Extensions;\r
+                ++m_pos_NameID;\r
+                m_pos_EncryptedID=m_pos_NameID;\r
+                ++m_pos_EncryptedID;\r
+                m_pos_NewID=m_pos_EncryptedID;\r
+                ++m_pos_NewID;\r
+                m_pos_NewEncryptedID=m_pos_NewID;\r
+                ++m_pos_NewEncryptedID;\r
+                m_pos_Terminate=m_pos_NewEncryptedID;\r
+                ++m_pos_Terminate;\r
+                \r
+            }\r
+        public:\r
+            virtual ~ManageNameIDRequestImpl() { }\r
+    \r
+            ManageNameIDRequestImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)\r
+                : AbstractXMLObject(nsURI, localName, prefix, schemaType)\r
+            {\r
+                init();\r
+            }\r
+                \r
+            ManageNameIDRequestImpl(const ManageNameIDRequestImpl& src) : AbstractXMLObject(src), RequestAbstractTypeImpl(src) {\r
+                init();\r
+\r
+                if (src.getNameID())\r
+                    setNameID(src.getNameID()->cloneNameID());\r
+                if (src.getEncryptedID())\r
+                    setEncryptedID(src.getEncryptedID()->cloneEncryptedID());\r
+                if (src.getNewID())\r
+                    setNewID(src.getNewID()->cloneNewID());\r
+                if (src.getNewEncryptedID())\r
+                    setNewEncryptedID(src.getNewEncryptedID()->cloneNewEncryptedID());\r
+                if (src.getTerminate())\r
+                    setTerminate(src.getTerminate()->cloneTerminate());\r
+\r
+            }\r
+            \r
+            IMPL_XMLOBJECT_CLONE(ManageNameIDRequest);\r
+            RequestAbstractType* cloneRequestAbstractType() const {\r
+                return cloneManageNameIDRequest();\r
+            }\r
+\r
+            IMPL_TYPED_FOREIGN_CHILD(NameID,saml2);\r
+            IMPL_TYPED_FOREIGN_CHILD(EncryptedID,saml2);\r
+            IMPL_TYPED_CHILD(NewID);\r
+            IMPL_TYPED_CHILD(NewEncryptedID);\r
+            IMPL_TYPED_CHILD(Terminate);\r
+    \r
+        protected:\r
+            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {\r
+                PROC_TYPED_FOREIGN_CHILD(NameID,saml2,SAMLConstants::SAML20_NS,false);\r
+                PROC_TYPED_FOREIGN_CHILD(EncryptedID,saml2,SAMLConstants::SAML20_NS,false);\r
+                PROC_TYPED_CHILD(NewID,SAMLConstants::SAML20P_NS,false);\r
+                PROC_TYPED_CHILD(NewEncryptedID,SAMLConstants::SAML20P_NS,false);\r
+                PROC_TYPED_CHILD(Terminate,SAMLConstants::SAML20P_NS,false);\r
+                RequestAbstractTypeImpl::processChildElement(childXMLObject,root);\r
+            }\r
+        };\r
+\r
+        class SAML_DLLLOCAL ManageNameIDResponseImpl : public virtual ManageNameIDResponse, public StatusResponseTypeImpl\r
+        {\r
+        public:\r
+            virtual ~ManageNameIDResponseImpl() { }\r
+\r
+            ManageNameIDResponseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)\r
+                : AbstractXMLObject(nsURI, localName, prefix, schemaType) { }\r
+            \r
+            ManageNameIDResponseImpl(const ManageNameIDResponseImpl& src) : AbstractXMLObject(src), StatusResponseTypeImpl(src) {\r
+            }\r
+\r
+            IMPL_XMLOBJECT_CLONE(ManageNameIDResponse);\r
+            StatusResponseType* cloneStatusResponseType() const {\r
+                return cloneManageNameIDResponse();\r
+            }\r
+        };\r
+\r
+        class SAML_DLLLOCAL LogoutRequestImpl : public virtual LogoutRequest, public RequestAbstractTypeImpl\r
+        {\r
+            void init() {\r
+                m_Reason=NULL;\r
+                m_NotOnOrAfter=NULL;\r
+\r
+                m_BaseID=NULL;\r
+                m_NameID=NULL;\r
+                m_EncryptedID=NULL;\r
+                m_children.push_back(NULL);\r
+                m_children.push_back(NULL);\r
+                m_children.push_back(NULL);\r
+                m_pos_BaseID=m_pos_Extensions;\r
+                ++m_pos_BaseID;\r
+                m_pos_NameID=m_pos_BaseID;\r
+                ++m_pos_NameID;\r
+                m_pos_EncryptedID=m_pos_NameID;\r
+                ++m_pos_EncryptedID;\r
+                \r
+            }\r
+        public:\r
+            virtual ~LogoutRequestImpl() {\r
+                XMLString::release(&m_Reason);\r
+                delete m_NotOnOrAfter;\r
+            }\r
+    \r
+            LogoutRequestImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)\r
+                : AbstractXMLObject(nsURI, localName, prefix, schemaType)\r
+            {\r
+                init();\r
+            }\r
+                \r
+            LogoutRequestImpl(const LogoutRequestImpl& src) : AbstractXMLObject(src), RequestAbstractTypeImpl(src) {\r
+                init();\r
+\r
+                setReason(src.getReason());\r
+                setNotOnOrAfter(src.getNotOnOrAfter());\r
+\r
+                if (src.getBaseID())\r
+                    setBaseID(src.getBaseID()->cloneBaseID());\r
+                if (src.getNameID())\r
+                    setNameID(src.getNameID()->cloneNameID());\r
+                if (src.getEncryptedID())\r
+                    setEncryptedID(src.getEncryptedID()->cloneEncryptedID());\r
+\r
+                for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {\r
+                    if (*i) {\r
+                        SessionIndex* si = dynamic_cast<SessionIndex*>(*i);\r
+                        if (si) {\r
+                            getSessionIndexs().push_back(si->cloneSessionIndex());\r
+                            continue;\r
+                        }\r
+                    }\r
+                }\r
+            }\r
+            \r
+            IMPL_XMLOBJECT_CLONE(LogoutRequest);\r
+            RequestAbstractType* cloneRequestAbstractType() const {\r
+                return cloneLogoutRequest();\r
+            }\r
+\r
+            IMPL_STRING_ATTRIB(Reason);\r
+            IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);\r
+            IMPL_TYPED_FOREIGN_CHILD(BaseID,saml2);\r
+            IMPL_TYPED_FOREIGN_CHILD(NameID,saml2);\r
+            IMPL_TYPED_FOREIGN_CHILD(EncryptedID,saml2);\r
+            IMPL_TYPED_CHILDREN(SessionIndex,m_children.end());\r
+    \r
+        protected:\r
+            void marshallAttributes(DOMElement* domElement) const {\r
+                MARSHALL_STRING_ATTRIB(Reason,REASON,NULL);\r
+                MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);\r
+                RequestAbstractTypeImpl::marshallAttributes(domElement);\r
+            }\r
+    \r
+            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {\r
+                PROC_TYPED_FOREIGN_CHILD(BaseID,saml2,SAMLConstants::SAML20_NS,false);\r
+                PROC_TYPED_FOREIGN_CHILD(NameID,saml2,SAMLConstants::SAML20_NS,false);\r
+                PROC_TYPED_FOREIGN_CHILD(EncryptedID,saml2,SAMLConstants::SAML20_NS,false);\r
+                PROC_TYPED_CHILDREN(SessionIndex,SAMLConstants::SAML20P_NS,false);\r
+                RequestAbstractTypeImpl::processChildElement(childXMLObject,root);\r
+            }\r
+            void processAttribute(const DOMAttr* attribute) {\r
+                PROC_STRING_ATTRIB(Reason,REASON,NULL);\r
+                PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);\r
+                RequestAbstractTypeImpl::processAttribute(attribute);\r
+            }\r
+        };\r
+\r
+        class SAML_DLLLOCAL LogoutResponseImpl : public virtual LogoutResponse, public StatusResponseTypeImpl\r
+        {\r
+        public:\r
+            virtual ~LogoutResponseImpl() { }\r
+\r
+            LogoutResponseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)\r
+                : AbstractXMLObject(nsURI, localName, prefix, schemaType) { }\r
+            \r
+            LogoutResponseImpl(const LogoutResponseImpl& src) : AbstractXMLObject(src), StatusResponseTypeImpl(src) {\r
+            }\r
+\r
+            IMPL_XMLOBJECT_CLONE(LogoutResponse);\r
+            StatusResponseType* cloneStatusResponseType() const {\r
+                return cloneLogoutResponse();\r
+            }\r
+        };\r
+\r
+\r
+        class SAML_DLLLOCAL NameIDMappingRequestImpl : public virtual NameIDMappingRequest, public RequestAbstractTypeImpl\r
+        {\r
+            void init() {\r
+                m_BaseID=NULL;\r
+                m_NameID=NULL;\r
+                m_EncryptedID=NULL;\r
+                m_NameIDPolicy=NULL;\r
+                m_children.push_back(NULL);\r
+                m_children.push_back(NULL);\r
+                m_children.push_back(NULL);\r
+                m_children.push_back(NULL);\r
+                m_pos_BaseID=m_pos_Extensions;\r
+                ++m_pos_BaseID;\r
+                m_pos_NameID=m_pos_BaseID;\r
+                ++m_pos_NameID;\r
+                m_pos_EncryptedID=m_pos_NameID;\r
+                ++m_pos_EncryptedID;\r
+                m_pos_NameIDPolicy=m_pos_EncryptedID;\r
+                ++m_pos_NameIDPolicy;\r
+                \r
+            }\r
+        public:\r
+            virtual ~NameIDMappingRequestImpl() { }\r
+    \r
+            NameIDMappingRequestImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)\r
+                : AbstractXMLObject(nsURI, localName, prefix, schemaType)\r
+            {\r
+                init();\r
+            }\r
+                \r
+            NameIDMappingRequestImpl(const NameIDMappingRequestImpl& src) : AbstractXMLObject(src), RequestAbstractTypeImpl(src) {\r
+                init();\r
+\r
+                if (src.getBaseID())\r
+                    setBaseID(src.getBaseID()->cloneBaseID());\r
+                if (src.getNameID())\r
+                    setNameID(src.getNameID()->cloneNameID());\r
+                if (src.getEncryptedID())\r
+                    setEncryptedID(src.getEncryptedID()->cloneEncryptedID());\r
+                if (src.getNameIDPolicy())\r
+                    setNameIDPolicy(src.getNameIDPolicy()->cloneNameIDPolicy());\r
+\r
+            }\r
+            \r
+            IMPL_XMLOBJECT_CLONE(NameIDMappingRequest);\r
+            RequestAbstractType* cloneRequestAbstractType() const {\r
+                return cloneNameIDMappingRequest();\r
+            }\r
+\r
+            IMPL_TYPED_FOREIGN_CHILD(BaseID,saml2);\r
+            IMPL_TYPED_FOREIGN_CHILD(NameID,saml2);\r
+            IMPL_TYPED_FOREIGN_CHILD(EncryptedID,saml2);\r
+            IMPL_TYPED_CHILD(NameIDPolicy);\r
+    \r
+        protected:\r
+            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {\r
+                PROC_TYPED_FOREIGN_CHILD(BaseID,saml2,SAMLConstants::SAML20_NS,false);\r
+                PROC_TYPED_FOREIGN_CHILD(NameID,saml2,SAMLConstants::SAML20_NS,false);\r
+                PROC_TYPED_FOREIGN_CHILD(EncryptedID,saml2,SAMLConstants::SAML20_NS,false);\r
+                PROC_TYPED_CHILD(NameIDPolicy,SAMLConstants::SAML20P_NS,false);\r
+                RequestAbstractTypeImpl::processChildElement(childXMLObject,root);\r
+            }\r
+        };\r
+\r
+        class SAML_DLLLOCAL NameIDMappingResponseImpl : public virtual NameIDMappingResponse, public StatusResponseTypeImpl\r
+        {\r
+            void init() {\r
+                m_NameID=NULL;\r
+                m_EncryptedID=NULL;\r
+                m_children.push_back(NULL);\r
+                m_children.push_back(NULL);\r
+                m_pos_NameID=m_pos_Status;\r
+                ++m_pos_NameID;\r
+                m_pos_EncryptedID=m_pos_NameID;\r
+                ++m_pos_EncryptedID;\r
+            }\r
+        public:\r
+            virtual ~NameIDMappingResponseImpl() { }\r
+    \r
+            NameIDMappingResponseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)\r
+                : AbstractXMLObject(nsURI, localName, prefix, schemaType)\r
+            {\r
+                init();\r
+            }\r
+                \r
+            NameIDMappingResponseImpl(const NameIDMappingResponseImpl& src) : AbstractXMLObject(src), StatusResponseTypeImpl(src) {\r
+                init();\r
+\r
+                if (src.getNameID())\r
+                    setNameID(getNameID()->cloneNameID());\r
+                if (src.getEncryptedID())\r
+                    setEncryptedID(getEncryptedID()->cloneEncryptedID());\r
+\r
+            }\r
+            \r
+            IMPL_XMLOBJECT_CLONE(NameIDMappingResponse);\r
+            StatusResponseType* cloneStatusResponseType() const {\r
+                return cloneNameIDMappingResponse();\r
+            }\r
+\r
+            IMPL_TYPED_FOREIGN_CHILD(NameID,saml2);\r
+            IMPL_TYPED_FOREIGN_CHILD(EncryptedID,saml2);\r
+    \r
+        protected:\r
+            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {\r
+                PROC_TYPED_FOREIGN_CHILD(NameID,saml2,SAMLConstants::SAML20_NS,false);\r
+                PROC_TYPED_FOREIGN_CHILD(EncryptedID,saml2,SAMLConstants::SAML20_NS,false);\r
+                StatusResponseTypeImpl::processChildElement(childXMLObject,root);\r
+            }\r
+        };\r
+    };\r
+};\r
+\r
+#if defined (_MSC_VER)\r
+    #pragma warning( pop )\r
+#endif\r
+\r
+// Builder Implementations\r
+IMPL_XMLOBJECTBUILDER(Artifact);\r
+IMPL_XMLOBJECTBUILDER(ArtifactResolve);\r
+IMPL_XMLOBJECTBUILDER(ArtifactResponse);\r
+IMPL_XMLOBJECTBUILDER(AssertionIDRequest);\r
+IMPL_XMLOBJECTBUILDER(AttributeQuery);\r
+IMPL_XMLOBJECTBUILDER(AuthnQuery);\r
+IMPL_XMLOBJECTBUILDER(AuthnRequest);\r
+IMPL_XMLOBJECTBUILDER(AuthzDecisionQuery);\r
+IMPL_XMLOBJECTBUILDER(Extensions);\r
+IMPL_XMLOBJECTBUILDER(GetComplete);\r
+IMPL_XMLOBJECTBUILDER(IDPEntry);\r
+IMPL_XMLOBJECTBUILDER(IDPList);\r
+IMPL_XMLOBJECTBUILDER(LogoutRequest);\r
+IMPL_XMLOBJECTBUILDER(LogoutResponse);\r
+IMPL_XMLOBJECTBUILDER(ManageNameIDRequest);\r
+IMPL_XMLOBJECTBUILDER(ManageNameIDResponse);\r
+IMPL_XMLOBJECTBUILDER(NameIDMappingRequest);\r
+IMPL_XMLOBJECTBUILDER(NameIDMappingResponse);\r
+IMPL_XMLOBJECTBUILDER(NameIDPolicy);\r
+IMPL_XMLOBJECTBUILDER(NewEncryptedID);\r
+IMPL_XMLOBJECTBUILDER(NewID);\r
+IMPL_XMLOBJECTBUILDER(RequestedAuthnContext);\r
+IMPL_XMLOBJECTBUILDER(RequesterID);\r
+IMPL_XMLOBJECTBUILDER(Response);\r
+IMPL_XMLOBJECTBUILDER(Scoping);\r
+IMPL_XMLOBJECTBUILDER(SessionIndex);\r
+IMPL_XMLOBJECTBUILDER(Status);\r
+IMPL_XMLOBJECTBUILDER(StatusCode);\r
+IMPL_XMLOBJECTBUILDER(StatusDetail);\r
+IMPL_XMLOBJECTBUILDER(StatusMessage);\r
+IMPL_XMLOBJECTBUILDER(Terminate);\r
+\r
+IMPL_XMLOBJECTBUILDER(RespondTo);\r
+\r
+// Unicode literals\r
+const XMLCh Artifact::LOCAL_NAME[] = UNICODE_LITERAL_8(A,r,t,i,f,a,c,t);\r
+const XMLCh ArtifactResolve::LOCAL_NAME[] = UNICODE_LITERAL_15(A,r,t,i,f,a,c,t,R,e,s,o,l,v,e);\r
+const XMLCh ArtifactResolve::TYPE_NAME[] = UNICODE_LITERAL_19(A,r,t,i,f,a,c,t,R,e,s,o,l,v,e,T,y,p,e);\r
+const XMLCh ArtifactResponse::LOCAL_NAME[] = UNICODE_LITERAL_16(A,r,t,i,f,a,c,t,R,e,s,p,o,n,s,e);\r
+const XMLCh ArtifactResponse::TYPE_NAME[] = UNICODE_LITERAL_20(A,r,t,i,f,a,c,t,R,e,s,p,o,n,s,e,T,y,p,e);\r
+const XMLCh AssertionIDRequest::LOCAL_NAME[] = UNICODE_LITERAL_18(A,s,s,e,r,t,i,o,n,I,D,R,e,q,u,e,s,t);\r
+const XMLCh AssertionIDRequest::TYPE_NAME[] = UNICODE_LITERAL_22(A,s,s,e,r,t,i,o,n,I,D,R,e,q,u,e,s,t,T,y,p,e);\r
+const XMLCh AttributeQuery::LOCAL_NAME[] = UNICODE_LITERAL_14(A,t,t,r,i,b,u,t,e,Q,u,e,r,y);\r
+const XMLCh AttributeQuery::TYPE_NAME[] = UNICODE_LITERAL_18(A,t,t,r,i,b,u,t,e,Q,u,e,r,y,T,y,p,e);\r
+const XMLCh AuthnQuery::LOCAL_NAME[] = UNICODE_LITERAL_10(A,u,t,h,n,Q,u,e,r,y);\r
+const XMLCh AuthnQuery::TYPE_NAME[] = UNICODE_LITERAL_14(A,u,t,h,n,Q,u,e,r,y,T,y,p,e);\r
+const XMLCh AuthnQuery::SESSIONINDEX_ATTRIB_NAME[] = UNICODE_LITERAL_12(S,e,s,s,i,o,n,I,n,d,e,x);\r
+const XMLCh AuthnRequest::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,n,R,e,q,u,e,s,t);\r
+const XMLCh AuthnRequest::TYPE_NAME[] = UNICODE_LITERAL_16(A,u,t,h,n,R,e,q,u,e,s,t,T,y,p,e);\r
+const XMLCh AuthnRequest::FORCEAUTHN_ATTRIB_NAME[] = UNICODE_LITERAL_10(F,o,r,c,e,A,u,t,h,n);\r
+const XMLCh AuthnRequest::ISPASSIVE_ATTRIB_NAME[] = UNICODE_LITERAL_9(I,s,P,a,s,s,i,v,e);\r
+const XMLCh AuthnRequest::PROTOCOLBINDING_ATTRIB_NAME[] = UNICODE_LITERAL_15(P,r,o,t,o,c,o,l,B,i,n,d,i,n,g);\r
+const XMLCh AuthnRequest::ASSERTIONCONSUMERSERVICEINDEX_ATTRIB_NAME[] = UNICODE_LITERAL_29(A,s,s,e,r,t,i,o,n,C,o,n,s,u,m,e,r,S,e,r,v,i,c,e,I,n,d,e,x);\r
+const XMLCh AuthnRequest::ASSERTIONCONSUMERSERVICEURL_ATTRIB_NAME[] = UNICODE_LITERAL_27(A,s,s,e,r,t,i,o,n,C,o,n,s,u,m,e,r,S,e,r,v,i,c,e,U,R,L);\r
+const XMLCh AuthnRequest::ATTRIBUTECONSUMINGSERVICEINDEX_ATTRIB_NAME[] = UNICODE_LITERAL_30(A,t,t,r,i,b,u,t,e,C,o,n,s,u,m,i,n,g,S,e,r,v,i,c,e,I,n,d,e,x);\r
+const XMLCh AuthnRequest::PROVIDERNAME_ATTRIB_NAME[] = UNICODE_LITERAL_12(P,r,o,v,i,d,e,r,N,a,m,e);\r
+const XMLCh AuthzDecisionQuery::LOCAL_NAME[] = UNICODE_LITERAL_18(A,u,t,h,z,D,e,c,i,s,i,o,n,Q,u,e,r,y);\r
+const XMLCh AuthzDecisionQuery::TYPE_NAME[] = UNICODE_LITERAL_22(A,u,t,h,z,D,e,c,i,s,i,o,n,Q,u,e,r,y,T,y,p,e);\r
+const XMLCh AuthzDecisionQuery::RESOURCE_ATTRIB_NAME[] = UNICODE_LITERAL_8(R,e,s,o,u,r,c,e);\r
+const XMLCh Extensions::LOCAL_NAME[] = UNICODE_LITERAL_10(E,x,t,e,n,s,i,o,n,s);\r
+const XMLCh Extensions::TYPE_NAME[] = UNICODE_LITERAL_14(E,x,t,e,n,s,i,o,n,s,T,y,p,e);\r
+const XMLCh GetComplete::LOCAL_NAME[] = UNICODE_LITERAL_11(G,e,t,C,o,m,p,l,e,t,e);\r
+const XMLCh IDPEntry::LOCAL_NAME[] = UNICODE_LITERAL_8(I,D,P,E,n,t,r,y);\r
+const XMLCh IDPEntry::TYPE_NAME[] = UNICODE_LITERAL_12(I,D,P,E,n,t,r,y,T,y,p,e);\r
+const XMLCh IDPEntry::PROVIDERID_ATTRIB_NAME[] = UNICODE_LITERAL_10(P,r,o,v,i,d,e,r,I,D);\r
+const XMLCh IDPEntry::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e);\r
+const XMLCh IDPEntry::LOC_ATTRIB_NAME[] = UNICODE_LITERAL_3(L,o,c);\r
+const XMLCh IDPList::LOCAL_NAME[] = UNICODE_LITERAL_7(I,D,P,L,i,s,t);\r
+const XMLCh IDPList::TYPE_NAME[] = UNICODE_LITERAL_11(I,D,P,L,i,s,t,T,y,p,e);\r
+const XMLCh LogoutRequest::LOCAL_NAME[] = UNICODE_LITERAL_13(L,o,g,o,u,t,R,e,q,u,e,s,t);\r
+const XMLCh LogoutRequest::TYPE_NAME[] = UNICODE_LITERAL_17(L,o,g,o,u,t,R,e,q,u,e,s,t,T,y,p,e);\r
+const XMLCh LogoutRequest::REASON_ATTRIB_NAME[] = UNICODE_LITERAL_6(R,e,a,s,o,n);\r
+const XMLCh LogoutRequest::NOTONORAFTER_ATTRIB_NAME[] = UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);\r
+const XMLCh LogoutResponse::LOCAL_NAME[] = UNICODE_LITERAL_14(L,o,g,o,u,t,R,e,s,p,o,n,s,e);\r
+const XMLCh ManageNameIDRequest::LOCAL_NAME[] = UNICODE_LITERAL_19(M,a,n,a,g,e,N,a,m,e,I,D,R,e,q,u,e,s,t);\r
+const XMLCh ManageNameIDRequest::TYPE_NAME[] = UNICODE_LITERAL_23(M,a,n,a,g,e,N,a,m,e,I,D,R,e,q,u,e,s,t,T,y,p,e);\r
+const XMLCh ManageNameIDResponse::LOCAL_NAME[] = UNICODE_LITERAL_20(M,a,n,a,g,e,N,a,m,e,I,D,R,e,s,p,o,n,s,e);\r
+const XMLCh NameIDMappingRequest::LOCAL_NAME[] = UNICODE_LITERAL_20(N,a,m,e,I,D,M,a,p,p,i,n,g,R,e,q,u,e,s,t);\r
+const XMLCh NameIDMappingRequest::TYPE_NAME[] = UNICODE_LITERAL_24(N,a,m,e,I,D,M,a,p,p,i,n,g,R,e,q,u,e,s,t,T,y,p,e);\r
+const XMLCh NameIDMappingResponse::LOCAL_NAME[] = UNICODE_LITERAL_21(N,a,m,e,I,D,M,a,p,p,i,n,g,R,e,s,p,o,n,s,e);\r
+const XMLCh NameIDMappingResponse::TYPE_NAME[] = UNICODE_LITERAL_25(N,a,m,e,I,D,M,a,p,p,i,n,g,R,e,s,p,o,n,s,e,T,y,p,e);\r
+const XMLCh NameIDPolicy::LOCAL_NAME[] = UNICODE_LITERAL_12(N,a,m,e,I,D,P,o,l,i,c,y);\r
+const XMLCh NameIDPolicy::TYPE_NAME[] = UNICODE_LITERAL_16(N,a,m,e,I,D,P,o,l,i,c,y,T,y,p,e);\r
+const XMLCh NameIDPolicy::FORMAT_ATTRIB_NAME[] = UNICODE_LITERAL_6(F,o,r,m,a,t);\r
+const XMLCh NameIDPolicy::SPNAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_15(S,P,N,a,m,e,Q,u,a,l,i,f,i,e,r);\r
+const XMLCh NameIDPolicy::ALLOWCREATE_ATTRIB_NAME[] = UNICODE_LITERAL_11(A,l,l,o,w,C,r,e,a,t,e);\r
+const XMLCh NewEncryptedID::LOCAL_NAME[] = UNICODE_LITERAL_14(N,e,w,E,n,c,r,y,p,t,e,d,I,D);\r
+const XMLCh NewID::LOCAL_NAME[] = UNICODE_LITERAL_5(N,e,w,I,D);\r
+const XMLCh RequesterID::LOCAL_NAME[] = UNICODE_LITERAL_11(R,e,q,u,e,s,t,e,r,I,D);\r
+const XMLCh RequestedAuthnContext::LOCAL_NAME[] = UNICODE_LITERAL_21(R,e,q,u,e,s,t,e,d,A,u,t,h,n,C,o,n,t,e,x,t);\r
+const XMLCh RequestedAuthnContext::TYPE_NAME[] = UNICODE_LITERAL_25(R,e,q,u,e,s,t,e,d,A,u,t,h,n,C,o,n,t,e,x,t,T,y,p,e);\r
+const XMLCh RequestedAuthnContext::COMPARISON_ATTRIB_NAME[] = UNICODE_LITERAL_10(C,o,m,p,a,r,i,s,o,n);\r
+const XMLCh RequestedAuthnContext::COMPARISON_EXACT[] = UNICODE_LITERAL_5(e,x,a,c,t);\r
+const XMLCh RequestedAuthnContext::COMPARISON_MINIMUM[] = UNICODE_LITERAL_7(m,i,n,i,m,u,m);\r
+const XMLCh RequestedAuthnContext::COMPARISON_MAXIMUM[] = UNICODE_LITERAL_7(m,a,x,i,m,u,m);\r
+const XMLCh RequestedAuthnContext::COMPARISON_BETTER[] = UNICODE_LITERAL_6(b,e,t,t,e,r);\r
+const XMLCh RequestAbstractType::LOCAL_NAME[] = {chNull};\r
+const XMLCh RequestAbstractType::TYPE_NAME[] = UNICODE_LITERAL_19(R,e,q,u,e,s,t,A,b,s,t,r,a,c,t,T,y,p,e);\r
+const XMLCh RequestAbstractType::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);\r
+const XMLCh RequestAbstractType::VER_ATTRIB_NAME[] = UNICODE_LITERAL_7(V,e,r,s,i,o,n);\r
+const XMLCh RequestAbstractType::ISSUEINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,s,s,u,e,I,n,s,t,a,n,t);\r
+const XMLCh RequestAbstractType::DESTINATION_ATTRIB_NAME[] = UNICODE_LITERAL_11(D,e,s,t,i,n,a,t,i,o,n);\r
+const XMLCh RequestAbstractType::CONSENT_ATTRIB_NAME[] = UNICODE_LITERAL_7(C,o,n,s,e,n,t);\r
+const XMLCh RespondTo::LOCAL_NAME[] = UNICODE_LITERAL_9(R,e,s,p,o,n,d,T,o);\r
+const XMLCh Response::LOCAL_NAME[] = UNICODE_LITERAL_8(R,e,s,p,o,n,s,e);\r
+const XMLCh Response::TYPE_NAME[] = UNICODE_LITERAL_12(R,e,s,p,o,n,s,e,T,y,p,e);\r
+const XMLCh Scoping::LOCAL_NAME[] = UNICODE_LITERAL_7(S,c,o,p,i,n,g);\r
+const XMLCh Scoping::TYPE_NAME[] = UNICODE_LITERAL_11(S,c,o,p,i,n,g,T,y,p,e);\r
+const XMLCh Scoping::PROXYCOUNT_ATTRIB_NAME[] = UNICODE_LITERAL_10(P,r,o,x,y,C,o,u,n,t);\r
+const XMLCh SessionIndex::LOCAL_NAME[] = UNICODE_LITERAL_12(S,e,s,s,i,o,n,I,n,d,e,x);\r
+const XMLCh Status::LOCAL_NAME[] = UNICODE_LITERAL_6(S,t,a,t,u,s);\r
+const XMLCh Status::TYPE_NAME[] = UNICODE_LITERAL_10(S,t,a,t,u,s,T,y,p,e);\r
+const XMLCh StatusCode::LOCAL_NAME[] = UNICODE_LITERAL_10(S,t,a,t,u,s,C,o,d,e);\r
+const XMLCh StatusCode::TYPE_NAME[] = UNICODE_LITERAL_14(S,t,a,t,u,s,C,o,d,e,T,y,p,e);\r
+const XMLCh StatusCode::VALUE_ATTRIB_NAME[] = UNICODE_LITERAL_5(V,a,l,u,e);\r
+const XMLCh StatusDetail::LOCAL_NAME[] = UNICODE_LITERAL_12(S,t,a,t,u,s,D,e,t,a,i,l);\r
+const XMLCh StatusDetail::TYPE_NAME[] = UNICODE_LITERAL_16(S,t,a,t,u,s,D,e,t,a,i,l,T,y,p,e);\r
+const XMLCh StatusMessage::LOCAL_NAME[] = UNICODE_LITERAL_13(S,t,a,t,u,s,M,e,s,s,a,g,e);\r
+const XMLCh StatusResponseType::LOCAL_NAME[] = {chNull};\r
+const XMLCh StatusResponseType::TYPE_NAME[] = UNICODE_LITERAL_18(S,t,a,t,u,s,R,e,s,p,o,n,s,e,T,y,p,e);\r
+const XMLCh StatusResponseType::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);\r
+const XMLCh StatusResponseType::INRESPONSETO_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,n,R,e,s,p,o,n,s,e,T,o);\r
+const XMLCh StatusResponseType::VER_ATTRIB_NAME[] = UNICODE_LITERAL_7(V,e,r,s,i,o,n);\r
+const XMLCh StatusResponseType::ISSUEINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,s,s,u,e,I,n,s,t,a,n,t);\r
+const XMLCh StatusResponseType::DESTINATION_ATTRIB_NAME[] = UNICODE_LITERAL_11(D,e,s,t,i,n,a,t,i,o,n);\r
+const XMLCh StatusResponseType::CONSENT_ATTRIB_NAME[] = UNICODE_LITERAL_7(C,o,n,s,e,n,t);\r
+const XMLCh SubjectQuery::LOCAL_NAME[] = UNICODE_LITERAL_12(S,u,b,j,e,c,t,Q,u,e,r,y);\r
+const XMLCh SubjectQuery::TYPE_NAME[] = UNICODE_LITERAL_24(S,u,b,j,e,c,t,Q,u,e,r,y,A,b,s,t,r,a,c,t,T,y,p,e);\r
+const XMLCh Terminate::LOCAL_NAME[] = UNICODE_LITERAL_9(T,e,r,m,i,n,a,t,e);\r
+const XMLCh Terminate::TYPE_NAME[] = UNICODE_LITERAL_13(T,e,r,m,i,n,a,t,e,T,y,p,e);\r
+\r
+// Unicode literals: LogoutRequest element, Reason attribute\r
+const XMLCh LogoutRequest::REASON_USER[] = // urn:oasis:names:tc:SAML:2.0:logout:user\r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_l, chLatin_o, chLatin_g, chLatin_o, chLatin_u, chLatin_t, chColon,\r
+  chLatin_u, chLatin_s, chLatin_e, chLatin_r, chNull\r
+};\r
+\r
+const XMLCh LogoutRequest::REASON_ADMIN[] = // urn:oasis:names:tc:SAML:2.0:logout:admin\r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_l, chLatin_o, chLatin_g, chLatin_o, chLatin_u, chLatin_t, chColon,\r
+  chLatin_a, chLatin_d, chLatin_m, chLatin_i, chLatin_n, chNull\r
+};\r
+\r
+\r
+const XMLCh LogoutRequest::REASON_GLOBAL_TIMEOUT[] = // urn:oasis:names:tc:SAML:2.0:logout:global-timeout\r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_l, chLatin_o, chLatin_g, chLatin_o, chLatin_u, chLatin_t, chColon,\r
+  chLatin_g, chLatin_l, chLatin_o, chLatin_b, chLatin_a, chLatin_l, \r
+    chDash, chLatin_t, chLatin_i, chLatin_m, chLatin_e, chLatin_o, chLatin_u, chLatin_t, chNull\r
+};\r
+\r
+\r
+const XMLCh LogoutRequest::REASON_SP_TIMEOUT[] = // urn:oasis:names:tc:SAML:2.0:logout:sp-timeout\r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_l, chLatin_o, chLatin_g, chLatin_o, chLatin_u, chLatin_t, chColon,\r
+  chLatin_s, chLatin_p, chDash, chLatin_t, chLatin_i, chLatin_m, chLatin_e, chLatin_o, chLatin_u, chLatin_t, chNull\r
+};\r
+\r
+\r
+// Unicode literals, StatusCode Value\r
+const XMLCh StatusCode::SUCCESS[] = //  urn:oasis:names:tc:SAML:2.0:status:Success \r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,\r
+  chLatin_S, chLatin_u, chLatin_c, chLatin_c, chLatin_e, chLatin_s, chLatin_s, chNull\r
+};\r
+\r
+const XMLCh StatusCode::REQUESTER[] = //  urn:oasis:names:tc:SAML:2.0:status:Requester \r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,\r
+  chLatin_R, chLatin_e, chLatin_q, chLatin_u, chLatin_e, chLatin_s, chLatin_t, chLatin_e, chLatin_r, chNull\r
+};\r
+\r
+const XMLCh StatusCode::RESPONDER[] = //  urn:oasis:names:tc:SAML:2.0:status:Responder \r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,\r
+  chLatin_R, chLatin_e, chLatin_s, chLatin_p, chLatin_o, chLatin_n, chLatin_d, chLatin_e, chLatin_r, chNull\r
+};\r
+\r
+const XMLCh StatusCode::VERSION_MISMATCH[] = //  urn:oasis:names:tc:SAML:2.0:status:VersionMismatch \r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,\r
+  chLatin_V, chLatin_e, chLatin_r, chLatin_s, chLatin_i, chLatin_o, chLatin_n,\r
+    chLatin_M, chLatin_i, chLatin_s, chLatin_m, chLatin_a, chLatin_t, chLatin_c, chLatin_h, chNull\r
+};\r
+\r
+const XMLCh StatusCode::AUTHN_FAILED[] = //  urn:oasis:names:tc:SAML:2.0:status:AuthnFailed \r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,\r
+  chLatin_A, chLatin_u, chLatin_t, chLatin_h, chLatin_n,\r
+    chLatin_F, chLatin_a, chLatin_i, chLatin_l, chLatin_e, chLatin_d, chNull\r
+};\r
+\r
+const XMLCh StatusCode::INVALID_ATTR_NAME_OR_VALUE[] = //  urn:oasis:names:tc:SAML:2.0:status:InvalidAttrNameOrValue \r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,\r
+  chLatin_I, chLatin_n, chLatin_v, chLatin_a, chLatin_l, chLatin_i, chLatin_d, \r
+    chLatin_A, chLatin_t, chLatin_t, chLatin_r, chLatin_N, chLatin_a, chLatin_m, chLatin_e, \r
+    chLatin_O, chLatin_r, chLatin_V, chLatin_a, chLatin_l, chLatin_u, chLatin_e, chNull\r
+};\r
+\r
+const XMLCh StatusCode::INVALID_NAMEID_POLICY[] = //  urn:oasis:names:tc:SAML:2.0:status:InvalidNameIDPolicy \r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,\r
+  chLatin_I, chLatin_n, chLatin_v, chLatin_a, chLatin_l, chLatin_i, chLatin_d, \r
+   chLatin_N, chLatin_a, chLatin_m, chLatin_e, chLatin_I, chLatin_D, \r
+   chLatin_P, chLatin_o, chLatin_l, chLatin_i, chLatin_c, chLatin_y, chNull\r
+};\r
+\r
+const XMLCh StatusCode::NO_AUTHN_CONTEXT[] = //  urn:oasis:names:tc:SAML:2.0:status:NoAuthnContext \r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,\r
+  chLatin_N, chLatin_o, chLatin_A, chLatin_u, chLatin_t, chLatin_h, chLatin_n, \r
+  chLatin_C, chLatin_o, chLatin_n, chLatin_t, chLatin_e, chLatin_x, chLatin_t, chNull\r
+};\r
+\r
+const XMLCh StatusCode::NO_AVAILABLE_IDP[] = //  urn:oasis:names:tc:SAML:2.0:status:NoAvailableIDP \r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,\r
+  chLatin_N, chLatin_o, chLatin_A, chLatin_v, chLatin_a, chLatin_i, chLatin_l, chLatin_a, chLatin_b, chLatin_l, chLatin_e, \r
+   chLatin_I, chLatin_D, chLatin_P, chNull\r
+};\r
+\r
+const XMLCh StatusCode::NO_PASSIVE[] = //  urn:oasis:names:tc:SAML:2.0:status:NoPassive \r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,\r
+  chLatin_N, chLatin_o, chLatin_P, chLatin_a, chLatin_s, chLatin_s, chLatin_i, chLatin_v, chLatin_e, chNull\r
+};\r
+\r
+const XMLCh StatusCode::NO_SUPPORTED_IDP[] = //  urn:oasis:names:tc:SAML:2.0:status:NoSupportedIDP \r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,\r
+  chLatin_N, chLatin_o, chLatin_S, chLatin_u, chLatin_p, chLatin_p, chLatin_o, chLatin_r, chLatin_t, chLatin_e, chLatin_d,\r
+      chLatin_I, chLatin_D, chLatin_P, chNull\r
+};\r
+\r
+const XMLCh StatusCode::PARTIAL_LOGOUT[] = //  urn:oasis:names:tc:SAML:2.0:status:PartialLogout \r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,\r
+  chLatin_P, chLatin_a, chLatin_r, chLatin_t, chLatin_i, chLatin_a, chLatin_l, \r
+    chLatin_L, chLatin_o, chLatin_g, chLatin_o, chLatin_u, chLatin_t, chNull\r
+};\r
+\r
+const XMLCh StatusCode::PROXY_COUNT_EXCEEDED[] = //  urn:oasis:names:tc:SAML:2.0:status:ProxyCountExceeded \r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,\r
+  chLatin_P, chLatin_r, chLatin_o, chLatin_x, chLatin_y, chLatin_C, chLatin_o, chLatin_u, chLatin_n, chLatin_t, \r
+    chLatin_E, chLatin_x, chLatin_c, chLatin_e, chLatin_e, chLatin_d, chLatin_e, chLatin_d, chNull\r
+};\r
+\r
+const XMLCh StatusCode::REQUEST_DENIED[] = //  urn:oasis:names:tc:SAML:2.0:status:RequestDenied \r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,\r
+  chLatin_R, chLatin_e, chLatin_q, chLatin_u, chLatin_e, chLatin_s, chLatin_t, \r
+    chLatin_D, chLatin_e, chLatin_n, chLatin_i, chLatin_e, chLatin_d, chNull\r
+};\r
+\r
+const XMLCh StatusCode::REQUEST_UNSUPPORTED[] = //  urn:oasis:names:tc:SAML:2.0:status:RequestUnsupported \r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,\r
+  chLatin_R, chLatin_e, chLatin_q, chLatin_u, chLatin_e, chLatin_s, chLatin_t, \r
+    chLatin_U, chLatin_n, chLatin_s, chLatin_u, chLatin_p, chLatin_p, chLatin_o, chLatin_r, chLatin_t, chLatin_e, chLatin_d, chNull\r
+};\r
+\r
+const XMLCh StatusCode::REQUEST_VERSION_DEPRECATED[] = //  urn:oasis:names:tc:SAML:2.0:status:RequestVersionDeprecated \r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,\r
+  chLatin_R, chLatin_e, chLatin_q, chLatin_u, chLatin_e, chLatin_s, chLatin_t, \r
+    chLatin_V, chLatin_e, chLatin_r, chLatin_s, chLatin_i, chLatin_o, chLatin_n, \r
+    chLatin_D, chLatin_e, chLatin_p, chLatin_r, chLatin_e, chLatin_c, chLatin_a, chLatin_t, chLatin_e, chLatin_d, chNull\r
+};\r
+\r
+const XMLCh StatusCode::REQUEST_VERSION_TOO_HIGH[] = //  urn:oasis:names:tc:SAML:2.0:status:RequestVersionTooHigh \r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,\r
+  chLatin_R, chLatin_e, chLatin_q, chLatin_u, chLatin_e, chLatin_s, chLatin_t, \r
+  chLatin_V, chLatin_e, chLatin_r, chLatin_s, chLatin_i, chLatin_o, chLatin_n, \r
+  chLatin_T, chLatin_o, chLatin_o, chLatin_H, chLatin_i, chLatin_g, chLatin_h, chNull\r
+};\r
+\r
+const XMLCh StatusCode::REQUEST_VERSION_TOO_LOW[] = //  urn:oasis:names:tc:SAML:2.0:status:RequestVersionTooLow \r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,\r
+  chLatin_R, chLatin_e, chLatin_q, chLatin_u, chLatin_e, chLatin_s, chLatin_t, \r
+    chLatin_V, chLatin_e, chLatin_r, chLatin_s, chLatin_i, chLatin_o, chLatin_n, \r
+    chLatin_T, chLatin_o, chLatin_o, chLatin_L, chLatin_o, chLatin_w, chNull\r
+};\r
+\r
+const XMLCh StatusCode::RESOURCE_NOT_RECOGNIZED[] = //  urn:oasis:names:tc:SAML:2.0:status:ResourceNotRecognized \r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,\r
+  chLatin_R, chLatin_e, chLatin_s, chLatin_o, chLatin_u, chLatin_r, chLatin_c, chLatin_e, \r
+    chLatin_N, chLatin_o, chLatin_t, \r
+    chLatin_R, chLatin_e, chLatin_c, chLatin_o, chLatin_g, chLatin_n, chLatin_i, chLatin_z, chLatin_e, chLatin_d, chNull\r
+};\r
+\r
+const XMLCh StatusCode::TOO_MANY_RESPONSES[] = //  urn:oasis:names:tc:SAML:2.0:status:TooManyResponses \r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,\r
+  chLatin_T, chLatin_o, chLatin_o, chLatin_M, chLatin_a, chLatin_n, chLatin_y, \r
+    chLatin_R, chLatin_e, chLatin_s, chLatin_p, chLatin_o, chLatin_n, chLatin_s, chLatin_e, chLatin_s, chNull\r
+};\r
+\r
+const XMLCh StatusCode::UNKNOWN_ATTR_PROFILE[] = //  urn:oasis:names:tc:SAML:2.0:status:UnknownAttrProfile \r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,\r
+  chLatin_U, chLatin_n, chLatin_k, chLatin_n, chLatin_o, chLatin_w, chLatin_n, \r
+    chLatin_A, chLatin_t, chLatin_t, chLatin_r, \r
+    chLatin_P, chLatin_r, chLatin_o, chLatin_f, chLatin_i, chLatin_l, chLatin_e, chNull\r
+};\r
+\r
+const XMLCh StatusCode::UNKNOWN_PRINCIPAL[] = //  urn:oasis:names:tc:SAML:2.0:status:UnknownPrincipal \r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,\r
+  chLatin_U, chLatin_n, chLatin_k, chLatin_n, chLatin_o, chLatin_w, chLatin_n, \r
+    chLatin_P, chLatin_r, chLatin_i, chLatin_n, chLatin_c, chLatin_i, chLatin_p, chLatin_a, chLatin_l, chNull\r
+};\r
+\r
+const XMLCh StatusCode::UNSUPPORTED_BINDING[] = //  urn:oasis:names:tc:SAML:2.0:status:UnsupportedBinding \r
+{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,\r
+  chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,\r
+  chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,\r
+  chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,\r
+  chLatin_U, chLatin_n, chLatin_s, chLatin_u, chLatin_p, chLatin_p, chLatin_o, chLatin_r, chLatin_t, chLatin_e, chLatin_d, \r
+    chLatin_B, chLatin_i, chLatin_n, chLatin_d, chLatin_i, chLatin_n, chLatin_g, chNull\r
+};\r
+\r
index 4282bef..d25955f 100644 (file)
@@ -57,24 +57,24 @@ namespace opensaml {
             }
         };
 
-        BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,Request);
-            XMLOBJECTVALIDATOR_REQUIRE(Request,ID);
-            XMLOBJECTVALIDATOR_REQUIRE(Request,Version);
-            XMLOBJECTVALIDATOR_REQUIRE(Request,IssueInstant);
+        BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,RequestAbstractType);
+            XMLOBJECTVALIDATOR_REQUIRE(RequestAbstractType,ID);
+            XMLOBJECTVALIDATOR_REQUIRE(RequestAbstractType,Version);
+            XMLOBJECTVALIDATOR_REQUIRE(RequestAbstractType,IssueInstant);
             if (!XMLString::equals(SAMLConstants::SAML20_VERSION, ptr->getVersion()))
                 throw ValidationException("Request has wrong SAML Version.");
         END_XMLOBJECTVALIDATOR;
 
-        BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,SubjectQuery,Request);
-            RequestSchemaValidator::validate(xmlObject);
+        BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,SubjectQuery,RequestAbstractType);
+            RequestAbstractTypeSchemaValidator::validate(xmlObject);
             XMLOBJECTVALIDATOR_REQUIRE(SubjectQuery,Subject);
         END_XMLOBJECTVALIDATOR;
 
-        BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,StatusResponse);
-            XMLOBJECTVALIDATOR_REQUIRE(StatusResponse,ID);
-            XMLOBJECTVALIDATOR_REQUIRE(StatusResponse,Version);
-            XMLOBJECTVALIDATOR_REQUIRE(StatusResponse,IssueInstant);
-            XMLOBJECTVALIDATOR_REQUIRE(StatusResponse,Status);
+        BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,StatusResponseType);
+            XMLOBJECTVALIDATOR_REQUIRE(StatusResponseType,ID);
+            XMLOBJECTVALIDATOR_REQUIRE(StatusResponseType,Version);
+            XMLOBJECTVALIDATOR_REQUIRE(StatusResponseType,IssueInstant);
+            XMLOBJECTVALIDATOR_REQUIRE(StatusResponseType,Status);
             if (!XMLString::equals(SAMLConstants::SAML20_VERSION, ptr->getVersion()))
                 throw ValidationException("StatusResponse has wrong SAML Version.");
         END_XMLOBJECTVALIDATOR;
@@ -116,8 +116,8 @@ namespace opensaml {
             XMLOBJECTVALIDATOR_REQUIRE(Status,StatusCode);
         END_XMLOBJECTVALIDATOR;
 
-        BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,AssertionIDRequest,Request);
-            RequestSchemaValidator::validate(xmlObject);
+        BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,AssertionIDRequest,RequestAbstractType);
+            RequestAbstractTypeSchemaValidator::validate(xmlObject);
             XMLOBJECTVALIDATOR_NONEMPTY(AssertionIDRequest,AssertionIDRef);
         END_XMLOBJECTVALIDATOR;
 
@@ -163,57 +163,57 @@ namespace opensaml {
                 throw xmltooling::ValidationException("ProxyCount attribute on Scoping element must be non-negative"); 
         END_XMLOBJECTVALIDATOR;
 
-        BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,AuthnRequest,Request);
-            RequestSchemaValidator::validate(xmlObject);
+        BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,AuthnRequest,RequestAbstractType);
+            RequestAbstractTypeSchemaValidator::validate(xmlObject);
             if (ptr->getAssertionConsumerServiceIndex().first 
                     && (ptr->getAssertionConsumerServiceURL()!=NULL || ptr->getProtocolBinding()!=NULL))
                 throw xmltooling::ValidationException("On AuthnRequest AssertionConsumerServiceIndex is mutually exclusive with both AssertionConsumerServiceURL and ProtocolBinding");
         END_XMLOBJECTVALIDATOR;
 
-        BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,Response,StatusResponse);
-            StatusResponseSchemaValidator::validate(xmlObject);
+        BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,Response,StatusResponseType);
+            StatusResponseTypeSchemaValidator::validate(xmlObject);
         END_XMLOBJECTVALIDATOR;
 
-        BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,ArtifactResolve,Request);
-            RequestSchemaValidator::validate(xmlObject);
+        BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,ArtifactResolve,RequestAbstractType);
+            RequestAbstractTypeSchemaValidator::validate(xmlObject);
             XMLOBJECTVALIDATOR_REQUIRE(ArtifactResolve,Artifact);
         END_XMLOBJECTVALIDATOR;
 
-        BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,ArtifactResponse,StatusResponse);
-            StatusResponseSchemaValidator::validate(xmlObject);
+        BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,ArtifactResponse,StatusResponseType);
+            StatusResponseTypeSchemaValidator::validate(xmlObject);
         END_XMLOBJECTVALIDATOR;
 
         BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,NewEncryptedID);
             XMLOBJECTVALIDATOR_REQUIRE(NewEncryptedID,EncryptedData);
         END_XMLOBJECTVALIDATOR;
 
-        BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,ManageNameIDRequest,Request);
-            RequestSchemaValidator::validate(xmlObject);
+        BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,ManageNameIDRequest,RequestAbstractType);
+            RequestAbstractTypeSchemaValidator::validate(xmlObject);
             XMLOBJECTVALIDATOR_ONLYONEOF(ManageNameIDRequest,NameID,EncryptedID);
             XMLOBJECTVALIDATOR_ONLYONEOF3(ManageNameIDRequest,NewID,NewEncryptedID,Terminate);
         END_XMLOBJECTVALIDATOR;
 
-        BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,ManageNameIDResponse,StatusResponse);
-            StatusResponseSchemaValidator::validate(xmlObject);
+        BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,ManageNameIDResponse,StatusResponseType);
+            StatusResponseTypeSchemaValidator::validate(xmlObject);
         END_XMLOBJECTVALIDATOR;
 
-        BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,LogoutRequest,Request);
-            RequestSchemaValidator::validate(xmlObject);
+        BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,LogoutRequest,RequestAbstractType);
+            RequestAbstractTypeSchemaValidator::validate(xmlObject);
             XMLOBJECTVALIDATOR_ONLYONEOF3(LogoutRequest,BaseID,NameID,EncryptedID);
         END_XMLOBJECTVALIDATOR;
 
-        BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,LogoutResponse,StatusResponse);
-            StatusResponseSchemaValidator::validate(xmlObject);
+        BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,LogoutResponse,StatusResponseType);
+            StatusResponseTypeSchemaValidator::validate(xmlObject);
         END_XMLOBJECTVALIDATOR;
 
-        BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,NameIDMappingRequest,Request);
-            RequestSchemaValidator::validate(xmlObject);
+        BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,NameIDMappingRequest,RequestAbstractType);
+            RequestAbstractTypeSchemaValidator::validate(xmlObject);
             XMLOBJECTVALIDATOR_ONLYONEOF3(NameIDMappingRequest,BaseID,NameID,EncryptedID);
             XMLOBJECTVALIDATOR_REQUIRE(NameIDMappingRequest,NameIDPolicy);
         END_XMLOBJECTVALIDATOR;
 
-        BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,NameIDMappingResponse,StatusResponse);
-            StatusResponseSchemaValidator::validate(xmlObject);
+        BEGIN_XMLOBJECTVALIDATOR_SUB(SAML_DLLLOCAL,NameIDMappingResponse,StatusResponseType);
+            StatusResponseTypeSchemaValidator::validate(xmlObject);
             XMLOBJECTVALIDATOR_ONLYONEOF(NameIDMappingResponse,NameID,EncryptedID);
         END_XMLOBJECTVALIDATOR;
 
@@ -294,7 +294,6 @@ void opensaml::saml2p::registerProtocolClasses() {
     REGISTER_TYPE(Scoping);
     REGISTER_TYPE(Status);
     REGISTER_TYPE(StatusCode);
-    REGISTER_TYPE(StatusResponse);
     REGISTER_TYPE_NOVAL(StatusDetail);
     REGISTER_TYPE_NOVAL(Terminate);
 
index d81f080..50e65a2 100644 (file)
@@ -82,7 +82,6 @@ samltest_h = \
     saml2/core/impl/StatusCode20Test.h \
     saml2/core/impl/StatusDetail20Test.h \
     saml2/core/impl/StatusMessage20Test.h \
-    saml2/core/impl/StatusResponse20Test.h\
     saml2/core/impl/Subject20Test.h\
     saml2/core/impl/SubjectConfirmation20Test.h\
     saml2/core/impl/SubjectConfirmationData20Test.h\
diff --git a/samltest/saml2/core/impl/StatusResponse20Test.h b/samltest/saml2/core/impl/StatusResponse20Test.h
deleted file mode 100644 (file)
index 6c85449..0000000
+++ /dev/null
@@ -1,187 +0,0 @@
-/*\r
- *  Copyright 2001-2006 Internet2\r
- * \r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-#include "internal.h"\r
-#include <saml/saml2/core/Protocols.h>\r
-#include <saml/util/SAMLConstants.h>\r
-\r
-using namespace opensaml::saml2p;\r
-using namespace opensaml::saml2;\r
-\r
-/*\r
-   This tests building an element of type StatusResponseType with a non-SAML element name and namespace\r
- */\r
-\r
-class StatusResponse20Test : public CxxTest::TestSuite, public SAMLObjectBaseTestCase {\r
-    XMLCh* expectedID; \r
-    XMLCh* expectedInResponseTo; \r
-    XMLCh* expectedVersion; \r
-    XMLCh* expectedConsent; \r
-    XMLCh* expectedDestination; \r
-    DateTime* expectedIssueInstant; \r
-\r
-    //TODO possibly move these up to SAMLObjectBaseTestCase, for use in optional helper methods below\r
-    XMLCh* elementName;\r
-    XMLCh* elementNS;\r
-    XMLCh* elementPrefix;\r
-    const XMLCh* typeName;\r
-    const XMLCh* typeNS;\r
-    const XMLCh* typePrefix;\r
-\r
-public:\r
-    void setUp() {\r
-        expectedID = XMLString::transcode("def456"); \r
-        expectedInResponseTo = XMLString::transcode("abc123"); \r
-        expectedVersion = XMLString::transcode("2.0"); \r
-        expectedConsent = XMLString::transcode("urn:string:consent"); \r
-        expectedDestination = XMLString::transcode("http://sp.example.org/endpoint"); \r
-        expectedIssueInstant = new DateTime(XMLString::transcode("2006-02-21T16:40:00.000Z"));\r
-        expectedIssueInstant->parseDateTime();\r
-\r
-        elementName = XMLString::transcode("Foo");;\r
-        elementNS = XMLString::transcode("http://www.example.org/test");\r
-        elementPrefix = XMLString::transcode("test");;\r
-        typeName = StatusResponse::TYPE_NAME;\r
-        typeNS = SAMLConstants::SAML20P_NS;\r
-        typePrefix = SAMLConstants::SAML20P_PREFIX;\r
-\r
-        singleElementFile = data_path + "saml2/core/impl/StatusResponse.xml";\r
-        singleElementOptionalAttributesFile = data_path + "saml2/core/impl/StatusResponseOptionalAttributes.xml";\r
-        childElementsFile  = data_path + "saml2/core/impl/StatusResponseChildElements.xml";    \r
-        SAMLObjectBaseTestCase::setUp();\r
-    }\r
-    \r
-    void tearDown() {\r
-        XMLString::release(&expectedID);\r
-        XMLString::release(&expectedInResponseTo);\r
-        XMLString::release(&expectedVersion);\r
-        XMLString::release(&expectedConsent);\r
-        XMLString::release(&expectedDestination);\r
-        XMLString::release(&elementName);\r
-        XMLString::release(&elementNS);\r
-        XMLString::release(&elementPrefix);\r
-        delete expectedIssueInstant;\r
-        SAMLObjectBaseTestCase::tearDown();\r
-    }\r
-\r
-    //TODO possibly move this functionality up to SAMLObjectBaseTestCase, as optional helper method\r
-    void checkNameAndType(XMLObject* xo) {\r
-        assertEquals("Element name", elementName, xo->getElementQName().getLocalPart());\r
-        assertEquals("Element namespace", elementNS, xo->getElementQName().getNamespaceURI());\r
-        assertEquals("Element namespace prefix", elementPrefix, xo->getElementQName().getPrefix());\r
-\r
-        assertEquals("Schema type name", typeName, xo->getSchemaType()->getLocalPart());\r
-        assertEquals("Schema type namespace", typeNS, xo->getSchemaType()->getNamespaceURI());\r
-        assertEquals("Schema type namespace prefix", typePrefix, xo->getSchemaType()->getPrefix());\r
-    }\r
-\r
-    //TODO possibly move this functionality up to SAMLObjectBaseTestCase, as optional helper method\r
-    XMLObject * buildObject() {\r
-        const XMLObjectBuilder* builder = XMLObjectBuilder::getBuilder(QName(typeNS,typeName));\r
-        QName type(typeNS,typeName,typePrefix);\r
-        return builder->buildObject(elementNS, elementName, elementPrefix, &type);\r
-    }\r
-\r
-    void testSingleElementUnmarshall() {\r
-        auto_ptr<XMLObject> xo(unmarshallElement(singleElementFile));\r
-        StatusResponse* response = dynamic_cast<StatusResponse*>(xo.get());\r
-        TS_ASSERT(response!=NULL);\r
-\r
-        checkNameAndType(response);\r
-\r
-        assertEquals("ID attribute", expectedID, response->getID());\r
-        assertEquals("Version attribute", expectedVersion, response->getVersion());\r
-        TSM_ASSERT_EQUALS("IssueInstant attribute", expectedIssueInstant->getEpoch(), response->getIssueInstant()->getEpoch());\r
-\r
-        TS_ASSERT(response->getIssuer()==NULL);\r
-        TS_ASSERT(response->getSignature()==NULL);\r
-        TS_ASSERT(response->getExtensions()==NULL);\r
-        TS_ASSERT(response->getStatus()==NULL);\r
-    }\r
-\r
-    void testSingleElementOptionalAttributesUnmarshall() {\r
-        auto_ptr<XMLObject> xo(unmarshallElement(singleElementOptionalAttributesFile));\r
-        StatusResponse* response = dynamic_cast<StatusResponse*>(xo.get());\r
-        TS_ASSERT(response!=NULL);\r
-\r
-        checkNameAndType(response);\r
-\r
-        assertEquals("Consent attribute", expectedConsent, response->getConsent());\r
-        assertEquals("Destination attribute", expectedDestination, response->getDestination());\r
-        assertEquals("InResponseTo attribute", expectedInResponseTo, response->getInResponseTo());\r
-\r
-        TS_ASSERT(response->getIssuer()==NULL);\r
-        TS_ASSERT(response->getSignature()==NULL);\r
-        TS_ASSERT(response->getExtensions()==NULL);\r
-        TS_ASSERT(response->getStatus()==NULL);\r
-    }\r
-\r
-    void testChildElementsUnmarshall() {\r
-        auto_ptr<XMLObject> xo(unmarshallElement(childElementsFile));\r
-        StatusResponse* response= dynamic_cast<StatusResponse*>(xo.get());\r
-        TS_ASSERT(response!=NULL);\r
-\r
-        checkNameAndType(response);\r
-\r
-        TS_ASSERT(response->getIssuer()!=NULL);\r
-        TS_ASSERT(response->getSignature()==NULL);\r
-        TS_ASSERT(response->getExtensions()==NULL);\r
-        TS_ASSERT(response->getStatus()!=NULL);\r
-    }\r
-\r
-    void testSingleElementMarshall() {\r
-        StatusResponse* response = dynamic_cast<StatusResponse*>(buildObject());\r
-        TS_ASSERT(response!=NULL);\r
-        checkNameAndType(response);\r
-\r
-        response->setID(expectedID);\r
-        response->setIssueInstant(expectedIssueInstant);\r
-        //response->setVersion(expectedVersion);\r
-        assertEquals(expectedDOM, response);\r
-    }\r
-\r
-    void testSingleElementOptionalAttributesMarshall() {\r
-        StatusResponse* response = dynamic_cast<StatusResponse*>(buildObject());\r
-        TS_ASSERT(response!=NULL);\r
-        checkNameAndType(response);\r
-\r
-        response->setID(expectedID);\r
-        response->setInResponseTo(expectedInResponseTo);\r
-        response->setIssueInstant(expectedIssueInstant);\r
-        //response->setVersion(expectedVersion);\r
-        response->setConsent(expectedConsent);\r
-        response->setDestination(expectedDestination);\r
-        response->setInResponseTo(expectedInResponseTo);\r
-        assertEquals(expectedOptionalAttributesDOM, response);\r
-    }\r
-\r
-    void testChildElementsMarshall() {\r
-        StatusResponse* response = dynamic_cast<StatusResponse*>(buildObject());\r
-        TS_ASSERT(response!=NULL);\r
-        checkNameAndType(response);\r
-\r
-        response->setID(expectedID);\r
-        response->setIssueInstant(expectedIssueInstant);\r
-        // Do this just so don't have to redeclare the saml namespace prefix on every child element in the control XML file\r
-        Namespace* ns = new Namespace(opensaml::SAMLConstants::SAML20_NS, opensaml::SAMLConstants::SAML20_PREFIX);\r
-        response->addNamespace(*ns);\r
-        response->setIssuer(IssuerBuilder::buildIssuer());\r
-        response->setStatus(StatusBuilder::buildStatus());\r
-        assertEquals(expectedChildElementsDOM, response);\r
-        delete ns;\r
-    }\r
-\r
-};\r
index cf9102d..eadeff8 100644 (file)
                                                        >\r
                                                </File>\r
                                                <File\r
-                                                       RelativePath=".\saml2\core\impl\StatusResponse20Test.cpp"\r
-                                                       >\r
-                                               </File>\r
-                                               <File\r
                                                        RelativePath=".\saml2\core\impl\Subject20Test.cpp"\r
                                                        >\r
                                                </File>\r
                                                        </FileConfiguration>\r
                                                </File>\r
                                                <File\r
-                                                       RelativePath=".\saml2\core\impl\StatusResponse20Test.h"\r
-                                                       >\r
-                                                       <FileConfiguration\r
-                                                               Name="Debug|Win32"\r
-                                                               >\r
-                                                               <Tool\r
-                                                                       Name="VCCustomBuildTool"\r
-                                                                       CommandLine="\perl\bin\perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o &quot;$(InputDir)$(InputName)&quot;.cpp &quot;$(InputPath)&quot;&#x0D;&#x0A;"\r
-                                                                       Outputs="&quot;$(InputDir)$(InputName)&quot;.cpp"\r
-                                                               />\r
-                                                       </FileConfiguration>\r
-                                                       <FileConfiguration\r
-                                                               Name="Release|Win32"\r
-                                                               >\r
-                                                               <Tool\r
-                                                                       Name="VCCustomBuildTool"\r
-                                                                       CommandLine="\perl\bin\perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o &quot;$(InputDir)$(InputName)&quot;.cpp &quot;$(InputPath)&quot;&#x0D;&#x0A;"\r
-                                                                       Outputs="&quot;$(InputDir)$(InputName)&quot;.cpp"\r
-                                                               />\r
-                                                       </FileConfiguration>\r
-                                               </File>\r
-                                               <File\r
                                                        RelativePath=".\saml2\core\impl\Subject20Test.h"\r
                                                        >\r
                                                        <FileConfiguration\r