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