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