Add Status base class.
[shibboleth/cpp-opensaml.git] / saml / saml2 / core / impl / Protocols20Impl.cpp
1 /**
2  * Licensed to the University Corporation for Advanced Internet
3  * Development, Inc. (UCAID) under one or more contributor license
4  * agreements. See the NOTICE file distributed with this work for
5  * additional information regarding copyright ownership.
6  *
7  * UCAID licenses this file to you under the Apache License,
8  * Version 2.0 (the "License"); you may not use this file except
9  * in compliance with the License. You may obtain a copy of the
10  * License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing,
15  * software distributed under the License is distributed on an
16  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
17  * either express or implied. See the License for the specific
18  * language governing permissions and limitations under the License.
19  */
20
21 /**
22  * Protocols20Impl.cpp
23  * 
24  * Implementation classes for SAML 2.0 Protocols schema.
25  */
26
27 #include "internal.h"
28 #include "exceptions.h"
29 #include "saml2/core/Protocols.h"
30 #include "signature/ContentReference.h"
31
32 #include <xmltooling/AbstractComplexElement.h>
33 #include <xmltooling/AbstractSimpleElement.h>
34 #include <xmltooling/encryption/Encryption.h>
35 #include <xmltooling/impl/AnyElement.h>
36 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
37 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
38 #include <xmltooling/signature/Signature.h>
39 #include <xmltooling/util/DateTime.h>
40 #include <xmltooling/util/XMLHelper.h>
41
42 #include <ctime>
43 #include <boost/lambda/bind.hpp>
44 #include <boost/lambda/if.hpp>
45 #include <boost/lambda/lambda.hpp>
46 #include <xercesc/util/XMLUniDefs.hpp>
47
48 using namespace opensaml::saml2p;
49 using namespace xmltooling;
50 using namespace std;
51 using xmlconstants::XMLSIG_NS;
52 using xmlconstants::XMLENC_NS;
53 using xmlconstants::XML_BOOL_NULL;
54 using samlconstants::SAML20_NS;
55 using samlconstants::SAML20P_NS;
56
57 #if defined (_MSC_VER)
58     #pragma warning( push )
59     #pragma warning( disable : 4250 4251 )
60 #endif
61
62 namespace opensaml {
63     namespace saml2p {
64
65         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Artifact);
66         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,GetComplete);
67         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,NewID);
68         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,RequesterID);
69         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,SessionIndex);
70         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,StatusMessage);
71
72         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,RespondTo);
73
74         //TODO need unit test for this, using objects from another namespace
75         class SAML_DLLLOCAL ExtensionsImpl : public virtual Extensions,
76              public AbstractComplexElement,
77              public AbstractDOMCachingXMLObject,
78              public AbstractXMLObjectMarshaller,
79              public AbstractXMLObjectUnmarshaller
80         {
81         public:
82             virtual ~ExtensionsImpl() {}
83     
84             ExtensionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
85                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
86                 
87             ExtensionsImpl(const ExtensionsImpl& src)
88                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
89                 IMPL_CLONE_XMLOBJECT_CHILDREN(UnknownXMLObject);
90             }
91             
92             IMPL_XMLOBJECT_CLONE(Extensions);
93             IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
94     
95         protected:
96             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
97                 // Unknown child.
98                 const XMLCh* nsURI=root->getNamespaceURI();
99                 if (!XMLString::equals(nsURI,SAML20P_NS) && nsURI && *nsURI) {
100                     getUnknownXMLObjects().push_back(childXMLObject);
101                     return;
102                 }
103                 
104                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
105             }
106         };
107
108         class SAML_DLLLOCAL StatusCodeImpl : public virtual StatusCode,
109              public AbstractComplexElement,
110              public AbstractDOMCachingXMLObject,
111              public AbstractXMLObjectMarshaller,
112              public AbstractXMLObjectUnmarshaller
113         {
114             void init() {
115                 m_Value=nullptr;
116                 m_StatusCode=nullptr;
117                 m_children.push_back(nullptr);
118                 m_pos_StatusCode=m_children.begin();
119             }
120
121         public:
122             virtual ~StatusCodeImpl() {
123                 XMLString::release(&m_Value);
124             }
125
126             StatusCodeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
127                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
128                 init();
129             }
130
131             StatusCodeImpl(const StatusCodeImpl& src)
132                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
133                 init();
134                 IMPL_CLONE_ATTRIB(Value);
135                 IMPL_CLONE_TYPED_CHILD(StatusCode);
136             }
137
138             IMPL_XMLOBJECT_CLONE(StatusCode);
139             IMPL_STRING_ATTRIB(Value);
140             IMPL_TYPED_CHILD(StatusCode);
141
142         protected:
143             void marshallAttributes(DOMElement* domElement) const {
144                 MARSHALL_STRING_ATTRIB(Value,VALUE,nullptr);
145             }
146
147             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
148                 PROC_TYPED_CHILD(StatusCode,SAML20P_NS,false);
149                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
150             }
151
152             void processAttribute(const DOMAttr* attribute) {
153                 PROC_STRING_ATTRIB(Value,VALUE,nullptr);
154                 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
155             }
156         };
157
158         class SAML_DLLLOCAL StatusDetailImpl : public virtual StatusDetail,
159             public AbstractComplexElement,
160             public AbstractDOMCachingXMLObject,
161             public AbstractXMLObjectMarshaller,
162             public AbstractXMLObjectUnmarshaller
163         {
164         public:
165             virtual ~StatusDetailImpl() {}
166
167             StatusDetailImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
168                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
169
170             StatusDetailImpl(const StatusDetailImpl& src)
171                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
172                 IMPL_CLONE_XMLOBJECT_CHILDREN(UnknownXMLObject);
173             }
174
175             IMPL_XMLOBJECT_CLONE(StatusDetail);
176             IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
177
178         protected:
179             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
180                 getUnknownXMLObjects().push_back(childXMLObject);
181             }
182         };
183
184
185         class SAML_DLLLOCAL StatusImpl : public virtual Status,
186              public AbstractComplexElement,
187              public AbstractDOMCachingXMLObject,
188              public AbstractXMLObjectMarshaller,
189              public AbstractXMLObjectUnmarshaller
190         {
191             void init() {
192                 m_StatusCode=nullptr;
193                 m_StatusMessage=nullptr;
194                 m_StatusDetail=nullptr;
195                 m_children.push_back(nullptr);
196                 m_children.push_back(nullptr);
197                 m_children.push_back(nullptr);
198                 m_pos_StatusCode=m_children.begin();
199                 m_pos_StatusMessage=m_pos_StatusCode;
200                 ++m_pos_StatusMessage;
201                 m_pos_StatusDetail=m_pos_StatusMessage;
202                 ++m_pos_StatusDetail;
203             }
204
205         public:
206             virtual ~StatusImpl() {}
207     
208             StatusImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
209                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
210                 init();
211             }
212                 
213             StatusImpl(const StatusImpl& src) : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
214                 init();
215                 IMPL_CLONE_TYPED_CHILD(StatusCode);
216                 IMPL_CLONE_TYPED_CHILD(StatusMessage);
217                 IMPL_CLONE_TYPED_CHILD(StatusDetail);
218             }
219             
220             IMPL_XMLOBJECT_CLONE(Status);
221             IMPL_TYPED_CHILD(StatusCode);
222             IMPL_TYPED_CHILD(StatusMessage);
223             IMPL_TYPED_CHILD(StatusDetail);
224     
225             // Base class methods.
226             const XMLCh* getTopStatus() const {
227                 return getStatusCode() ? getStatusCode()->getValue() : nullptr;
228             }
229             const XMLCh* getSubStatus() const {
230                 const StatusCode* sc = getStatusCode() ? getStatusCode()->getStatusCode() : nullptr;
231                 return sc ? sc->getValue() : nullptr;
232             }
233             bool hasAdditionalStatus() const {
234                 return (getStatusCode() && getStatusCode()->getStatusCode() && getStatusCode()->getStatusCode()->getStatusCode());
235             }
236             const XMLCh* getMessage() const {
237                 return getStatusMessage() ? getStatusMessage()->getMessage() : nullptr;
238             }
239
240         protected:
241             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
242                 PROC_TYPED_CHILD(StatusCode,SAML20P_NS,false);
243                 PROC_TYPED_CHILD(StatusMessage,SAML20P_NS,false);
244                 PROC_TYPED_CHILD(StatusDetail,SAML20P_NS,false);
245                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
246             }
247         };
248
249
250         class SAML_DLLLOCAL RequestAbstractTypeImpl : public virtual RequestAbstractType,
251             public AbstractComplexElement,
252             public AbstractDOMCachingXMLObject,
253             public AbstractXMLObjectMarshaller,
254             public AbstractXMLObjectUnmarshaller
255         {
256             void init() {
257                 m_ID=nullptr;
258                 m_Version=nullptr;
259                 m_IssueInstant=nullptr;
260                 m_Destination=nullptr;
261                 m_Consent=nullptr;
262                 m_Issuer=nullptr;
263                 m_Signature=nullptr;
264                 m_Extensions=nullptr;
265                 m_children.push_back(nullptr);
266                 m_children.push_back(nullptr);
267                 m_children.push_back(nullptr);
268                 m_pos_Issuer=m_children.begin();
269                 m_pos_Signature=m_pos_Issuer;
270                 ++m_pos_Signature;
271                 m_pos_Extensions=m_pos_Signature;
272                 ++m_pos_Extensions;
273             }
274
275         protected:
276             RequestAbstractTypeImpl() {
277                 init();
278             }
279
280         public:
281             virtual ~RequestAbstractTypeImpl() {
282                 XMLString::release(&m_ID);
283                 XMLString::release(&m_Version);
284                 XMLString::release(&m_Destination);
285                 XMLString::release(&m_Consent);
286                 delete m_IssueInstant;
287             }
288     
289             RequestAbstractTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
290                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
291                 init();
292             }
293                 
294             RequestAbstractTypeImpl(const RequestAbstractTypeImpl& src)
295                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
296                 init();
297             }
298
299             void _clone(const RequestAbstractTypeImpl& src) {
300                 IMPL_CLONE_ATTRIB(ID);
301                 IMPL_CLONE_ATTRIB(Version);
302                 IMPL_CLONE_ATTRIB(IssueInstant);
303                 IMPL_CLONE_ATTRIB(Destination);
304                 IMPL_CLONE_ATTRIB(Consent);
305                 IMPL_CLONE_TYPED_CHILD(Issuer);
306                 IMPL_CLONE_TYPED_CHILD(Signature);
307                 IMPL_CLONE_TYPED_CHILD(Extensions);
308             }
309             
310             //IMPL_TYPED_CHILD(Signature);
311             // Need customized setter.
312         protected:
313             xmlsignature::Signature* m_Signature;
314             list<XMLObject*>::iterator m_pos_Signature;
315         public:
316             xmlsignature::Signature* getSignature() const {
317                 return m_Signature;
318             }
319             
320             void setSignature(xmlsignature::Signature* sig) {
321                 prepareForAssignment(m_Signature,sig);
322                 *m_pos_Signature=m_Signature=sig;
323                 // Sync content reference back up.
324                 if (m_Signature)
325                     m_Signature->setContentReference(new opensaml::ContentReference(*this));
326             }
327
328             RequestAbstractType* cloneRequestAbstractType() const {
329                 return dynamic_cast<RequestAbstractType*>(clone());
330             }
331             
332             IMPL_STRING_ATTRIB(Version);
333             IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
334             IMPL_DATETIME_ATTRIB(IssueInstant,0);
335             IMPL_STRING_ATTRIB(Destination);
336             IMPL_STRING_ATTRIB(Consent);
337             IMPL_TYPED_FOREIGN_CHILD(Issuer,saml2);
338             IMPL_TYPED_CHILD(Extensions);
339     
340         protected:
341             void prepareForMarshalling() const {
342                 if (m_Signature)
343                     declareNonVisibleNamespaces();
344             }
345
346             void marshallAttributes(DOMElement* domElement) const {
347                 if (!m_Version)
348                     const_cast<RequestAbstractTypeImpl*>(this)->m_Version=XMLString::transcode("2.0");
349                 MARSHALL_STRING_ATTRIB(Version,VER,nullptr);
350                 if (!m_ID)
351                     const_cast<RequestAbstractTypeImpl*>(this)->m_ID=SAMLConfig::getConfig().generateIdentifier();
352                 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
353                 if (!m_IssueInstant) {
354                     const_cast<RequestAbstractTypeImpl*>(this)->m_IssueInstantEpoch=time(nullptr);
355                     const_cast<RequestAbstractTypeImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
356                 }
357                 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,nullptr);
358                 MARSHALL_STRING_ATTRIB(Destination,DESTINATION,nullptr);
359                 MARSHALL_STRING_ATTRIB(Consent,CONSENT,nullptr);
360             }
361     
362             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
363                 PROC_TYPED_FOREIGN_CHILD(Issuer,saml2,SAML20_NS,false);
364                 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
365                 PROC_TYPED_CHILD(Extensions,SAML20P_NS,false);
366                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
367             }
368     
369             void processAttribute(const DOMAttr* attribute) {
370                 PROC_ID_ATTRIB(ID,ID,nullptr);
371                 PROC_STRING_ATTRIB(Version,VER,nullptr);
372                 PROC_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,nullptr);
373                 PROC_STRING_ATTRIB(Destination,DESTINATION,nullptr);
374                 PROC_STRING_ATTRIB(Consent,CONSENT,nullptr);
375                 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
376             }
377         };
378
379
380         class SAML_DLLLOCAL AssertionIDRequestImpl : public virtual AssertionIDRequest, public RequestAbstractTypeImpl
381         {
382         public:
383             virtual ~AssertionIDRequestImpl() {}
384     
385             AssertionIDRequestImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
386                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
387                 
388             AssertionIDRequestImpl(const AssertionIDRequestImpl& src) : AbstractXMLObject(src), RequestAbstractTypeImpl(src) {}
389
390             void _clone(const AssertionIDRequestImpl& src) {
391                 RequestAbstractTypeImpl::_clone(src);
392                 IMPL_CLONE_TYPED_FOREIGN_CHILDREN(AssertionIDRef,saml2);
393             }
394             
395             IMPL_XMLOBJECT_CLONE_EX(AssertionIDRequest);
396             IMPL_TYPED_FOREIGN_CHILDREN(AssertionIDRef,saml2,m_children.end());
397     
398         protected:
399             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
400                 PROC_TYPED_FOREIGN_CHILDREN(AssertionIDRef,saml2,SAML20_NS,false);
401                 RequestAbstractTypeImpl::processChildElement(childXMLObject,root);
402             }
403         };
404
405         class SAML_DLLLOCAL SubjectQueryImpl : public virtual SubjectQuery, public RequestAbstractTypeImpl
406         {
407             void init() {
408                 m_Subject = nullptr;
409                 m_children.push_back(nullptr);
410                 m_pos_Subject = m_pos_Extensions;
411                 ++m_pos_Subject;
412             }
413
414         protected:
415             SubjectQueryImpl() {
416                 init();
417             }
418
419         public:
420             virtual ~SubjectQueryImpl() {}
421     
422             SubjectQueryImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
423                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
424                 init();
425             }
426                 
427             SubjectQueryImpl(const SubjectQueryImpl& src) : AbstractXMLObject(src), RequestAbstractTypeImpl(src) {
428                 init();
429             }
430
431             void _clone(const SubjectQueryImpl& src) {
432                 RequestAbstractTypeImpl::_clone(src);
433                 IMPL_CLONE_TYPED_CHILD(Subject);
434             }
435             
436             SubjectQuery* cloneSubjectQuery() const {
437                 return dynamic_cast<SubjectQuery*>(clone());
438             }
439
440             IMPL_TYPED_FOREIGN_CHILD(Subject,saml2);
441     
442         protected:
443             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
444                 PROC_TYPED_FOREIGN_CHILD(Subject,saml2,SAML20_NS,false);
445                 RequestAbstractTypeImpl::processChildElement(childXMLObject,root);
446             }
447         };
448
449         class SAML_DLLLOCAL RequestedAuthnContextImpl : public virtual RequestedAuthnContext,
450             public AbstractComplexElement,
451             public AbstractDOMCachingXMLObject,
452             public AbstractXMLObjectMarshaller,
453             public AbstractXMLObjectUnmarshaller
454         {
455             void init() {
456                 m_Comparison=nullptr;
457             }
458
459         public:
460             virtual ~RequestedAuthnContextImpl() {
461                 XMLString::release(&m_Comparison);
462             }
463     
464             RequestedAuthnContextImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
465                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
466                 init();
467             }
468                 
469             RequestedAuthnContextImpl(const RequestedAuthnContextImpl& src)
470                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
471                 init();
472                 IMPL_CLONE_ATTRIB(Comparison);
473                 IMPL_CLONE_CHILDBAG_BEGIN;
474                     IMPL_CLONE_TYPED_FOREIGN_CHILD_IN_BAG(AuthnContextClassRef,saml2);
475                     IMPL_CLONE_TYPED_FOREIGN_CHILD_IN_BAG(AuthnContextDeclRef,saml2);
476                 IMPL_CLONE_CHILDBAG_END;
477             }
478             
479             IMPL_XMLOBJECT_CLONE(RequestedAuthnContext);
480             IMPL_STRING_ATTRIB(Comparison);
481             IMPL_TYPED_FOREIGN_CHILDREN(AuthnContextClassRef,saml2,m_children.end());
482             IMPL_TYPED_FOREIGN_CHILDREN(AuthnContextDeclRef,saml2,m_children.end());
483     
484         protected:
485             void marshallAttributes(DOMElement* domElement) const {
486                 MARSHALL_STRING_ATTRIB(Comparison,COMPARISON,nullptr);
487             }
488     
489             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
490                 PROC_TYPED_FOREIGN_CHILDREN(AuthnContextClassRef,saml2,SAML20_NS,false);
491                 PROC_TYPED_FOREIGN_CHILDREN(AuthnContextDeclRef,saml2,SAML20_NS,false);
492                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
493             }
494     
495             void processAttribute(const DOMAttr* attribute) {
496                 PROC_STRING_ATTRIB(Comparison,COMPARISON,nullptr);
497                 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
498             }
499         };
500
501         class SAML_DLLLOCAL AuthnQueryImpl : public virtual AuthnQuery, public SubjectQueryImpl
502         {
503             void init() {
504                 m_SessionIndex=nullptr;
505                 m_RequestedAuthnContext=nullptr;
506                 m_children.push_back(nullptr);
507                 m_pos_RequestedAuthnContext = m_pos_Subject;
508                 ++m_pos_RequestedAuthnContext;
509                 
510             }
511
512         public:
513             virtual ~AuthnQueryImpl() {
514                 XMLString::release(&m_SessionIndex);
515             }
516     
517             AuthnQueryImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
518                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
519                 init();
520             }
521                 
522             AuthnQueryImpl(const AuthnQueryImpl& src) : AbstractXMLObject(src), SubjectQueryImpl(src) {
523                 init();
524             }
525
526             void _clone(const AuthnQueryImpl& src) {
527                 SubjectQueryImpl::_clone(src);
528                 IMPL_CLONE_ATTRIB(SessionIndex);
529                 IMPL_CLONE_TYPED_CHILD(RequestedAuthnContext);
530             }
531             
532             IMPL_XMLOBJECT_CLONE_EX(AuthnQuery);
533             IMPL_STRING_ATTRIB(SessionIndex);
534             IMPL_TYPED_CHILD(RequestedAuthnContext);
535     
536         protected:
537             void marshallAttributes(DOMElement* domElement) const {
538                 MARSHALL_STRING_ATTRIB(SessionIndex,SESSIONINDEX,nullptr);
539                 SubjectQueryImpl::marshallAttributes(domElement);
540             }
541     
542             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
543                 PROC_TYPED_CHILD(RequestedAuthnContext,SAML20P_NS,false);
544                 SubjectQueryImpl::processChildElement(childXMLObject,root);
545             }
546             void processAttribute(const DOMAttr* attribute) {
547                 PROC_STRING_ATTRIB(SessionIndex,SESSIONINDEX,nullptr);
548                 SubjectQueryImpl::processAttribute(attribute);
549             }
550         };
551
552         class SAML_DLLLOCAL AttributeQueryImpl : public virtual AttributeQuery, public SubjectQueryImpl
553         {
554         public:
555             virtual ~AttributeQueryImpl() {}
556     
557             AttributeQueryImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
558                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
559                 
560             AttributeQueryImpl(const AttributeQueryImpl& src) : AbstractXMLObject(src), SubjectQueryImpl(src) {}
561
562             void _clone(const AttributeQueryImpl& src) {
563                 SubjectQueryImpl::_clone(src);
564                 IMPL_CLONE_TYPED_FOREIGN_CHILDREN(Attribute,saml2);
565             }
566             
567             IMPL_XMLOBJECT_CLONE_EX(AttributeQuery);
568             IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
569     
570         protected:
571             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
572                 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
573                 SubjectQueryImpl::processChildElement(childXMLObject,root);
574             }
575         };
576
577         class SAML_DLLLOCAL AuthzDecisionQueryImpl : public virtual AuthzDecisionQuery, public SubjectQueryImpl
578         {
579             void init() {
580                 m_Resource=nullptr;
581                 m_Evidence=nullptr;
582                 m_children.push_back(nullptr);
583                 m_pos_Evidence=m_pos_Subject;
584                 ++m_pos_Evidence;   
585             }
586
587         public:
588             virtual ~AuthzDecisionQueryImpl() {
589                 XMLString::release(&m_Resource);
590             }
591     
592             AuthzDecisionQueryImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
593                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
594                 init();
595             }
596                 
597             AuthzDecisionQueryImpl(const AuthzDecisionQueryImpl& src) : AbstractXMLObject(src), SubjectQueryImpl(src) {
598                 init();
599             }
600
601             void _clone(const AuthzDecisionQueryImpl& src) {
602                 SubjectQueryImpl::_clone(src);
603                 IMPL_CLONE_ATTRIB(Resource);
604                 IMPL_CLONE_TYPED_CHILD(Evidence);
605                 IMPL_CLONE_TYPED_FOREIGN_CHILDREN(Action,saml2);
606             }
607             
608             IMPL_XMLOBJECT_CLONE_EX(AuthzDecisionQuery);
609             IMPL_STRING_ATTRIB(Resource);
610             IMPL_TYPED_FOREIGN_CHILDREN(Action,saml2,m_pos_Evidence);
611             IMPL_TYPED_FOREIGN_CHILD(Evidence,saml2);
612     
613         protected:
614             void marshallAttributes(DOMElement* domElement) const {
615                 MARSHALL_STRING_ATTRIB(Resource,RESOURCE,nullptr);
616                 SubjectQueryImpl::marshallAttributes(domElement);
617             }
618     
619             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
620                 PROC_TYPED_FOREIGN_CHILD(Evidence,saml2,SAML20_NS,false);
621                 PROC_TYPED_FOREIGN_CHILDREN(Action,saml2,SAML20_NS,false);
622                 SubjectQueryImpl::processChildElement(childXMLObject,root);
623             }
624             void processAttribute(const DOMAttr* attribute) {
625                 PROC_STRING_ATTRIB(Resource,RESOURCE,nullptr);
626                 SubjectQueryImpl::processAttribute(attribute);
627             }
628         };
629
630         class SAML_DLLLOCAL NameIDPolicyImpl : public virtual NameIDPolicy,
631             public AbstractSimpleElement,
632             public AbstractDOMCachingXMLObject,
633             public AbstractXMLObjectMarshaller,
634             public AbstractXMLObjectUnmarshaller
635         {
636             void init() {
637                 m_Format=nullptr;
638                 m_SPNameQualifier=nullptr;
639                 m_AllowCreate=XML_BOOL_NULL;
640             }
641
642         public:
643             virtual ~NameIDPolicyImpl() {
644                 XMLString::release(&m_Format);
645                 XMLString::release(&m_SPNameQualifier);
646             }
647
648             NameIDPolicyImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
649                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
650                 init();
651             }
652
653             NameIDPolicyImpl(const NameIDPolicyImpl& src)
654                     : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
655                 init();
656                 IMPL_CLONE_ATTRIB(Format);
657                 IMPL_CLONE_ATTRIB(SPNameQualifier);
658                 IMPL_CLONE_BOOLEAN_ATTRIB(AllowCreate);
659             }
660
661             IMPL_XMLOBJECT_CLONE(NameIDPolicy);
662             IMPL_STRING_ATTRIB(Format);
663             IMPL_STRING_ATTRIB(SPNameQualifier);
664             IMPL_BOOLEAN_ATTRIB(AllowCreate);
665
666         protected:
667             void marshallAttributes(DOMElement* domElement) const {
668                 MARSHALL_STRING_ATTRIB(Format,FORMAT,nullptr);
669                 MARSHALL_STRING_ATTRIB(SPNameQualifier,SPNAMEQUALIFIER,nullptr);
670                 MARSHALL_BOOLEAN_ATTRIB(AllowCreate,ALLOWCREATE,nullptr);
671             }
672
673             void processAttribute(const DOMAttr* attribute) {
674                 PROC_STRING_ATTRIB(Format,FORMAT,nullptr);
675                 PROC_STRING_ATTRIB(SPNameQualifier,SPNAMEQUALIFIER,nullptr);
676                 PROC_BOOLEAN_ATTRIB(AllowCreate,ALLOWCREATE,nullptr);
677                 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
678             }
679         };
680
681         class SAML_DLLLOCAL IDPEntryImpl : public virtual IDPEntry,
682             public AbstractSimpleElement,
683             public AbstractDOMCachingXMLObject,
684             public AbstractXMLObjectMarshaller,
685             public AbstractXMLObjectUnmarshaller
686         {
687             void init() {
688                 m_ProviderID=nullptr;
689                 m_Name=nullptr;
690                 m_Loc=nullptr;
691             }
692
693         public:
694             virtual ~IDPEntryImpl() {
695                 XMLString::release(&m_ProviderID);
696                 XMLString::release(&m_Name);
697                 XMLString::release(&m_Loc);
698             }
699
700             IDPEntryImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
701                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
702                 init();
703             }
704
705             IDPEntryImpl(const IDPEntryImpl& src) : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
706                 init();
707                 IMPL_CLONE_ATTRIB(ProviderID);
708                 IMPL_CLONE_ATTRIB(Name);
709                 IMPL_CLONE_ATTRIB(Loc);
710             }
711
712             IMPL_XMLOBJECT_CLONE(IDPEntry);
713             IMPL_STRING_ATTRIB(ProviderID);
714             IMPL_STRING_ATTRIB(Name);
715             IMPL_STRING_ATTRIB(Loc);
716
717         protected:
718             void marshallAttributes(DOMElement* domElement) const {
719                 MARSHALL_STRING_ATTRIB(ProviderID,PROVIDERID,nullptr);
720                 MARSHALL_STRING_ATTRIB(Name,NAME,nullptr);
721                 MARSHALL_STRING_ATTRIB(Loc,LOC,nullptr);
722             }
723
724             void processAttribute(const DOMAttr* attribute) {
725                 PROC_STRING_ATTRIB(ProviderID,PROVIDERID,nullptr);
726                 PROC_STRING_ATTRIB(Name,NAME,nullptr);
727                 PROC_STRING_ATTRIB(Loc,LOC,nullptr);
728                 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
729             }
730         };
731
732         class SAML_DLLLOCAL IDPListImpl : public virtual IDPList,
733             public AbstractComplexElement,
734             public AbstractDOMCachingXMLObject,
735             public AbstractXMLObjectMarshaller,
736             public AbstractXMLObjectUnmarshaller
737         {
738             void init() {
739                 m_GetComplete=nullptr;
740                 m_children.push_back(nullptr);
741                 m_pos_GetComplete=m_children.begin();
742             }
743
744         public:
745             virtual ~IDPListImpl() {}
746     
747             IDPListImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
748                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
749                 init();
750             }
751                 
752             IDPListImpl(const IDPListImpl& src)
753                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
754                 init();
755                 IMPL_CLONE_TYPED_CHILD(GetComplete);
756                 IMPL_CLONE_TYPED_CHILDREN(IDPEntry);
757             }
758             
759             IMPL_XMLOBJECT_CLONE(IDPList);
760             IMPL_TYPED_CHILDREN(IDPEntry,m_pos_GetComplete);
761             IMPL_TYPED_CHILD(GetComplete);
762     
763         protected:
764             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
765                 PROC_TYPED_CHILDREN(IDPEntry,SAML20P_NS,false);
766                 PROC_TYPED_CHILD(GetComplete,SAML20P_NS,false);
767                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
768             }
769         };
770
771
772         class SAML_DLLLOCAL ScopingImpl : public virtual Scoping,
773             public AbstractComplexElement,
774             public AbstractDOMCachingXMLObject,
775             public AbstractXMLObjectMarshaller,
776             public AbstractXMLObjectUnmarshaller
777         {
778             void init() {
779                 m_ProxyCount=nullptr;
780                 m_IDPList=nullptr;
781                 m_children.push_back(nullptr);
782                 m_pos_IDPList=m_children.begin();
783             }
784
785         public:
786             virtual ~ScopingImpl() {
787                 XMLString::release(&m_ProxyCount); 
788             }
789     
790             ScopingImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
791                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
792                 init();
793             }
794                 
795             ScopingImpl(const ScopingImpl& src)
796                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
797                 init();
798                 IMPL_CLONE_INTEGER_ATTRIB(ProxyCount);
799                 IMPL_CLONE_TYPED_CHILD(IDPList);
800                 IMPL_CLONE_TYPED_CHILDREN(RequesterID);
801             }
802             
803             IMPL_XMLOBJECT_CLONE(Scoping);
804             IMPL_INTEGER_ATTRIB(ProxyCount);
805             IMPL_TYPED_CHILD(IDPList);
806             IMPL_TYPED_CHILDREN(RequesterID,m_children.end());
807     
808         protected:
809             void marshallAttributes(DOMElement* domElement) const {
810                 MARSHALL_INTEGER_ATTRIB(ProxyCount,PROXYCOUNT,nullptr);
811             }
812     
813             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
814                 PROC_TYPED_CHILD(IDPList,SAML20P_NS,false);
815                 PROC_TYPED_CHILDREN(RequesterID,SAML20P_NS,false);
816                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
817             }
818
819             void processAttribute(const DOMAttr* attribute) {
820                 PROC_INTEGER_ATTRIB(ProxyCount,PROXYCOUNT,nullptr);
821                 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
822             }
823         };
824
825         class SAML_DLLLOCAL AuthnRequestImpl : public virtual AuthnRequest, public RequestAbstractTypeImpl
826         {
827             void init() {
828                 m_ForceAuthn=XML_BOOL_NULL;
829                 m_IsPassive=XML_BOOL_NULL;
830                 m_ProtocolBinding=nullptr;
831                 m_AssertionConsumerServiceIndex=nullptr;
832                 m_AssertionConsumerServiceURL=nullptr;
833                 m_AttributeConsumingServiceIndex=nullptr;
834                 m_ProviderName=nullptr;
835
836                 m_Subject=nullptr;
837                 m_NameIDPolicy=nullptr;
838                 m_Conditions=nullptr;
839                 m_RequestedAuthnContext=nullptr;
840                 m_Scoping=nullptr;
841                 m_children.push_back(nullptr);
842                 m_children.push_back(nullptr);
843                 m_children.push_back(nullptr);
844                 m_children.push_back(nullptr);
845                 m_children.push_back(nullptr);
846                 m_pos_Subject=m_pos_Extensions;
847                 ++m_pos_Subject;
848                 m_pos_NameIDPolicy=m_pos_Subject;
849                 ++m_pos_NameIDPolicy;
850                 m_pos_Conditions=m_pos_NameIDPolicy;
851                 ++m_pos_Conditions;
852                 m_pos_RequestedAuthnContext=m_pos_Conditions;
853                 ++m_pos_RequestedAuthnContext;
854                 m_pos_Scoping=m_pos_RequestedAuthnContext;
855                 ++m_pos_Scoping;
856             }
857
858         public:
859             virtual ~AuthnRequestImpl() {
860                 XMLString::release(&m_ProtocolBinding);
861                 XMLString::release(&m_AssertionConsumerServiceURL);
862                 XMLString::release(&m_ProviderName);
863                 XMLString::release(&m_AssertionConsumerServiceIndex);
864                 XMLString::release(&m_AttributeConsumingServiceIndex);
865             }
866     
867             AuthnRequestImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
868                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
869                 init();
870             }
871                 
872             AuthnRequestImpl(const AuthnRequestImpl& src) : AbstractXMLObject(src), RequestAbstractTypeImpl(src) {
873                 init();
874             }
875
876             void _clone(const AuthnRequestImpl& src) {
877                 RequestAbstractTypeImpl::_clone(src);
878                 IMPL_CLONE_BOOLEAN_ATTRIB(ForceAuthn);
879                 IMPL_CLONE_BOOLEAN_ATTRIB(IsPassive);
880                 IMPL_CLONE_ATTRIB(ProtocolBinding);
881                 IMPL_CLONE_INTEGER_ATTRIB(AssertionConsumerServiceIndex);
882                 IMPL_CLONE_ATTRIB(AssertionConsumerServiceURL);
883                 IMPL_CLONE_INTEGER_ATTRIB(AttributeConsumingServiceIndex);
884                 IMPL_CLONE_ATTRIB(ProviderName);
885                 IMPL_CLONE_TYPED_CHILD(Subject);
886                 IMPL_CLONE_TYPED_CHILD(NameIDPolicy);
887                 IMPL_CLONE_TYPED_CHILD(Conditions);
888                 IMPL_CLONE_TYPED_CHILD(RequestedAuthnContext);
889                 IMPL_CLONE_TYPED_CHILD(Scoping);
890             }
891             
892             IMPL_XMLOBJECT_CLONE_EX(AuthnRequest);
893
894             IMPL_BOOLEAN_ATTRIB(ForceAuthn);
895             IMPL_BOOLEAN_ATTRIB(IsPassive);
896             IMPL_STRING_ATTRIB(ProtocolBinding);
897             IMPL_INTEGER_ATTRIB(AssertionConsumerServiceIndex);
898             IMPL_STRING_ATTRIB(AssertionConsumerServiceURL);
899             IMPL_INTEGER_ATTRIB(AttributeConsumingServiceIndex);
900             IMPL_STRING_ATTRIB(ProviderName);
901
902             IMPL_TYPED_FOREIGN_CHILD(Subject,saml2);
903             IMPL_TYPED_CHILD(NameIDPolicy);
904             IMPL_TYPED_FOREIGN_CHILD(Conditions,saml2);
905             IMPL_TYPED_CHILD(RequestedAuthnContext);
906             IMPL_TYPED_CHILD(Scoping);
907     
908         protected:
909             void marshallAttributes(DOMElement* domElement) const {
910                 MARSHALL_BOOLEAN_ATTRIB(ForceAuthn,FORCEAUTHN,nullptr);
911                 MARSHALL_BOOLEAN_ATTRIB(IsPassive,ISPASSIVE,nullptr);
912                 MARSHALL_STRING_ATTRIB(ProtocolBinding,PROTOCOLBINDING,nullptr);
913                 MARSHALL_INTEGER_ATTRIB(AssertionConsumerServiceIndex,ASSERTIONCONSUMERSERVICEINDEX,nullptr);
914                 MARSHALL_STRING_ATTRIB(AssertionConsumerServiceURL,ASSERTIONCONSUMERSERVICEURL,nullptr);
915                 MARSHALL_INTEGER_ATTRIB(AttributeConsumingServiceIndex,ATTRIBUTECONSUMINGSERVICEINDEX,nullptr);
916                 MARSHALL_STRING_ATTRIB(ProviderName,PROVIDERNAME,nullptr);
917                 RequestAbstractTypeImpl::marshallAttributes(domElement);
918             }
919     
920             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
921                 PROC_TYPED_FOREIGN_CHILD(Subject,saml2,SAML20_NS,false);
922                 PROC_TYPED_CHILD(NameIDPolicy,SAML20P_NS,false);
923                 PROC_TYPED_FOREIGN_CHILD(Conditions,saml2,SAML20_NS,false);
924                 PROC_TYPED_CHILD(RequestedAuthnContext,SAML20P_NS,false);
925                 PROC_TYPED_CHILD(Scoping,SAML20P_NS,false);
926                 RequestAbstractTypeImpl::processChildElement(childXMLObject,root);
927             }
928             void processAttribute(const DOMAttr* attribute) {
929                 PROC_BOOLEAN_ATTRIB(ForceAuthn,FORCEAUTHN,nullptr);
930                 PROC_BOOLEAN_ATTRIB(IsPassive,ISPASSIVE,nullptr);
931                 PROC_STRING_ATTRIB(ProtocolBinding,PROTOCOLBINDING,nullptr);
932                 PROC_INTEGER_ATTRIB(AssertionConsumerServiceIndex,ASSERTIONCONSUMERSERVICEINDEX,nullptr);
933                 PROC_STRING_ATTRIB(AssertionConsumerServiceURL,ASSERTIONCONSUMERSERVICEURL,nullptr);
934                 PROC_INTEGER_ATTRIB(AttributeConsumingServiceIndex,ATTRIBUTECONSUMINGSERVICEINDEX,nullptr);
935                 PROC_STRING_ATTRIB(ProviderName,PROVIDERNAME,nullptr);
936                 RequestAbstractTypeImpl::processAttribute(attribute);
937             }
938         };
939
940         class SAML_DLLLOCAL StatusResponseTypeImpl : public virtual StatusResponseType,
941             public AbstractComplexElement,
942             public AbstractDOMCachingXMLObject,
943             public AbstractXMLObjectMarshaller,
944             public AbstractXMLObjectUnmarshaller
945         {
946             void init() {
947                 m_ID=nullptr;
948                 m_InResponseTo=nullptr;
949                 m_Version=nullptr;
950                 m_IssueInstant=nullptr;
951                 m_Destination=nullptr;
952                 m_Consent=nullptr;
953                 m_Issuer=nullptr;
954                 m_Signature=nullptr;
955                 m_Extensions=nullptr;
956                 m_Status=nullptr;
957                 m_children.push_back(nullptr);
958                 m_children.push_back(nullptr);
959                 m_children.push_back(nullptr);
960                 m_children.push_back(nullptr);
961                 m_pos_Issuer=m_children.begin();
962                 m_pos_Signature=m_pos_Issuer;
963                 ++m_pos_Signature;
964                 m_pos_Extensions=m_pos_Signature;
965                 ++m_pos_Extensions;
966                 m_pos_Status=m_pos_Extensions;
967                 ++m_pos_Status;
968             }
969
970         protected:
971             StatusResponseTypeImpl() {
972                 init();
973             }
974
975         public:
976             virtual ~StatusResponseTypeImpl() {
977                 XMLString::release(&m_ID);
978                 XMLString::release(&m_InResponseTo);
979                 XMLString::release(&m_Version);
980                 XMLString::release(&m_Destination);
981                 XMLString::release(&m_Consent);
982                 delete m_IssueInstant;
983             }
984     
985             StatusResponseTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
986                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
987                 init();
988             }
989                 
990             StatusResponseTypeImpl(const StatusResponseTypeImpl& src)
991                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
992                 init();
993             }
994
995             void _clone(const StatusResponseTypeImpl& src) {
996                 IMPL_CLONE_ATTRIB(ID);
997                 IMPL_CLONE_ATTRIB(InResponseTo);
998                 IMPL_CLONE_ATTRIB(Version);
999                 IMPL_CLONE_ATTRIB(IssueInstant);
1000                 IMPL_CLONE_ATTRIB(Destination);
1001                 IMPL_CLONE_ATTRIB(Consent);
1002                 IMPL_CLONE_TYPED_CHILD(Issuer);
1003                 IMPL_CLONE_TYPED_CHILD(Signature);
1004                 IMPL_CLONE_TYPED_CHILD(Extensions);
1005                 IMPL_CLONE_TYPED_CHILD(Status);
1006             }
1007             
1008             //IMPL_TYPED_CHILD(Signature);
1009             // Need customized setter.
1010         protected:
1011             xmlsignature::Signature* m_Signature;
1012             list<XMLObject*>::iterator m_pos_Signature;
1013         public:
1014             xmlsignature::Signature* getSignature() const {
1015                 return m_Signature;
1016             }
1017             
1018             void setSignature(xmlsignature::Signature* sig) {
1019                 prepareForAssignment(m_Signature,sig);
1020                 *m_pos_Signature=m_Signature=sig;
1021                 // Sync content reference back up.
1022                 if (m_Signature)
1023                     m_Signature->setContentReference(new opensaml::ContentReference(*this));
1024             }
1025             
1026             StatusResponseType* cloneStatusResponseType() const {
1027                 return dynamic_cast<StatusResponseType*>(clone());
1028             }
1029
1030             IMPL_STRING_ATTRIB(Version);
1031             IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
1032             IMPL_STRING_ATTRIB(InResponseTo);
1033             IMPL_DATETIME_ATTRIB(IssueInstant,0);
1034             IMPL_STRING_ATTRIB(Destination);
1035             IMPL_STRING_ATTRIB(Consent);
1036             IMPL_TYPED_FOREIGN_CHILD(Issuer,saml2);
1037             IMPL_TYPED_CHILD(Extensions);
1038             IMPL_TYPED_CHILD(Status);
1039     
1040         protected:
1041             void prepareForMarshalling() const {
1042                 if (m_Signature)
1043                     declareNonVisibleNamespaces();
1044             }
1045
1046             void marshallAttributes(DOMElement* domElement) const {
1047                 if (!m_Version)
1048                     const_cast<StatusResponseTypeImpl*>(this)->m_Version=XMLString::transcode("2.0");
1049                 MARSHALL_STRING_ATTRIB(Version,VER,nullptr);
1050                 if (!m_ID)
1051                     const_cast<StatusResponseTypeImpl*>(this)->m_ID=SAMLConfig::getConfig().generateIdentifier();
1052                 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
1053                 if (!m_IssueInstant) {
1054                     const_cast<StatusResponseTypeImpl*>(this)->m_IssueInstantEpoch=time(nullptr);
1055                     const_cast<StatusResponseTypeImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
1056                 }
1057                 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,nullptr);
1058                 MARSHALL_STRING_ATTRIB(Destination,DESTINATION,nullptr);
1059                 MARSHALL_STRING_ATTRIB(Consent,CONSENT,nullptr);
1060                 MARSHALL_STRING_ATTRIB(InResponseTo,INRESPONSETO,nullptr);
1061             }
1062     
1063             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1064                 PROC_TYPED_FOREIGN_CHILD(Issuer,saml2,SAML20_NS,false);
1065                 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
1066                 PROC_TYPED_CHILD(Extensions,SAML20P_NS,false);
1067                 PROC_TYPED_CHILD(Status,SAML20P_NS,false);
1068                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1069             }
1070     
1071             void processAttribute(const DOMAttr* attribute) {
1072                 PROC_ID_ATTRIB(ID,ID,nullptr);
1073                 PROC_STRING_ATTRIB(Version,VER,nullptr);
1074                 PROC_STRING_ATTRIB(InResponseTo,INRESPONSETO,nullptr);
1075                 PROC_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,nullptr);
1076                 PROC_STRING_ATTRIB(Destination,DESTINATION,nullptr);
1077                 PROC_STRING_ATTRIB(Consent,CONSENT,nullptr);
1078                 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1079             }
1080         };
1081
1082         class SAML_DLLLOCAL ResponseImpl : public virtual Response, public StatusResponseTypeImpl
1083         {
1084         public:
1085             virtual ~ResponseImpl() {}
1086     
1087             ResponseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1088                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1089                 
1090             ResponseImpl(const ResponseImpl& src) : AbstractXMLObject(src), StatusResponseTypeImpl(src) {}
1091
1092             void _clone(const ResponseImpl& src) {
1093                 StatusResponseTypeImpl::_clone(src);
1094                 IMPL_CLONE_CHILDBAG_BEGIN;
1095                     IMPL_CLONE_TYPED_FOREIGN_CHILD_IN_BAG(Assertion,saml2);
1096                     IMPL_CLONE_TYPED_FOREIGN_CHILD_IN_BAG(EncryptedAssertion,saml2);
1097                 IMPL_CLONE_CHILDBAG_END;
1098             }
1099             
1100             IMPL_XMLOBJECT_CLONE_EX(Response);
1101             IMPL_TYPED_FOREIGN_CHILDREN(Assertion,saml2,m_children.end());
1102             IMPL_TYPED_FOREIGN_CHILDREN(EncryptedAssertion,saml2,m_children.end());
1103     
1104         protected:
1105             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1106                 PROC_TYPED_FOREIGN_CHILDREN(Assertion,saml2,SAML20_NS,false);
1107                 PROC_TYPED_FOREIGN_CHILDREN(EncryptedAssertion,saml2,SAML20_NS,false);
1108                 StatusResponseTypeImpl::processChildElement(childXMLObject,root);
1109             }
1110         };
1111
1112         class SAML_DLLLOCAL ArtifactResolveImpl : public virtual ArtifactResolve, public RequestAbstractTypeImpl
1113         {
1114             void init() {
1115                 m_Artifact=nullptr;
1116                 m_children.push_back(nullptr);
1117                 m_pos_Artifact=m_pos_Extensions;
1118                 ++m_pos_Artifact;
1119             }
1120
1121         public:
1122             virtual ~ArtifactResolveImpl() {}
1123     
1124             ArtifactResolveImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1125                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1126                 init();
1127             }
1128                 
1129             ArtifactResolveImpl(const ArtifactResolveImpl& src) : AbstractXMLObject(src), RequestAbstractTypeImpl(src) {
1130                 init();
1131             }
1132
1133             void _clone(const ArtifactResolveImpl& src) {
1134                 RequestAbstractTypeImpl::_clone(src);
1135                 IMPL_CLONE_TYPED_CHILD(Artifact);
1136             }
1137             
1138             IMPL_XMLOBJECT_CLONE_EX(ArtifactResolve);
1139             IMPL_TYPED_CHILD(Artifact);
1140     
1141         protected:
1142             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1143                 PROC_TYPED_CHILD(Artifact,SAML20P_NS,false);
1144                 RequestAbstractTypeImpl::processChildElement(childXMLObject,root);
1145             }
1146         };
1147
1148         class SAML_DLLLOCAL ArtifactResponseImpl : public virtual ArtifactResponse, public StatusResponseTypeImpl
1149         {
1150             void init() {
1151                 m_Payload=nullptr;
1152                 m_children.push_back(nullptr);
1153                 m_pos_Payload=m_pos_Status;
1154                 ++m_pos_Payload;
1155             }
1156
1157         public:
1158             virtual ~ArtifactResponseImpl() {}
1159     
1160             ArtifactResponseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1161                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1162                 init();
1163             }
1164                 
1165             ArtifactResponseImpl(const ArtifactResponseImpl& src) : AbstractXMLObject(src), StatusResponseTypeImpl(src) {
1166                 init();
1167             }
1168
1169             void _clone(const ArtifactResponseImpl& src) {
1170                 StatusResponseTypeImpl::_clone(src);
1171                 IMPL_CLONE_XMLOBJECT_CHILD(Payload);
1172             }
1173             
1174             IMPL_XMLOBJECT_CLONE_EX(ArtifactResponse);
1175             IMPL_XMLOBJECT_CHILD(Payload);
1176     
1177         protected:
1178             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1179                 // These are valid elements for the parent StatusResponseType, so don't process these.
1180                 // If not one of these, then it must be the payload.
1181                 if (!XMLHelper::isNodeNamed(root,SAML20_NS,saml2::Issuer::LOCAL_NAME) &&
1182                     !XMLHelper::isNodeNamed(root,XMLSIG_NS,xmlsignature::Signature::LOCAL_NAME) &&
1183                     !XMLHelper::isNodeNamed(root,SAML20P_NS,saml2p::Extensions::LOCAL_NAME) &&
1184                     !XMLHelper::isNodeNamed(root,SAML20P_NS,saml2p::Status::LOCAL_NAME)) {
1185                     setPayload(childXMLObject);
1186                     return;
1187                 }
1188
1189                 StatusResponseTypeImpl::processChildElement(childXMLObject,root);
1190             }
1191         };
1192
1193         class SAML_DLLLOCAL NewEncryptedIDImpl : public virtual NewEncryptedID,
1194             public AbstractComplexElement,
1195             public AbstractDOMCachingXMLObject,
1196             public AbstractXMLObjectMarshaller,
1197             public AbstractXMLObjectUnmarshaller
1198         {
1199             void init() {
1200                 m_EncryptedData=nullptr;
1201                 m_children.push_back(nullptr);
1202                 m_pos_EncryptedData=m_children.begin();
1203             }
1204             
1205         protected:
1206             NewEncryptedIDImpl() {
1207                 init();
1208             }
1209             
1210         public:
1211             virtual ~NewEncryptedIDImpl() {}
1212     
1213             NewEncryptedIDImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1214                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1215                 init();
1216             }
1217                 
1218             NewEncryptedIDImpl(const NewEncryptedIDImpl& src)
1219                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1220                 init();
1221                 IMPL_CLONE_TYPED_CHILD(EncryptedData);
1222                 IMPL_CLONE_TYPED_FOREIGN_CHILDREN(EncryptedKey,xmlencryption);
1223             }
1224     
1225             IMPL_XMLOBJECT_CLONE2(NewEncryptedID,EncryptedElementType);
1226             IMPL_TYPED_FOREIGN_CHILD(EncryptedData,xmlencryption);
1227             IMPL_TYPED_FOREIGN_CHILDREN(EncryptedKey,xmlencryption,m_children.end());
1228     
1229         protected:
1230             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1231                 PROC_TYPED_FOREIGN_CHILD(EncryptedData,xmlencryption,XMLENC_NS,false);
1232                 PROC_TYPED_FOREIGN_CHILDREN(EncryptedKey,xmlencryption,XMLENC_NS,false);
1233                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1234             }
1235         };
1236
1237         class SAML_DLLLOCAL TerminateImpl : public virtual Terminate,
1238             public AbstractSimpleElement,
1239             public AbstractDOMCachingXMLObject,
1240             public AbstractXMLObjectMarshaller,
1241             public AbstractXMLObjectUnmarshaller
1242         {
1243         public:
1244             virtual ~TerminateImpl() {}
1245
1246             TerminateImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1247                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1248
1249             TerminateImpl(const TerminateImpl& src)
1250                 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {}
1251
1252             IMPL_XMLOBJECT_CLONE(Terminate);
1253
1254         protected:
1255             // has no attributes or children
1256         };
1257
1258         class SAML_DLLLOCAL ManageNameIDRequestImpl : public virtual ManageNameIDRequest, public RequestAbstractTypeImpl
1259         {
1260             void init() {
1261                 m_NameID=nullptr;
1262                 m_EncryptedID=nullptr;
1263                 m_NewID=nullptr;
1264                 m_NewEncryptedID=nullptr;
1265                 m_Terminate=nullptr;
1266                 m_children.push_back(nullptr);
1267                 m_children.push_back(nullptr);
1268                 m_children.push_back(nullptr);
1269                 m_children.push_back(nullptr);
1270                 m_children.push_back(nullptr);
1271                 m_pos_NameID=m_pos_Extensions;
1272                 ++m_pos_NameID;
1273                 m_pos_EncryptedID=m_pos_NameID;
1274                 ++m_pos_EncryptedID;
1275                 m_pos_NewID=m_pos_EncryptedID;
1276                 ++m_pos_NewID;
1277                 m_pos_NewEncryptedID=m_pos_NewID;
1278                 ++m_pos_NewEncryptedID;
1279                 m_pos_Terminate=m_pos_NewEncryptedID;
1280                 ++m_pos_Terminate;
1281             }
1282
1283         public:
1284             virtual ~ManageNameIDRequestImpl() {}
1285     
1286             ManageNameIDRequestImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1287                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1288                 init();
1289             }
1290                 
1291             ManageNameIDRequestImpl(const ManageNameIDRequestImpl& src) : AbstractXMLObject(src), RequestAbstractTypeImpl(src) {
1292                 init();
1293             }
1294
1295             void _clone(const ManageNameIDRequestImpl& src) {
1296                 RequestAbstractTypeImpl::_clone(src);
1297                 IMPL_CLONE_TYPED_CHILD(NameID);
1298                 IMPL_CLONE_TYPED_CHILD(EncryptedID);
1299                 IMPL_CLONE_TYPED_CHILD(NewID);
1300                 IMPL_CLONE_TYPED_CHILD(NewEncryptedID);
1301                 IMPL_CLONE_TYPED_CHILD(Terminate);
1302             }
1303             
1304             IMPL_XMLOBJECT_CLONE_EX(ManageNameIDRequest);
1305             IMPL_TYPED_FOREIGN_CHILD(NameID,saml2);
1306             IMPL_TYPED_FOREIGN_CHILD(EncryptedID,saml2);
1307             IMPL_TYPED_CHILD(NewID);
1308             IMPL_TYPED_CHILD(NewEncryptedID);
1309             IMPL_TYPED_CHILD(Terminate);
1310     
1311         protected:
1312             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1313                 PROC_TYPED_FOREIGN_CHILD(NameID,saml2,SAML20_NS,false);
1314                 PROC_TYPED_FOREIGN_CHILD(EncryptedID,saml2,SAML20_NS,false);
1315                 PROC_TYPED_CHILD(NewID,SAML20P_NS,false);
1316                 PROC_TYPED_CHILD(NewEncryptedID,SAML20P_NS,false);
1317                 PROC_TYPED_CHILD(Terminate,SAML20P_NS,false);
1318                 RequestAbstractTypeImpl::processChildElement(childXMLObject,root);
1319             }
1320         };
1321
1322         class SAML_DLLLOCAL ManageNameIDResponseImpl : public virtual ManageNameIDResponse, public StatusResponseTypeImpl
1323         {
1324         public:
1325             virtual ~ManageNameIDResponseImpl() {}
1326
1327             ManageNameIDResponseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1328                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1329             
1330             ManageNameIDResponseImpl(const ManageNameIDResponseImpl& src) : AbstractXMLObject(src), StatusResponseTypeImpl(src) {}
1331
1332             IMPL_XMLOBJECT_CLONE_EX(ManageNameIDResponse);
1333         };
1334
1335         class SAML_DLLLOCAL LogoutRequestImpl : public virtual LogoutRequest, public RequestAbstractTypeImpl
1336         {
1337             void init() {
1338                 m_Reason=nullptr;
1339                 m_NotOnOrAfter=nullptr;
1340                 m_BaseID=nullptr;
1341                 m_NameID=nullptr;
1342                 m_EncryptedID=nullptr;
1343                 m_children.push_back(nullptr);
1344                 m_children.push_back(nullptr);
1345                 m_children.push_back(nullptr);
1346                 m_pos_BaseID=m_pos_Extensions;
1347                 ++m_pos_BaseID;
1348                 m_pos_NameID=m_pos_BaseID;
1349                 ++m_pos_NameID;
1350                 m_pos_EncryptedID=m_pos_NameID;
1351                 ++m_pos_EncryptedID;
1352             }
1353
1354         public:
1355             virtual ~LogoutRequestImpl() {
1356                 XMLString::release(&m_Reason);
1357                 delete m_NotOnOrAfter;
1358             }
1359     
1360             LogoutRequestImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1361                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1362                 init();
1363             }
1364                 
1365             LogoutRequestImpl(const LogoutRequestImpl& src) : AbstractXMLObject(src), RequestAbstractTypeImpl(src) {
1366                 init();
1367             }
1368
1369             void _clone(const LogoutRequestImpl& src) {
1370                 RequestAbstractTypeImpl::_clone(src);
1371                 IMPL_CLONE_ATTRIB(Reason);
1372                 IMPL_CLONE_ATTRIB(NotOnOrAfter);
1373                 IMPL_CLONE_TYPED_CHILD(BaseID);
1374                 IMPL_CLONE_TYPED_CHILD(NameID);
1375                 IMPL_CLONE_TYPED_CHILD(EncryptedID);
1376                 IMPL_CLONE_TYPED_CHILDREN(SessionIndex);
1377             }
1378             
1379             IMPL_XMLOBJECT_CLONE_EX(LogoutRequest);
1380             IMPL_STRING_ATTRIB(Reason);
1381             IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
1382             IMPL_TYPED_FOREIGN_CHILD(BaseID,saml2);
1383             IMPL_TYPED_FOREIGN_CHILD(NameID,saml2);
1384             IMPL_TYPED_FOREIGN_CHILD(EncryptedID,saml2);
1385             IMPL_TYPED_CHILDREN(SessionIndex,m_children.end());
1386     
1387         protected:
1388             void marshallAttributes(DOMElement* domElement) const {
1389                 MARSHALL_STRING_ATTRIB(Reason,REASON,nullptr);
1390                 MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,nullptr);
1391                 RequestAbstractTypeImpl::marshallAttributes(domElement);
1392             }
1393     
1394             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1395                 PROC_TYPED_FOREIGN_CHILD(BaseID,saml2,SAML20_NS,false);
1396                 PROC_TYPED_FOREIGN_CHILD(NameID,saml2,SAML20_NS,false);
1397                 PROC_TYPED_FOREIGN_CHILD(EncryptedID,saml2,SAML20_NS,false);
1398                 PROC_TYPED_CHILDREN(SessionIndex,SAML20P_NS,false);
1399                 RequestAbstractTypeImpl::processChildElement(childXMLObject,root);
1400             }
1401             void processAttribute(const DOMAttr* attribute) {
1402                 PROC_STRING_ATTRIB(Reason,REASON,nullptr);
1403                 PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,nullptr);
1404                 RequestAbstractTypeImpl::processAttribute(attribute);
1405             }
1406         };
1407
1408         class SAML_DLLLOCAL LogoutResponseImpl : public virtual LogoutResponse, public StatusResponseTypeImpl
1409         {
1410         public:
1411             virtual ~LogoutResponseImpl() {}
1412
1413             LogoutResponseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1414                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1415             
1416             LogoutResponseImpl(const LogoutResponseImpl& src) : AbstractXMLObject(src), StatusResponseTypeImpl(src) {}
1417
1418             IMPL_XMLOBJECT_CLONE_EX(LogoutResponse);
1419         };
1420
1421
1422         class SAML_DLLLOCAL NameIDMappingRequestImpl : public virtual NameIDMappingRequest, public RequestAbstractTypeImpl
1423         {
1424             void init() {
1425                 m_BaseID=nullptr;
1426                 m_NameID=nullptr;
1427                 m_EncryptedID=nullptr;
1428                 m_NameIDPolicy=nullptr;
1429                 m_children.push_back(nullptr);
1430                 m_children.push_back(nullptr);
1431                 m_children.push_back(nullptr);
1432                 m_children.push_back(nullptr);
1433                 m_pos_BaseID=m_pos_Extensions;
1434                 ++m_pos_BaseID;
1435                 m_pos_NameID=m_pos_BaseID;
1436                 ++m_pos_NameID;
1437                 m_pos_EncryptedID=m_pos_NameID;
1438                 ++m_pos_EncryptedID;
1439                 m_pos_NameIDPolicy=m_pos_EncryptedID;
1440                 ++m_pos_NameIDPolicy;
1441             }
1442
1443         public:
1444             virtual ~NameIDMappingRequestImpl() {}
1445     
1446             NameIDMappingRequestImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1447                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1448                 init();
1449             }
1450                 
1451             NameIDMappingRequestImpl(const NameIDMappingRequestImpl& src) : AbstractXMLObject(src), RequestAbstractTypeImpl(src) {
1452                 init();
1453             }
1454
1455             void _clone(const NameIDMappingRequestImpl& src) {
1456                 RequestAbstractTypeImpl::_clone(src);
1457                 IMPL_CLONE_TYPED_CHILD(BaseID);
1458                 IMPL_CLONE_TYPED_CHILD(NameID);
1459                 IMPL_CLONE_TYPED_CHILD(EncryptedID);
1460                 IMPL_CLONE_TYPED_CHILD(NameIDPolicy);
1461             }
1462             
1463             IMPL_XMLOBJECT_CLONE_EX(NameIDMappingRequest);
1464             IMPL_TYPED_FOREIGN_CHILD(BaseID,saml2);
1465             IMPL_TYPED_FOREIGN_CHILD(NameID,saml2);
1466             IMPL_TYPED_FOREIGN_CHILD(EncryptedID,saml2);
1467             IMPL_TYPED_CHILD(NameIDPolicy);
1468     
1469         protected:
1470             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1471                 PROC_TYPED_FOREIGN_CHILD(BaseID,saml2,SAML20_NS,false);
1472                 PROC_TYPED_FOREIGN_CHILD(NameID,saml2,SAML20_NS,false);
1473                 PROC_TYPED_FOREIGN_CHILD(EncryptedID,saml2,SAML20_NS,false);
1474                 PROC_TYPED_CHILD(NameIDPolicy,SAML20P_NS,false);
1475                 RequestAbstractTypeImpl::processChildElement(childXMLObject,root);
1476             }
1477         };
1478
1479         class SAML_DLLLOCAL NameIDMappingResponseImpl : public virtual NameIDMappingResponse, public StatusResponseTypeImpl
1480         {
1481             void init() {
1482                 m_NameID=nullptr;
1483                 m_EncryptedID=nullptr;
1484                 m_children.push_back(nullptr);
1485                 m_children.push_back(nullptr);
1486                 m_pos_NameID=m_pos_Status;
1487                 ++m_pos_NameID;
1488                 m_pos_EncryptedID=m_pos_NameID;
1489                 ++m_pos_EncryptedID;
1490             }
1491
1492         public:
1493             virtual ~NameIDMappingResponseImpl() {}
1494     
1495             NameIDMappingResponseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1496                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1497                 init();
1498             }
1499                 
1500             NameIDMappingResponseImpl(const NameIDMappingResponseImpl& src) : AbstractXMLObject(src), StatusResponseTypeImpl(src) {
1501                 init();
1502             }
1503
1504             void _clone(const NameIDMappingResponseImpl& src) {
1505                 StatusResponseTypeImpl::_clone(src);
1506                 IMPL_CLONE_TYPED_CHILD(NameID);
1507                 IMPL_CLONE_TYPED_CHILD(EncryptedID);
1508             }
1509             
1510             IMPL_XMLOBJECT_CLONE_EX(NameIDMappingResponse);
1511             IMPL_TYPED_FOREIGN_CHILD(NameID,saml2);
1512             IMPL_TYPED_FOREIGN_CHILD(EncryptedID,saml2);
1513     
1514         protected:
1515             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1516                 PROC_TYPED_FOREIGN_CHILD(NameID,saml2,SAML20_NS,false);
1517                 PROC_TYPED_FOREIGN_CHILD(EncryptedID,saml2,SAML20_NS,false);
1518                 StatusResponseTypeImpl::processChildElement(childXMLObject,root);
1519             }
1520         };
1521     };
1522 };
1523
1524 #if defined (_MSC_VER)
1525     #pragma warning( pop )
1526 #endif
1527
1528 // Builder Implementations
1529 IMPL_XMLOBJECTBUILDER(Artifact);
1530 IMPL_XMLOBJECTBUILDER(ArtifactResolve);
1531 IMPL_XMLOBJECTBUILDER(ArtifactResponse);
1532 IMPL_XMLOBJECTBUILDER(AssertionIDRequest);
1533 IMPL_XMLOBJECTBUILDER(AttributeQuery);
1534 IMPL_XMLOBJECTBUILDER(AuthnQuery);
1535 IMPL_XMLOBJECTBUILDER(AuthnRequest);
1536 IMPL_XMLOBJECTBUILDER(AuthzDecisionQuery);
1537 IMPL_XMLOBJECTBUILDER(Extensions);
1538 IMPL_XMLOBJECTBUILDER(GetComplete);
1539 IMPL_XMLOBJECTBUILDER(IDPEntry);
1540 IMPL_XMLOBJECTBUILDER(IDPList);
1541 IMPL_XMLOBJECTBUILDER(LogoutRequest);
1542 IMPL_XMLOBJECTBUILDER(LogoutResponse);
1543 IMPL_XMLOBJECTBUILDER(ManageNameIDRequest);
1544 IMPL_XMLOBJECTBUILDER(ManageNameIDResponse);
1545 IMPL_XMLOBJECTBUILDER(NameIDMappingRequest);
1546 IMPL_XMLOBJECTBUILDER(NameIDMappingResponse);
1547 IMPL_XMLOBJECTBUILDER(NameIDPolicy);
1548 IMPL_XMLOBJECTBUILDER(NewEncryptedID);
1549 IMPL_XMLOBJECTBUILDER(NewID);
1550 IMPL_XMLOBJECTBUILDER(RequestedAuthnContext);
1551 IMPL_XMLOBJECTBUILDER(RequesterID);
1552 IMPL_XMLOBJECTBUILDER(Response);
1553 IMPL_XMLOBJECTBUILDER(Scoping);
1554 IMPL_XMLOBJECTBUILDER(SessionIndex);
1555 IMPL_XMLOBJECTBUILDER(Status);
1556 IMPL_XMLOBJECTBUILDER(StatusCode);
1557 IMPL_XMLOBJECTBUILDER(StatusDetail);
1558 IMPL_XMLOBJECTBUILDER(StatusMessage);
1559 IMPL_XMLOBJECTBUILDER(Terminate);
1560
1561 IMPL_XMLOBJECTBUILDER(RespondTo);
1562
1563 // Unicode literals
1564 const XMLCh Artifact::LOCAL_NAME[] = UNICODE_LITERAL_8(A,r,t,i,f,a,c,t);
1565 const XMLCh ArtifactResolve::LOCAL_NAME[] = UNICODE_LITERAL_15(A,r,t,i,f,a,c,t,R,e,s,o,l,v,e);
1566 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);
1567 const XMLCh ArtifactResponse::LOCAL_NAME[] = UNICODE_LITERAL_16(A,r,t,i,f,a,c,t,R,e,s,p,o,n,s,e);
1568 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);
1569 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);
1570 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);
1571 const XMLCh AttributeQuery::LOCAL_NAME[] = UNICODE_LITERAL_14(A,t,t,r,i,b,u,t,e,Q,u,e,r,y);
1572 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);
1573 const XMLCh AuthnQuery::LOCAL_NAME[] = UNICODE_LITERAL_10(A,u,t,h,n,Q,u,e,r,y);
1574 const XMLCh AuthnQuery::TYPE_NAME[] = UNICODE_LITERAL_14(A,u,t,h,n,Q,u,e,r,y,T,y,p,e);
1575 const XMLCh AuthnQuery::SESSIONINDEX_ATTRIB_NAME[] = UNICODE_LITERAL_12(S,e,s,s,i,o,n,I,n,d,e,x);
1576 const XMLCh AuthnRequest::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,n,R,e,q,u,e,s,t);
1577 const XMLCh AuthnRequest::TYPE_NAME[] = UNICODE_LITERAL_16(A,u,t,h,n,R,e,q,u,e,s,t,T,y,p,e);
1578 const XMLCh AuthnRequest::FORCEAUTHN_ATTRIB_NAME[] = UNICODE_LITERAL_10(F,o,r,c,e,A,u,t,h,n);
1579 const XMLCh AuthnRequest::ISPASSIVE_ATTRIB_NAME[] = UNICODE_LITERAL_9(I,s,P,a,s,s,i,v,e);
1580 const XMLCh AuthnRequest::PROTOCOLBINDING_ATTRIB_NAME[] = UNICODE_LITERAL_15(P,r,o,t,o,c,o,l,B,i,n,d,i,n,g);
1581 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);
1582 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);
1583 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);
1584 const XMLCh AuthnRequest::PROVIDERNAME_ATTRIB_NAME[] = UNICODE_LITERAL_12(P,r,o,v,i,d,e,r,N,a,m,e);
1585 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);
1586 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);
1587 const XMLCh AuthzDecisionQuery::RESOURCE_ATTRIB_NAME[] = UNICODE_LITERAL_8(R,e,s,o,u,r,c,e);
1588 const XMLCh Extensions::LOCAL_NAME[] = UNICODE_LITERAL_10(E,x,t,e,n,s,i,o,n,s);
1589 const XMLCh Extensions::TYPE_NAME[] = UNICODE_LITERAL_14(E,x,t,e,n,s,i,o,n,s,T,y,p,e);
1590 const XMLCh GetComplete::LOCAL_NAME[] = UNICODE_LITERAL_11(G,e,t,C,o,m,p,l,e,t,e);
1591 const XMLCh IDPEntry::LOCAL_NAME[] = UNICODE_LITERAL_8(I,D,P,E,n,t,r,y);
1592 const XMLCh IDPEntry::TYPE_NAME[] = UNICODE_LITERAL_12(I,D,P,E,n,t,r,y,T,y,p,e);
1593 const XMLCh IDPEntry::PROVIDERID_ATTRIB_NAME[] = UNICODE_LITERAL_10(P,r,o,v,i,d,e,r,I,D);
1594 const XMLCh IDPEntry::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e);
1595 const XMLCh IDPEntry::LOC_ATTRIB_NAME[] = UNICODE_LITERAL_3(L,o,c);
1596 const XMLCh IDPList::LOCAL_NAME[] = UNICODE_LITERAL_7(I,D,P,L,i,s,t);
1597 const XMLCh IDPList::TYPE_NAME[] = UNICODE_LITERAL_11(I,D,P,L,i,s,t,T,y,p,e);
1598 const XMLCh LogoutRequest::LOCAL_NAME[] = UNICODE_LITERAL_13(L,o,g,o,u,t,R,e,q,u,e,s,t);
1599 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);
1600 const XMLCh LogoutRequest::REASON_ATTRIB_NAME[] = UNICODE_LITERAL_6(R,e,a,s,o,n);
1601 const XMLCh LogoutRequest::NOTONORAFTER_ATTRIB_NAME[] = UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1602 const XMLCh LogoutResponse::LOCAL_NAME[] = UNICODE_LITERAL_14(L,o,g,o,u,t,R,e,s,p,o,n,s,e);
1603 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);
1604 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);
1605 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);
1606 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);
1607 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);
1608 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);
1609 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);
1610 const XMLCh NameIDPolicy::LOCAL_NAME[] = UNICODE_LITERAL_12(N,a,m,e,I,D,P,o,l,i,c,y);
1611 const XMLCh NameIDPolicy::TYPE_NAME[] = UNICODE_LITERAL_16(N,a,m,e,I,D,P,o,l,i,c,y,T,y,p,e);
1612 const XMLCh NameIDPolicy::FORMAT_ATTRIB_NAME[] = UNICODE_LITERAL_6(F,o,r,m,a,t);
1613 const XMLCh NameIDPolicy::SPNAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_15(S,P,N,a,m,e,Q,u,a,l,i,f,i,e,r);
1614 const XMLCh NameIDPolicy::ALLOWCREATE_ATTRIB_NAME[] = UNICODE_LITERAL_11(A,l,l,o,w,C,r,e,a,t,e);
1615 const XMLCh NewEncryptedID::LOCAL_NAME[] = UNICODE_LITERAL_14(N,e,w,E,n,c,r,y,p,t,e,d,I,D);
1616 const XMLCh NewID::LOCAL_NAME[] = UNICODE_LITERAL_5(N,e,w,I,D);
1617 const XMLCh RequesterID::LOCAL_NAME[] = UNICODE_LITERAL_11(R,e,q,u,e,s,t,e,r,I,D);
1618 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);
1619 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);
1620 const XMLCh RequestedAuthnContext::COMPARISON_ATTRIB_NAME[] = UNICODE_LITERAL_10(C,o,m,p,a,r,i,s,o,n);
1621 const XMLCh RequestedAuthnContext::COMPARISON_EXACT[] = UNICODE_LITERAL_5(e,x,a,c,t);
1622 const XMLCh RequestedAuthnContext::COMPARISON_MINIMUM[] = UNICODE_LITERAL_7(m,i,n,i,m,u,m);
1623 const XMLCh RequestedAuthnContext::COMPARISON_MAXIMUM[] = UNICODE_LITERAL_7(m,a,x,i,m,u,m);
1624 const XMLCh RequestedAuthnContext::COMPARISON_BETTER[] = UNICODE_LITERAL_6(b,e,t,t,e,r);
1625 const XMLCh RequestAbstractType::LOCAL_NAME[] = {chNull};
1626 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);
1627 const XMLCh RequestAbstractType::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
1628 const XMLCh RequestAbstractType::VER_ATTRIB_NAME[] = UNICODE_LITERAL_7(V,e,r,s,i,o,n);
1629 const XMLCh RequestAbstractType::ISSUEINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,s,s,u,e,I,n,s,t,a,n,t);
1630 const XMLCh RequestAbstractType::DESTINATION_ATTRIB_NAME[] = UNICODE_LITERAL_11(D,e,s,t,i,n,a,t,i,o,n);
1631 const XMLCh RequestAbstractType::CONSENT_ATTRIB_NAME[] = UNICODE_LITERAL_7(C,o,n,s,e,n,t);
1632 const XMLCh RespondTo::LOCAL_NAME[] = UNICODE_LITERAL_9(R,e,s,p,o,n,d,T,o);
1633 const XMLCh Response::LOCAL_NAME[] = UNICODE_LITERAL_8(R,e,s,p,o,n,s,e);
1634 const XMLCh Response::TYPE_NAME[] = UNICODE_LITERAL_12(R,e,s,p,o,n,s,e,T,y,p,e);
1635 const XMLCh Scoping::LOCAL_NAME[] = UNICODE_LITERAL_7(S,c,o,p,i,n,g);
1636 const XMLCh Scoping::TYPE_NAME[] = UNICODE_LITERAL_11(S,c,o,p,i,n,g,T,y,p,e);
1637 const XMLCh Scoping::PROXYCOUNT_ATTRIB_NAME[] = UNICODE_LITERAL_10(P,r,o,x,y,C,o,u,n,t);
1638 const XMLCh SessionIndex::LOCAL_NAME[] = UNICODE_LITERAL_12(S,e,s,s,i,o,n,I,n,d,e,x);
1639 const XMLCh Status::LOCAL_NAME[] = UNICODE_LITERAL_6(S,t,a,t,u,s);
1640 const XMLCh Status::TYPE_NAME[] = UNICODE_LITERAL_10(S,t,a,t,u,s,T,y,p,e);
1641 const XMLCh StatusCode::LOCAL_NAME[] = UNICODE_LITERAL_10(S,t,a,t,u,s,C,o,d,e);
1642 const XMLCh StatusCode::TYPE_NAME[] = UNICODE_LITERAL_14(S,t,a,t,u,s,C,o,d,e,T,y,p,e);
1643 const XMLCh StatusCode::VALUE_ATTRIB_NAME[] = UNICODE_LITERAL_5(V,a,l,u,e);
1644 const XMLCh StatusDetail::LOCAL_NAME[] = UNICODE_LITERAL_12(S,t,a,t,u,s,D,e,t,a,i,l);
1645 const XMLCh StatusDetail::TYPE_NAME[] = UNICODE_LITERAL_16(S,t,a,t,u,s,D,e,t,a,i,l,T,y,p,e);
1646 const XMLCh StatusMessage::LOCAL_NAME[] = UNICODE_LITERAL_13(S,t,a,t,u,s,M,e,s,s,a,g,e);
1647 const XMLCh StatusResponseType::LOCAL_NAME[] = {chNull};
1648 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);
1649 const XMLCh StatusResponseType::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
1650 const XMLCh StatusResponseType::INRESPONSETO_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,n,R,e,s,p,o,n,s,e,T,o);
1651 const XMLCh StatusResponseType::VER_ATTRIB_NAME[] = UNICODE_LITERAL_7(V,e,r,s,i,o,n);
1652 const XMLCh StatusResponseType::ISSUEINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,s,s,u,e,I,n,s,t,a,n,t);
1653 const XMLCh StatusResponseType::DESTINATION_ATTRIB_NAME[] = UNICODE_LITERAL_11(D,e,s,t,i,n,a,t,i,o,n);
1654 const XMLCh StatusResponseType::CONSENT_ATTRIB_NAME[] = UNICODE_LITERAL_7(C,o,n,s,e,n,t);
1655 const XMLCh SubjectQuery::LOCAL_NAME[] = UNICODE_LITERAL_12(S,u,b,j,e,c,t,Q,u,e,r,y);
1656 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);
1657 const XMLCh Terminate::LOCAL_NAME[] = UNICODE_LITERAL_9(T,e,r,m,i,n,a,t,e);
1658 const XMLCh Terminate::TYPE_NAME[] = UNICODE_LITERAL_13(T,e,r,m,i,n,a,t,e,T,y,p,e);
1659
1660 // Unicode literals: LogoutRequest element, Reason attribute
1661 const XMLCh LogoutRequest::REASON_USER[] = // urn:oasis:names:tc:SAML:2.0:logout:user
1662 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1663   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1664   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1665   chLatin_l, chLatin_o, chLatin_g, chLatin_o, chLatin_u, chLatin_t, chColon,
1666   chLatin_u, chLatin_s, chLatin_e, chLatin_r, chNull
1667 };
1668
1669 const XMLCh LogoutRequest::REASON_ADMIN[] = // urn:oasis:names:tc:SAML:2.0:logout:admin
1670 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1671   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1672   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1673   chLatin_l, chLatin_o, chLatin_g, chLatin_o, chLatin_u, chLatin_t, chColon,
1674   chLatin_a, chLatin_d, chLatin_m, chLatin_i, chLatin_n, chNull
1675 };
1676
1677
1678 const XMLCh LogoutRequest::REASON_GLOBAL_TIMEOUT[] = // urn:oasis:names:tc:SAML:2.0:logout:global-timeout
1679 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1680   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1681   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1682   chLatin_l, chLatin_o, chLatin_g, chLatin_o, chLatin_u, chLatin_t, chColon,
1683   chLatin_g, chLatin_l, chLatin_o, chLatin_b, chLatin_a, chLatin_l, 
1684     chDash, chLatin_t, chLatin_i, chLatin_m, chLatin_e, chLatin_o, chLatin_u, chLatin_t, chNull
1685 };
1686
1687
1688 const XMLCh LogoutRequest::REASON_SP_TIMEOUT[] = // urn:oasis:names:tc:SAML:2.0:logout:sp-timeout
1689 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1690   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1691   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1692   chLatin_l, chLatin_o, chLatin_g, chLatin_o, chLatin_u, chLatin_t, chColon,
1693   chLatin_s, chLatin_p, chDash, chLatin_t, chLatin_i, chLatin_m, chLatin_e, chLatin_o, chLatin_u, chLatin_t, chNull
1694 };
1695
1696
1697 // Unicode literals, StatusCode Value
1698 const XMLCh StatusCode::SUCCESS[] = //  urn:oasis:names:tc:SAML:2.0:status:Success 
1699 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1700   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1701   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1702   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1703   chLatin_S, chLatin_u, chLatin_c, chLatin_c, chLatin_e, chLatin_s, chLatin_s, chNull
1704 };
1705
1706 const XMLCh StatusCode::REQUESTER[] = //  urn:oasis:names:tc:SAML:2.0:status:Requester 
1707 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1708   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1709   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1710   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1711   chLatin_R, chLatin_e, chLatin_q, chLatin_u, chLatin_e, chLatin_s, chLatin_t, chLatin_e, chLatin_r, chNull
1712 };
1713
1714 const XMLCh StatusCode::RESPONDER[] = //  urn:oasis:names:tc:SAML:2.0:status:Responder 
1715 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1716   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1717   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1718   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1719   chLatin_R, chLatin_e, chLatin_s, chLatin_p, chLatin_o, chLatin_n, chLatin_d, chLatin_e, chLatin_r, chNull
1720 };
1721
1722 const XMLCh StatusCode::VERSION_MISMATCH[] = //  urn:oasis:names:tc:SAML:2.0:status:VersionMismatch 
1723 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1724   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1725   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1726   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1727   chLatin_V, chLatin_e, chLatin_r, chLatin_s, chLatin_i, chLatin_o, chLatin_n,
1728     chLatin_M, chLatin_i, chLatin_s, chLatin_m, chLatin_a, chLatin_t, chLatin_c, chLatin_h, chNull
1729 };
1730
1731 const XMLCh StatusCode::AUTHN_FAILED[] = //  urn:oasis:names:tc:SAML:2.0:status:AuthnFailed 
1732 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1733   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1734   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1735   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1736   chLatin_A, chLatin_u, chLatin_t, chLatin_h, chLatin_n,
1737     chLatin_F, chLatin_a, chLatin_i, chLatin_l, chLatin_e, chLatin_d, chNull
1738 };
1739
1740 const XMLCh StatusCode::INVALID_ATTR_NAME_OR_VALUE[] = //  urn:oasis:names:tc:SAML:2.0:status:InvalidAttrNameOrValue 
1741 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1742   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1743   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1744   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1745   chLatin_I, chLatin_n, chLatin_v, chLatin_a, chLatin_l, chLatin_i, chLatin_d, 
1746     chLatin_A, chLatin_t, chLatin_t, chLatin_r, chLatin_N, chLatin_a, chLatin_m, chLatin_e, 
1747     chLatin_O, chLatin_r, chLatin_V, chLatin_a, chLatin_l, chLatin_u, chLatin_e, chNull
1748 };
1749
1750 const XMLCh StatusCode::INVALID_NAMEID_POLICY[] = //  urn:oasis:names:tc:SAML:2.0:status:InvalidNameIDPolicy 
1751 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1752   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1753   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1754   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1755   chLatin_I, chLatin_n, chLatin_v, chLatin_a, chLatin_l, chLatin_i, chLatin_d, 
1756    chLatin_N, chLatin_a, chLatin_m, chLatin_e, chLatin_I, chLatin_D, 
1757    chLatin_P, chLatin_o, chLatin_l, chLatin_i, chLatin_c, chLatin_y, chNull
1758 };
1759
1760 const XMLCh StatusCode::NO_AUTHN_CONTEXT[] = //  urn:oasis:names:tc:SAML:2.0:status:NoAuthnContext 
1761 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1762   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1763   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1764   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1765   chLatin_N, chLatin_o, chLatin_A, chLatin_u, chLatin_t, chLatin_h, chLatin_n, 
1766   chLatin_C, chLatin_o, chLatin_n, chLatin_t, chLatin_e, chLatin_x, chLatin_t, chNull
1767 };
1768
1769 const XMLCh StatusCode::NO_AVAILABLE_IDP[] = //  urn:oasis:names:tc:SAML:2.0:status:NoAvailableIDP 
1770 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1771   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1772   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1773   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1774   chLatin_N, chLatin_o, chLatin_A, chLatin_v, chLatin_a, chLatin_i, chLatin_l, chLatin_a, chLatin_b, chLatin_l, chLatin_e, 
1775    chLatin_I, chLatin_D, chLatin_P, chNull
1776 };
1777
1778 const XMLCh StatusCode::NO_PASSIVE[] = //  urn:oasis:names:tc:SAML:2.0:status:NoPassive 
1779 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1780   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1781   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1782   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1783   chLatin_N, chLatin_o, chLatin_P, chLatin_a, chLatin_s, chLatin_s, chLatin_i, chLatin_v, chLatin_e, chNull
1784 };
1785
1786 const XMLCh StatusCode::NO_SUPPORTED_IDP[] = //  urn:oasis:names:tc:SAML:2.0:status:NoSupportedIDP 
1787 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1788   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1789   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1790   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1791   chLatin_N, chLatin_o, chLatin_S, chLatin_u, chLatin_p, chLatin_p, chLatin_o, chLatin_r, chLatin_t, chLatin_e, chLatin_d,
1792       chLatin_I, chLatin_D, chLatin_P, chNull
1793 };
1794
1795 const XMLCh StatusCode::PARTIAL_LOGOUT[] = //  urn:oasis:names:tc:SAML:2.0:status:PartialLogout 
1796 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1797   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1798   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1799   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1800   chLatin_P, chLatin_a, chLatin_r, chLatin_t, chLatin_i, chLatin_a, chLatin_l, 
1801     chLatin_L, chLatin_o, chLatin_g, chLatin_o, chLatin_u, chLatin_t, chNull
1802 };
1803
1804 const XMLCh StatusCode::PROXY_COUNT_EXCEEDED[] = //  urn:oasis:names:tc:SAML:2.0:status:ProxyCountExceeded 
1805 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1806   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1807   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1808   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1809   chLatin_P, chLatin_r, chLatin_o, chLatin_x, chLatin_y, chLatin_C, chLatin_o, chLatin_u, chLatin_n, chLatin_t, 
1810     chLatin_E, chLatin_x, chLatin_c, chLatin_e, chLatin_e, chLatin_d, chLatin_e, chLatin_d, chNull
1811 };
1812
1813 const XMLCh StatusCode::REQUEST_DENIED[] = //  urn:oasis:names:tc:SAML:2.0:status:RequestDenied 
1814 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1815   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1816   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1817   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1818   chLatin_R, chLatin_e, chLatin_q, chLatin_u, chLatin_e, chLatin_s, chLatin_t, 
1819     chLatin_D, chLatin_e, chLatin_n, chLatin_i, chLatin_e, chLatin_d, chNull
1820 };
1821
1822 const XMLCh StatusCode::REQUEST_UNSUPPORTED[] = //  urn:oasis:names:tc:SAML:2.0:status:RequestUnsupported 
1823 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1824   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1825   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1826   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1827   chLatin_R, chLatin_e, chLatin_q, chLatin_u, chLatin_e, chLatin_s, chLatin_t, 
1828     chLatin_U, chLatin_n, chLatin_s, chLatin_u, chLatin_p, chLatin_p, chLatin_o, chLatin_r, chLatin_t, chLatin_e, chLatin_d, chNull
1829 };
1830
1831 const XMLCh StatusCode::REQUEST_VERSION_DEPRECATED[] = //  urn:oasis:names:tc:SAML:2.0:status:RequestVersionDeprecated 
1832 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1833   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1834   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1835   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1836   chLatin_R, chLatin_e, chLatin_q, chLatin_u, chLatin_e, chLatin_s, chLatin_t, 
1837     chLatin_V, chLatin_e, chLatin_r, chLatin_s, chLatin_i, chLatin_o, chLatin_n, 
1838     chLatin_D, chLatin_e, chLatin_p, chLatin_r, chLatin_e, chLatin_c, chLatin_a, chLatin_t, chLatin_e, chLatin_d, chNull
1839 };
1840
1841 const XMLCh StatusCode::REQUEST_VERSION_TOO_HIGH[] = //  urn:oasis:names:tc:SAML:2.0:status:RequestVersionTooHigh 
1842 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1843   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1844   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1845   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1846   chLatin_R, chLatin_e, chLatin_q, chLatin_u, chLatin_e, chLatin_s, chLatin_t, 
1847   chLatin_V, chLatin_e, chLatin_r, chLatin_s, chLatin_i, chLatin_o, chLatin_n, 
1848   chLatin_T, chLatin_o, chLatin_o, chLatin_H, chLatin_i, chLatin_g, chLatin_h, chNull
1849 };
1850
1851 const XMLCh StatusCode::REQUEST_VERSION_TOO_LOW[] = //  urn:oasis:names:tc:SAML:2.0:status:RequestVersionTooLow 
1852 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1853   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1854   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1855   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1856   chLatin_R, chLatin_e, chLatin_q, chLatin_u, chLatin_e, chLatin_s, chLatin_t, 
1857     chLatin_V, chLatin_e, chLatin_r, chLatin_s, chLatin_i, chLatin_o, chLatin_n, 
1858     chLatin_T, chLatin_o, chLatin_o, chLatin_L, chLatin_o, chLatin_w, chNull
1859 };
1860
1861 const XMLCh StatusCode::RESOURCE_NOT_RECOGNIZED[] = //  urn:oasis:names:tc:SAML:2.0:status:ResourceNotRecognized 
1862 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1863   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1864   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1865   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1866   chLatin_R, chLatin_e, chLatin_s, chLatin_o, chLatin_u, chLatin_r, chLatin_c, chLatin_e, 
1867     chLatin_N, chLatin_o, chLatin_t, 
1868     chLatin_R, chLatin_e, chLatin_c, chLatin_o, chLatin_g, chLatin_n, chLatin_i, chLatin_z, chLatin_e, chLatin_d, chNull
1869 };
1870
1871 const XMLCh StatusCode::TOO_MANY_RESPONSES[] = //  urn:oasis:names:tc:SAML:2.0:status:TooManyResponses 
1872 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1873   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1874   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1875   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1876   chLatin_T, chLatin_o, chLatin_o, chLatin_M, chLatin_a, chLatin_n, chLatin_y, 
1877     chLatin_R, chLatin_e, chLatin_s, chLatin_p, chLatin_o, chLatin_n, chLatin_s, chLatin_e, chLatin_s, chNull
1878 };
1879
1880 const XMLCh StatusCode::UNKNOWN_ATTR_PROFILE[] = //  urn:oasis:names:tc:SAML:2.0:status:UnknownAttrProfile 
1881 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1882   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1883   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1884   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1885   chLatin_U, chLatin_n, chLatin_k, chLatin_n, chLatin_o, chLatin_w, chLatin_n, 
1886     chLatin_A, chLatin_t, chLatin_t, chLatin_r, 
1887     chLatin_P, chLatin_r, chLatin_o, chLatin_f, chLatin_i, chLatin_l, chLatin_e, chNull
1888 };
1889
1890 const XMLCh StatusCode::UNKNOWN_PRINCIPAL[] = //  urn:oasis:names:tc:SAML:2.0:status:UnknownPrincipal 
1891 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1892   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1893   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1894   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1895   chLatin_U, chLatin_n, chLatin_k, chLatin_n, chLatin_o, chLatin_w, chLatin_n, 
1896     chLatin_P, chLatin_r, chLatin_i, chLatin_n, chLatin_c, chLatin_i, chLatin_p, chLatin_a, chLatin_l, chNull
1897 };
1898
1899 const XMLCh StatusCode::UNSUPPORTED_BINDING[] = //  urn:oasis:names:tc:SAML:2.0:status:UnsupportedBinding 
1900 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1901   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1902   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1903   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1904   chLatin_U, chLatin_n, chLatin_s, chLatin_u, chLatin_p, chLatin_p, chLatin_o, chLatin_r, chLatin_t, chLatin_e, chLatin_d, 
1905     chLatin_B, chLatin_i, chLatin_n, chLatin_d, chLatin_i, chLatin_n, chLatin_g, chNull
1906 };
1907