boost changes and header fixes
[shibboleth/cpp-opensaml.git] / saml / saml1 / core / impl / AssertionsImpl.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  * AssertionsImpl.cpp
23  *
24  * Implementation classes for SAML 1.x Assertions schema.
25  */
26
27 #include "internal.h"
28 #include "exceptions.h"
29 #include "saml1/core/Assertions.h"
30 #include "signature/ContentReference.h"
31
32 #include <xmltooling/AbstractComplexElement.h>
33 #include <xmltooling/AbstractSimpleElement.h>
34 #include <xmltooling/impl/AnyElement.h>
35 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
36 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
37 #include <xmltooling/signature/KeyInfo.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 <limits.h>
44 #include <boost/lexical_cast.hpp>
45 #include <xercesc/util/XMLUniDefs.hpp>
46
47 using namespace opensaml::saml1;
48 using namespace xmlsignature;
49 using namespace xmltooling;
50 using namespace std;
51 using xmlconstants::XMLSIG_NS;
52 using xmlconstants::XML_ONE;
53 using samlconstants::SAML1_NS;
54
55 #if defined (_MSC_VER)
56     #pragma warning( push )
57     #pragma warning( disable : 4250 4251 )
58 #endif
59
60 namespace opensaml {
61     namespace saml1 {
62
63         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AssertionIDReference);
64         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Audience);
65         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,ConfirmationMethod);
66
67         class SAML_DLLLOCAL ConditionImpl : public virtual Condition, public AnyElementImpl
68         {
69         public:
70             virtual ~ConditionImpl() {}
71
72             ConditionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
73                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
74             }
75
76             ConditionImpl(const ConditionImpl& src) : AbstractXMLObject(src), AnyElementImpl(src) {}
77
78             IMPL_XMLOBJECT_CLONE_EX(Condition);
79         };
80
81         class SAML_DLLLOCAL AudienceRestrictionConditionImpl : public virtual AudienceRestrictionCondition,
82             public AbstractComplexElement,
83             public AbstractDOMCachingXMLObject,
84             public AbstractXMLObjectMarshaller,
85             public AbstractXMLObjectUnmarshaller
86         {
87         public:
88             virtual ~AudienceRestrictionConditionImpl() {}
89
90             AudienceRestrictionConditionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
91                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
92             }
93
94             AudienceRestrictionConditionImpl(const AudienceRestrictionConditionImpl& src)
95                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
96                 VectorOf(Audience) v=getAudiences();
97                 for (vector<Audience*>::const_iterator i=src.m_Audiences.begin(); i!=src.m_Audiences.end(); i++) {
98                     if (*i) {
99                         v.push_back((*i)->cloneAudience());
100                     }
101                 }
102             }
103
104             IMPL_XMLOBJECT_CLONE2(AudienceRestrictionCondition,Condition);
105             IMPL_TYPED_CHILDREN(Audience,m_children.end());
106
107         protected:
108             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
109                 PROC_TYPED_CHILDREN(Audience,SAML1_NS,false);
110                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
111             }
112         };
113
114         class SAML_DLLLOCAL DoNotCacheConditionImpl : public virtual DoNotCacheCondition,
115             public AbstractSimpleElement,
116             public AbstractDOMCachingXMLObject,
117             public AbstractXMLObjectMarshaller,
118             public AbstractXMLObjectUnmarshaller
119         {
120         public:
121             virtual ~DoNotCacheConditionImpl() {}
122
123             DoNotCacheConditionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
124                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
125             }
126
127             DoNotCacheConditionImpl(const DoNotCacheConditionImpl& src)
128                 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
129             }
130
131             IMPL_XMLOBJECT_CLONE2(DoNotCacheCondition,Condition);
132         };
133
134         class SAML_DLLLOCAL ConditionsImpl : public virtual Conditions,
135             public AbstractComplexElement,
136             public AbstractDOMCachingXMLObject,
137             public AbstractXMLObjectMarshaller,
138             public AbstractXMLObjectUnmarshaller
139         {
140             void init() {
141                 m_NotBefore=m_NotOnOrAfter=nullptr;
142             }
143
144         public:
145             virtual ~ConditionsImpl() {
146                 delete m_NotBefore;
147                 delete m_NotOnOrAfter;
148             }
149
150             ConditionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
151                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
152                 init();
153             }
154
155             ConditionsImpl(const ConditionsImpl& src)
156                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
157                 init();
158                 setNotBefore(src.getNotBefore());
159                 setNotOnOrAfter(src.getNotOnOrAfter());
160
161                 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
162                     if (*i) {
163                         AudienceRestrictionCondition* arc=dynamic_cast<AudienceRestrictionCondition*>(*i);
164                         if (arc) {
165                             getAudienceRestrictionConditions().push_back(arc->cloneAudienceRestrictionCondition());
166                             continue;
167                         }
168
169                         DoNotCacheCondition* dncc=dynamic_cast<DoNotCacheCondition*>(*i);
170                         if (dncc) {
171                             getDoNotCacheConditions().push_back(dncc->cloneDoNotCacheCondition());
172                             continue;
173                         }
174
175                         Condition* c=dynamic_cast<Condition*>(*i);
176                         if (c) {
177                             getConditions().push_back(c->cloneCondition());
178                             continue;
179                         }
180                     }
181                 }
182             }
183
184             IMPL_XMLOBJECT_CLONE(Conditions);
185             IMPL_DATETIME_ATTRIB(NotBefore,0);
186             IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
187             IMPL_TYPED_CHILDREN(AudienceRestrictionCondition, m_children.end());
188             IMPL_TYPED_CHILDREN(DoNotCacheCondition,m_children.end());
189             IMPL_TYPED_CHILDREN(Condition,m_children.end());
190
191         protected:
192             void marshallAttributes(DOMElement* domElement) const {
193                 MARSHALL_DATETIME_ATTRIB(NotBefore,NOTBEFORE,nullptr);
194                 MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,nullptr);
195             }
196
197             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
198                 PROC_TYPED_CHILDREN(AudienceRestrictionCondition,SAML1_NS,true);
199                 PROC_TYPED_CHILDREN(DoNotCacheCondition,SAML1_NS,true);
200                 PROC_TYPED_CHILDREN(Condition,SAML1_NS,true);
201                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
202             }
203
204             void processAttribute(const DOMAttr* attribute) {
205                 PROC_DATETIME_ATTRIB(NotBefore,NOTBEFORE,nullptr);
206                 PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,nullptr);
207             }
208         };
209
210         class SAML_DLLLOCAL NameIdentifierImpl : public virtual NameIdentifier,
211             public AbstractSimpleElement,
212             public AbstractDOMCachingXMLObject,
213             public AbstractXMLObjectMarshaller,
214             public AbstractXMLObjectUnmarshaller
215         {
216             void init() {
217                 m_Format=m_NameQualifier=nullptr;
218             }
219
220         public:
221             virtual ~NameIdentifierImpl() {
222                 XMLString::release(&m_Format);
223                 XMLString::release(&m_NameQualifier);
224             }
225
226             NameIdentifierImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
227                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
228                 init();
229             }
230
231             NameIdentifierImpl(const NameIdentifierImpl& src)
232                     : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
233                 init();
234                 setFormat(src.getFormat());
235                 setNameQualifier(src.getNameQualifier());
236             }
237
238             IMPL_XMLOBJECT_CLONE(NameIdentifier);
239             IMPL_STRING_ATTRIB(Format);
240             IMPL_STRING_ATTRIB(NameQualifier);
241
242         protected:
243             void marshallAttributes(DOMElement* domElement) const {
244                 MARSHALL_STRING_ATTRIB(Format,FORMAT,nullptr);
245                 MARSHALL_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,nullptr);
246             }
247
248             void processAttribute(const DOMAttr* attribute) {
249                 PROC_STRING_ATTRIB(Format,FORMAT,nullptr);
250                 PROC_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,nullptr);
251             }
252         };
253
254         class SAML_DLLLOCAL SubjectConfirmationDataImpl : public virtual SubjectConfirmationData, public AnyElementImpl
255         {
256         public:
257             virtual ~SubjectConfirmationDataImpl() {}
258
259             SubjectConfirmationDataImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
260                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
261             }
262
263             SubjectConfirmationDataImpl(const SubjectConfirmationDataImpl& src) : AbstractXMLObject(src), AnyElementImpl(src) {
264             }
265
266             IMPL_XMLOBJECT_CLONE_EX(SubjectConfirmationData);
267         };
268
269         class SAML_DLLLOCAL SubjectConfirmationImpl : public virtual SubjectConfirmation,
270             public AbstractComplexElement,
271             public AbstractDOMCachingXMLObject,
272             public AbstractXMLObjectMarshaller,
273             public AbstractXMLObjectUnmarshaller
274         {
275             void init() {
276                 m_SubjectConfirmationData=nullptr;
277                 m_KeyInfo=nullptr;
278                 m_children.push_back(nullptr);
279                 m_children.push_back(nullptr);
280                 m_pos_SubjectConfirmationData=m_children.begin();
281                 m_pos_KeyInfo=m_pos_SubjectConfirmationData;
282                 ++m_pos_KeyInfo;
283             }
284
285         public:
286             virtual ~SubjectConfirmationImpl() {}
287
288             SubjectConfirmationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
289                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
290                 init();
291             }
292
293             SubjectConfirmationImpl(const SubjectConfirmationImpl& src)
294                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
295                 init();
296                 if (src.getSubjectConfirmationData())
297                     setSubjectConfirmationData(src.getSubjectConfirmationData()->clone());
298                 if (src.getKeyInfo())
299                     setKeyInfo(src.getKeyInfo()->cloneKeyInfo());
300                 for (vector<ConfirmationMethod*>::const_iterator i=src.m_ConfirmationMethods.begin(); i!=src.m_ConfirmationMethods.end(); i++) {
301                     if (*i) {
302                         getConfirmationMethods().push_back((*i)->cloneConfirmationMethod());
303                     }
304                 }
305             }
306
307             IMPL_XMLOBJECT_CLONE(SubjectConfirmation);
308             IMPL_TYPED_CHILDREN(ConfirmationMethod,m_pos_SubjectConfirmationData);
309             IMPL_XMLOBJECT_CHILD(SubjectConfirmationData);
310             IMPL_TYPED_CHILD(KeyInfo);
311
312         protected:
313             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
314                 PROC_TYPED_CHILDREN(ConfirmationMethod,SAML1_NS,false);
315                 PROC_TYPED_CHILD(KeyInfo,XMLSIG_NS,false);
316
317                 // Anything else we'll assume is the data.
318                 if (getSubjectConfirmationData())
319                     throw UnmarshallingException("Invalid child element: $1",params(1,childXMLObject->getElementQName().toString().c_str()));
320                 setSubjectConfirmationData(childXMLObject);
321             }
322         };
323
324         class SAML_DLLLOCAL SubjectImpl : public virtual Subject,
325             public AbstractComplexElement,
326             public AbstractDOMCachingXMLObject,
327             public AbstractXMLObjectMarshaller,
328             public AbstractXMLObjectUnmarshaller
329         {
330             void init() {
331                 m_NameIdentifier=nullptr;
332                 m_SubjectConfirmation=nullptr;
333                 m_children.push_back(nullptr);
334                 m_children.push_back(nullptr);
335                 m_pos_NameIdentifier=m_children.begin();
336                 m_pos_SubjectConfirmation=m_pos_NameIdentifier;
337                 ++m_pos_SubjectConfirmation;
338             }
339
340         public:
341             virtual ~SubjectImpl() {}
342
343             SubjectImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
344                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
345                 init();
346             }
347
348             SubjectImpl(const SubjectImpl& src)
349                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
350                 init();
351                 if (src.getNameIdentifier())
352                     setNameIdentifier(src.getNameIdentifier()->cloneNameIdentifier());
353                 if (src.getSubjectConfirmation())
354                     setSubjectConfirmation(src.getSubjectConfirmation()->cloneSubjectConfirmation());
355             }
356
357             IMPL_XMLOBJECT_CLONE(Subject);
358             IMPL_TYPED_CHILD(NameIdentifier);
359             IMPL_TYPED_CHILD(SubjectConfirmation);
360
361         protected:
362             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
363                 PROC_TYPED_CHILD(NameIdentifier,SAML1_NS,true);
364                 PROC_TYPED_CHILD(SubjectConfirmation,SAML1_NS,true);
365                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
366             }
367         };
368
369         class SAML_DLLLOCAL StatementImpl : public virtual Statement, public AnyElementImpl
370         {
371         public:
372             virtual ~StatementImpl() {}
373
374             StatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
375                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
376             }
377
378             StatementImpl(const StatementImpl& src) : AbstractXMLObject(src), AnyElementImpl(src) {}
379
380             IMPL_XMLOBJECT_CLONE_EX(Statement);
381         };
382
383         class SAML_DLLLOCAL SubjectStatementImpl : public virtual SubjectStatement,
384             public AbstractComplexElement,
385             public AbstractDOMCachingXMLObject,
386             public AbstractXMLObjectMarshaller,
387             public AbstractXMLObjectUnmarshaller
388         {
389             void init() {
390                 m_Subject=nullptr;
391                 m_children.push_back(nullptr);
392                 m_pos_Subject=m_children.begin();
393             }
394
395         protected:
396             SubjectStatementImpl() {
397                 init();
398             }
399         public:
400             virtual ~SubjectStatementImpl() {}
401
402             SubjectStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
403                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
404                 init();
405             }
406
407             SubjectStatementImpl(const SubjectStatementImpl& src)
408                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
409                 init();
410             }
411
412             void _clone(const SubjectStatementImpl& src) {
413                 if (src.getSubject())
414                     setSubject(src.getSubject()->cloneSubject());
415             }
416
417             Statement* cloneStatement() const {
418                 return dynamic_cast<Statement*>(clone());
419             }
420
421             SubjectStatement* cloneSubjectStatement() const {
422                 return dynamic_cast<SubjectStatement*>(clone());
423             }
424
425             IMPL_TYPED_CHILD(Subject);
426
427         protected:
428             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
429                 PROC_TYPED_CHILD(Subject,SAML1_NS,true);
430                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
431             }
432         };
433
434         class SAML_DLLLOCAL SubjectLocalityImpl : public virtual SubjectLocality,
435             public AbstractSimpleElement,
436             public AbstractDOMCachingXMLObject,
437             public AbstractXMLObjectMarshaller,
438             public AbstractXMLObjectUnmarshaller
439         {
440             void init() {
441                 m_IPAddress=m_DNSAddress=nullptr;
442             }
443
444         public:
445             virtual ~SubjectLocalityImpl() {
446                 XMLString::release(&m_IPAddress);
447                 XMLString::release(&m_DNSAddress);
448             }
449
450             SubjectLocalityImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
451                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
452                 init();
453             }
454
455             SubjectLocalityImpl(const SubjectLocalityImpl& src)
456                     : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
457                 init();
458                 setIPAddress(src.getIPAddress());
459                 setDNSAddress(src.getDNSAddress());
460             }
461
462             IMPL_XMLOBJECT_CLONE(SubjectLocality);
463             IMPL_STRING_ATTRIB(IPAddress);
464             IMPL_STRING_ATTRIB(DNSAddress);
465
466         protected:
467             void marshallAttributes(DOMElement* domElement) const {
468                 MARSHALL_STRING_ATTRIB(IPAddress,IPADDRESS,nullptr);
469                 MARSHALL_STRING_ATTRIB(DNSAddress,DNSADDRESS,nullptr);
470             }
471
472             void processAttribute(const DOMAttr* attribute) {
473                 PROC_STRING_ATTRIB(IPAddress,IPADDRESS,nullptr);
474                 PROC_STRING_ATTRIB(DNSAddress,DNSADDRESS,nullptr);
475             }
476         };
477
478         class SAML_DLLLOCAL AuthorityBindingImpl : public virtual AuthorityBinding,
479             public AbstractSimpleElement,
480             public AbstractDOMCachingXMLObject,
481             public AbstractXMLObjectMarshaller,
482             public AbstractXMLObjectUnmarshaller
483         {
484             void init() {
485                 m_AuthorityKind=nullptr;
486                 m_Location=m_Binding=nullptr;
487             }
488
489         public:
490             virtual ~AuthorityBindingImpl() {
491                 delete m_AuthorityKind;
492                 XMLString::release(&m_Location);
493                 XMLString::release(&m_Binding);
494             }
495
496             AuthorityBindingImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
497                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
498                 init();
499             }
500
501             AuthorityBindingImpl(const AuthorityBindingImpl& src)
502                     : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
503                 init();
504                 setAuthorityKind(src.getAuthorityKind());
505                 setLocation(src.getLocation());
506                 setBinding(src.getBinding());
507             }
508
509             IMPL_XMLOBJECT_CLONE(AuthorityBinding);
510             IMPL_XMLOBJECT_ATTRIB(AuthorityKind,xmltooling::QName);
511             IMPL_STRING_ATTRIB(Location);
512             IMPL_STRING_ATTRIB(Binding);
513
514         protected:
515             void marshallAttributes(DOMElement* domElement) const {
516                 MARSHALL_QNAME_ATTRIB(AuthorityKind,AUTHORITYKIND,nullptr);
517                 MARSHALL_STRING_ATTRIB(Location,LOCATION,nullptr);
518                 MARSHALL_STRING_ATTRIB(Binding,BINDING,nullptr);
519             }
520
521             void processAttribute(const DOMAttr* attribute) {
522                 PROC_QNAME_ATTRIB(AuthorityKind,AUTHORITYKIND,nullptr);
523                 PROC_STRING_ATTRIB(Location,LOCATION,nullptr);
524                 PROC_STRING_ATTRIB(Binding,BINDING,nullptr);
525             }
526         };
527
528         class SAML_DLLLOCAL AuthenticationStatementImpl : public virtual AuthenticationStatement, public SubjectStatementImpl
529         {
530             void init() {
531                 m_AuthenticationMethod=nullptr;
532                 m_AuthenticationInstant=nullptr;
533                 m_SubjectLocality=nullptr;
534                 m_children.push_back(nullptr);
535                 m_pos_SubjectLocality=m_pos_Subject;
536                 ++m_pos_SubjectLocality;
537             }
538
539         public:
540             virtual ~AuthenticationStatementImpl() {
541                 XMLString::release(&m_AuthenticationMethod);
542                 delete m_AuthenticationInstant;
543             }
544
545             AuthenticationStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
546                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
547                 init();
548             }
549
550             AuthenticationStatementImpl(const AuthenticationStatementImpl& src) : AbstractXMLObject(src), SubjectStatementImpl(src) {
551                 init();
552             }
553
554             void _clone(const AuthenticationStatementImpl& src) {
555                 SubjectStatementImpl::_clone(src);
556                 setAuthenticationMethod(src.getAuthenticationMethod());
557                 setAuthenticationInstant(src.getAuthenticationInstant());
558                 if (src.getSubjectLocality())
559                     setSubjectLocality(src.getSubjectLocality()->cloneSubjectLocality());
560                 for (vector<AuthorityBinding*>::const_iterator i=src.m_AuthorityBindings.begin(); i!=src.m_AuthorityBindings.end(); i++) {
561                     if (*i) {
562                         getAuthorityBindings().push_back((*i)->cloneAuthorityBinding());
563                     }
564                 }
565             }
566
567             IMPL_XMLOBJECT_CLONE_EX(AuthenticationStatement);
568             IMPL_STRING_ATTRIB(AuthenticationMethod);
569             IMPL_DATETIME_ATTRIB(AuthenticationInstant,0);
570             IMPL_TYPED_CHILD(SubjectLocality);
571             IMPL_TYPED_CHILDREN(AuthorityBinding, m_children.end());
572
573         protected:
574             void marshallAttributes(DOMElement* domElement) const {
575                 MARSHALL_STRING_ATTRIB(AuthenticationMethod,AUTHENTICATIONMETHOD,nullptr);
576                 MARSHALL_DATETIME_ATTRIB(AuthenticationInstant,AUTHENTICATIONINSTANT,nullptr);
577                 SubjectStatementImpl::marshallAttributes(domElement);
578             }
579
580             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
581                 PROC_TYPED_CHILD(SubjectLocality,SAML1_NS,false);
582                 PROC_TYPED_CHILDREN(AuthorityBinding,SAML1_NS,false);
583                 SubjectStatementImpl::processChildElement(childXMLObject,root);
584             }
585
586             void processAttribute(const DOMAttr* attribute) {
587                 PROC_STRING_ATTRIB(AuthenticationMethod,AUTHENTICATIONMETHOD,nullptr);
588                 PROC_DATETIME_ATTRIB(AuthenticationInstant,AUTHENTICATIONINSTANT,nullptr);
589                 SubjectStatementImpl::processAttribute(attribute);
590             }
591         };
592
593         class SAML_DLLLOCAL ActionImpl : public virtual Action,
594             public AbstractSimpleElement,
595             public AbstractDOMCachingXMLObject,
596             public AbstractXMLObjectMarshaller,
597             public AbstractXMLObjectUnmarshaller
598         {
599         public:
600             virtual ~ActionImpl() {
601                 XMLString::release(&m_Namespace);
602             }
603
604             ActionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
605                     : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Namespace(nullptr) {
606             }
607
608             ActionImpl(const ActionImpl& src)
609                     : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src), m_Namespace(nullptr) {
610                 setNamespace(src.getNamespace());
611             }
612
613             IMPL_XMLOBJECT_CLONE(Action);
614             IMPL_STRING_ATTRIB(Namespace);
615
616         protected:
617             void marshallAttributes(DOMElement* domElement) const {
618                 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,nullptr);
619             }
620
621             void processAttribute(const DOMAttr* attribute) {
622                 PROC_STRING_ATTRIB(Namespace,NAMESPACE,nullptr);
623             }
624         };
625
626         class SAML_DLLLOCAL EvidenceImpl : public virtual Evidence,
627             public AbstractComplexElement,
628             public AbstractDOMCachingXMLObject,
629             public AbstractXMLObjectMarshaller,
630             public AbstractXMLObjectUnmarshaller
631         {
632         public:
633             virtual ~EvidenceImpl() {}
634
635             EvidenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
636                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
637             }
638
639             EvidenceImpl(const EvidenceImpl& src)
640                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
641                 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
642                     if (*i) {
643                         AssertionIDReference* ref=dynamic_cast<AssertionIDReference*>(*i);
644                         if (ref) {
645                             getAssertionIDReferences().push_back(ref->cloneAssertionIDReference());
646                             continue;
647                         }
648
649                         Assertion* assertion=dynamic_cast<Assertion*>(*i);
650                         if (assertion) {
651                             getAssertions().push_back(assertion->cloneAssertion());
652                             continue;
653                         }
654                     }
655                 }
656             }
657
658             IMPL_XMLOBJECT_CLONE(Evidence);
659             IMPL_TYPED_CHILDREN(AssertionIDReference,m_children.end());
660             IMPL_TYPED_CHILDREN(Assertion,m_children.end());
661
662         protected:
663             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
664                 PROC_TYPED_CHILDREN(AssertionIDReference,SAML1_NS,false);
665                 PROC_TYPED_CHILDREN(Assertion,SAML1_NS,true);
666                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
667             }
668         };
669
670         class SAML_DLLLOCAL AuthorizationDecisionStatementImpl
671             : public virtual AuthorizationDecisionStatement, public SubjectStatementImpl
672         {
673             void init() {
674                 m_Resource=nullptr;
675                 m_Decision=nullptr;
676                 m_Evidence=nullptr;
677                 m_children.push_back(nullptr);
678                 m_pos_Evidence=m_pos_Subject;
679                 ++m_pos_Evidence;
680             }
681
682         public:
683             virtual ~AuthorizationDecisionStatementImpl() {
684                 XMLString::release(&m_Resource);
685                 XMLString::release(&m_Decision);
686             }
687
688             AuthorizationDecisionStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
689                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
690                 init();
691             }
692
693             AuthorizationDecisionStatementImpl(const AuthorizationDecisionStatementImpl& src)
694                     : AbstractXMLObject(src), SubjectStatementImpl(src) {
695                 init();
696             }
697
698             void _clone(const AuthorizationDecisionStatementImpl& src) {
699                 SubjectStatementImpl::_clone(src);
700                 setResource(src.getResource());
701                 setDecision(src.getDecision());
702                 if (src.getEvidence())
703                     setEvidence(src.getEvidence()->cloneEvidence());
704                 for (vector<Action*>::const_iterator i=src.m_Actions.begin(); i!=src.m_Actions.end(); i++) {
705                     if (*i) {
706                         getActions().push_back((*i)->cloneAction());
707                     }
708                 }
709             }
710
711             IMPL_XMLOBJECT_CLONE_EX(AuthorizationDecisionStatement);
712             IMPL_STRING_ATTRIB(Resource);
713             IMPL_STRING_ATTRIB(Decision);
714             IMPL_TYPED_CHILD(Evidence);
715             IMPL_TYPED_CHILDREN(Action, m_pos_Evidence);
716
717         protected:
718             void marshallAttributes(DOMElement* domElement) const {
719                 MARSHALL_STRING_ATTRIB(Resource,RESOURCE,nullptr);
720                 MARSHALL_STRING_ATTRIB(Decision,DECISION,nullptr);
721                 SubjectStatementImpl::marshallAttributes(domElement);
722             }
723
724             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
725                 PROC_TYPED_CHILD(Evidence,SAML1_NS,false);
726                 PROC_TYPED_CHILDREN(Action,SAML1_NS,false);
727                 SubjectStatementImpl::processChildElement(childXMLObject,root);
728             }
729
730             void processAttribute(const DOMAttr* attribute) {
731                 PROC_STRING_ATTRIB(Resource,RESOURCE,nullptr);
732                 PROC_STRING_ATTRIB(Decision,DECISION,nullptr);
733                 SubjectStatementImpl::processAttribute(attribute);
734             }
735         };
736
737         class SAML_DLLLOCAL AttributeDesignatorImpl : public virtual AttributeDesignator,
738             public AbstractSimpleElement,
739             public AbstractDOMCachingXMLObject,
740             public AbstractXMLObjectMarshaller,
741             public AbstractXMLObjectUnmarshaller
742         {
743             void init() {
744                 m_AttributeName=m_AttributeNamespace=nullptr;
745             }
746
747         public:
748             virtual ~AttributeDesignatorImpl() {
749                 XMLString::release(&m_AttributeName);
750                 XMLString::release(&m_AttributeNamespace);
751             }
752
753             AttributeDesignatorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
754                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
755                 init();
756             }
757
758             AttributeDesignatorImpl(const AttributeDesignatorImpl& src)
759                     : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
760                 init();
761                 setAttributeName(src.getAttributeName());
762                 setAttributeNamespace(src.getAttributeNamespace());
763             }
764
765             IMPL_XMLOBJECT_CLONE(AttributeDesignator);
766             IMPL_STRING_ATTRIB(AttributeName);
767             IMPL_STRING_ATTRIB(AttributeNamespace);
768
769         protected:
770             void marshallAttributes(DOMElement* domElement) const {
771                 MARSHALL_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,nullptr);
772                 MARSHALL_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,nullptr);
773             }
774
775             void processAttribute(const DOMAttr* attribute) {
776                 PROC_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,nullptr);
777                 PROC_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,nullptr);
778             }
779         };
780
781         class SAML_DLLLOCAL AttributeImpl : public virtual Attribute,
782             public AbstractComplexElement,
783             public AbstractDOMCachingXMLObject,
784             public AbstractXMLObjectMarshaller,
785             public AbstractXMLObjectUnmarshaller
786         {
787             void init() {
788                 m_AttributeName=m_AttributeNamespace=nullptr;
789             }
790         public:
791             virtual ~AttributeImpl() {
792                 XMLString::release(&m_AttributeName);
793                 XMLString::release(&m_AttributeNamespace);
794             }
795
796             AttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
797                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
798                 init();
799             }
800
801             AttributeImpl(const AttributeImpl& src)
802                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
803                 init();
804                 setAttributeName(src.getAttributeName());
805                 setAttributeNamespace(src.getAttributeNamespace());
806                 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
807                     if (*i) {
808                         getAttributeValues().push_back((*i)->clone());
809                     }
810                 }
811             }
812
813             IMPL_XMLOBJECT_CLONE2(Attribute,AttributeDesignator);
814             IMPL_STRING_ATTRIB(AttributeName);
815             IMPL_STRING_ATTRIB(AttributeNamespace);
816             IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
817
818         protected:
819             void marshallAttributes(DOMElement* domElement) const {
820                 MARSHALL_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,nullptr);
821                 MARSHALL_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,nullptr);
822             }
823
824             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
825                 getAttributeValues().push_back(childXMLObject);
826             }
827
828             void processAttribute(const DOMAttr* attribute) {
829                 PROC_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,nullptr);
830                 PROC_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,nullptr);
831             }
832         };
833
834         class SAML_DLLLOCAL AttributeValueImpl : public virtual AttributeValue, public AnyElementImpl
835         {
836         public:
837             virtual ~AttributeValueImpl() {}
838
839             AttributeValueImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
840                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
841             }
842
843             AttributeValueImpl(const AttributeValueImpl& src) : AbstractXMLObject(src), AnyElementImpl(src) {}
844
845             IMPL_XMLOBJECT_CLONE_EX(AttributeValue);
846         };
847
848         class SAML_DLLLOCAL AttributeStatementImpl : public virtual AttributeStatement, public SubjectStatementImpl
849         {
850         public:
851             virtual ~AttributeStatementImpl() {}
852
853             AttributeStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
854                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
855             }
856
857             AttributeStatementImpl(const AttributeStatementImpl& src) : AbstractXMLObject(src), SubjectStatementImpl(src) {
858             }
859
860             void _clone(const AttributeStatementImpl& src) {
861                 SubjectStatementImpl::_clone(src);
862                 for (vector<Attribute*>::const_iterator i=src.m_Attributes.begin(); i!=src.m_Attributes.end(); i++) {
863                     if (*i) {
864                         getAttributes().push_back((*i)->cloneAttribute());
865                     }
866                 }
867             }
868
869             IMPL_XMLOBJECT_CLONE_EX(AttributeStatement);
870             IMPL_TYPED_CHILDREN(Attribute, m_children.end());
871
872         protected:
873             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
874                 PROC_TYPED_CHILDREN(Attribute,SAML1_NS,true);
875                 SubjectStatementImpl::processChildElement(childXMLObject,root);
876             }
877         };
878
879         class SAML_DLLLOCAL AdviceImpl : public virtual Advice,
880             public AbstractComplexElement,
881             public AbstractDOMCachingXMLObject,
882             public AbstractXMLObjectMarshaller,
883             public AbstractXMLObjectUnmarshaller
884         {
885         public:
886             virtual ~AdviceImpl() {}
887
888             AdviceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
889                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
890             }
891
892             AdviceImpl(const AdviceImpl& src)
893                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
894                 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
895                     if (*i) {
896                         AssertionIDReference* ref=dynamic_cast<AssertionIDReference*>(*i);
897                         if (ref) {
898                             getAssertionIDReferences().push_back(ref->cloneAssertionIDReference());
899                             continue;
900                         }
901
902                         Assertion* assertion=dynamic_cast<Assertion*>(*i);
903                         if (assertion) {
904                             getAssertions().push_back(assertion->cloneAssertion());
905                             continue;
906                         }
907
908                         if (*i) {
909                             getUnknownXMLObjects().push_back((*i)->clone());
910                         }
911                     }
912                 }
913             }
914
915             IMPL_XMLOBJECT_CLONE(Advice);
916             IMPL_TYPED_CHILDREN(AssertionIDReference,m_children.end());
917             IMPL_TYPED_CHILDREN(Assertion,m_children.end());
918             IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
919
920         protected:
921             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
922                 PROC_TYPED_CHILDREN(AssertionIDReference,SAML1_NS,false);
923                 PROC_TYPED_CHILDREN(Assertion,SAML1_NS,true);
924
925                 // Unknown child.
926                 const XMLCh* nsURI=root->getNamespaceURI();
927                 if (!XMLString::equals(nsURI,SAML1_NS) && nsURI && *nsURI) {
928                     getUnknownXMLObjects().push_back(childXMLObject);
929                     return;
930                 }
931
932                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
933             }
934         };
935
936         class SAML_DLLLOCAL AssertionImpl : public virtual Assertion,
937             public AbstractComplexElement,
938             public AbstractDOMCachingXMLObject,
939             public AbstractXMLObjectMarshaller,
940             public AbstractXMLObjectUnmarshaller
941         {
942             void init() {
943                 m_MinorVersion=nullptr;
944                 m_AssertionID=nullptr;
945                 m_Issuer=nullptr;
946                 m_IssueInstant=nullptr;
947                 m_children.push_back(nullptr);
948                 m_children.push_back(nullptr);
949                 m_children.push_back(nullptr);
950                 m_Conditions=nullptr;
951                 m_Advice=nullptr;
952                 m_Signature=nullptr;
953                 m_pos_Conditions=m_children.begin();
954                 m_pos_Advice=m_pos_Conditions;
955                 ++m_pos_Advice;
956                 m_pos_Signature=m_pos_Advice;
957                 ++m_pos_Signature;
958             }
959
960         public:
961             virtual ~AssertionImpl() {
962                 XMLString::release(&m_MinorVersion);
963                 XMLString::release(&m_AssertionID);
964                 XMLString::release(&m_Issuer);
965                 delete m_IssueInstant;
966             }
967
968             AssertionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
969                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
970                 init();
971             }
972
973             AssertionImpl(const AssertionImpl& src)
974                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
975                 init();
976                 setMinorVersion(src.m_MinorVersion);
977                 setAssertionID(src.getAssertionID());
978                 setIssuer(src.getIssuer());
979                 setIssueInstant(src.getIssueInstant());
980                 if (src.getConditions())
981                     setConditions(src.getConditions()->cloneConditions());
982                 if (src.getAdvice())
983                     setAdvice(src.getAdvice()->cloneAdvice());
984                 if (src.getSignature())
985                     setSignature(src.getSignature()->cloneSignature());
986                 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
987                     if (*i) {
988                         AuthenticationStatement* authst=dynamic_cast<AuthenticationStatement*>(*i);
989                         if (authst) {
990                             getAuthenticationStatements().push_back(authst->cloneAuthenticationStatement());
991                             continue;
992                         }
993
994                         AttributeStatement* attst=dynamic_cast<AttributeStatement*>(*i);
995                         if (attst) {
996                             getAttributeStatements().push_back(attst->cloneAttributeStatement());
997                             continue;
998                         }
999
1000                         AuthorizationDecisionStatement* authzst=dynamic_cast<AuthorizationDecisionStatement*>(*i);
1001                         if (authzst) {
1002                             getAuthorizationDecisionStatements().push_back(authzst->cloneAuthorizationDecisionStatement());
1003                             continue;
1004                         }
1005
1006                         SubjectStatement* subst=dynamic_cast<SubjectStatement*>(*i);
1007                         if (subst) {
1008                             getSubjectStatements().push_back(subst->cloneSubjectStatement());
1009                             continue;
1010                         }
1011
1012                         Statement* st=dynamic_cast<Statement*>(*i);
1013                         if (st) {
1014                             getStatements().push_back(st->cloneStatement());
1015                             continue;
1016                         }
1017                     }
1018                 }
1019             }
1020
1021             //IMPL_TYPED_CHILD(Signature);
1022             // Need customized setter.
1023         protected:
1024             Signature* m_Signature;
1025             list<XMLObject*>::iterator m_pos_Signature;
1026         public:
1027             Signature* getSignature() const {
1028                 return m_Signature;
1029             }
1030
1031             void setSignature(Signature* sig) {
1032                 prepareForAssignment(m_Signature,sig);
1033                 *m_pos_Signature=m_Signature=sig;
1034                 // Sync content reference back up.
1035                 if (m_Signature)
1036                     m_Signature->setContentReference(new opensaml::ContentReference(*this));
1037             }
1038
1039             IMPL_XMLOBJECT_CLONE(Assertion);
1040             IMPL_INTEGER_ATTRIB(MinorVersion);
1041             IMPL_STRING_ATTRIB(AssertionID);    // have to special-case getXMLID
1042             const XMLCh* getXMLID() const {
1043                 pair<bool,int> v = getMinorVersion();
1044                 return (!v.first || v.second > 0) ? m_AssertionID : nullptr;
1045             }
1046             const XMLCh* getID() const {
1047                 return getAssertionID();
1048             }
1049             void releaseDOM() const {
1050                 if (getDOM())
1051                     getDOM()->removeAttributeNS(nullptr, ASSERTIONID_ATTRIB_NAME);
1052                 AbstractDOMCachingXMLObject::releaseDOM();
1053             }
1054             IMPL_STRING_ATTRIB(Issuer);
1055             IMPL_DATETIME_ATTRIB(IssueInstant,0);
1056             IMPL_TYPED_CHILD(Conditions);
1057             IMPL_TYPED_CHILD(Advice);
1058             IMPL_TYPED_CHILDREN(Statement, m_pos_Signature);
1059             IMPL_TYPED_CHILDREN(SubjectStatement, m_pos_Signature);
1060             IMPL_TYPED_CHILDREN(AuthenticationStatement, m_pos_Signature);
1061             IMPL_TYPED_CHILDREN(AttributeStatement, m_pos_Signature);
1062             IMPL_TYPED_CHILDREN(AuthorizationDecisionStatement, m_pos_Signature);
1063
1064         protected:
1065             void prepareForMarshalling() const {
1066                 if (m_Signature)
1067                     declareNonVisibleNamespaces();
1068             }
1069
1070             void marshallAttributes(DOMElement* domElement) const {
1071                 static const XMLCh MAJORVERSION[] = UNICODE_LITERAL_12(M,a,j,o,r,V,e,r,s,i,o,n);
1072                 domElement->setAttributeNS(nullptr,MAJORVERSION,XML_ONE);
1073                 if (!m_MinorVersion)
1074                     const_cast<AssertionImpl*>(this)->m_MinorVersion=XMLString::replicate(XML_ONE);
1075                 MARSHALL_INTEGER_ATTRIB(MinorVersion,MINORVERSION,nullptr);
1076                 if (!m_AssertionID)
1077                     const_cast<AssertionImpl*>(this)->m_AssertionID=SAMLConfig::getConfig().generateIdentifier();
1078                 domElement->setAttributeNS(nullptr, ASSERTIONID_ATTRIB_NAME, m_AssertionID);
1079                 if (*m_MinorVersion!=chDigit_0) {
1080 #ifdef XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE
1081                     domElement->setIdAttributeNS(nullptr, ASSERTIONID_ATTRIB_NAME, true);
1082 #else
1083                     domElement->setIdAttributeNS(nullptr, ASSERTIONID_ATTRIB_NAME);
1084 #endif
1085                 }
1086                 MARSHALL_STRING_ATTRIB(Issuer,ISSUER,nullptr);
1087                 if (!m_IssueInstant) {
1088                     const_cast<AssertionImpl*>(this)->m_IssueInstantEpoch=time(nullptr);
1089                     const_cast<AssertionImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
1090                 }
1091                 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,nullptr);
1092             }
1093
1094             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1095                 PROC_TYPED_CHILD(Conditions,SAML1_NS,false);
1096                 PROC_TYPED_CHILD(Advice,SAML1_NS,false);
1097                 PROC_TYPED_CHILD(Signature,XMLSIG_NS,false);
1098                 PROC_TYPED_CHILDREN(AuthenticationStatement,SAML1_NS,false);
1099                 PROC_TYPED_CHILDREN(AttributeStatement,SAML1_NS,false);
1100                 PROC_TYPED_CHILDREN(AuthorizationDecisionStatement,SAML1_NS,false);
1101                 PROC_TYPED_CHILDREN(SubjectStatement,SAML1_NS,true);
1102                 PROC_TYPED_CHILDREN(Statement,SAML1_NS,true);
1103                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1104             }
1105
1106             void unmarshallAttributes(const DOMElement* domElement) {
1107                 // Standard processing, but then we check IDness.
1108                 AbstractXMLObjectUnmarshaller::unmarshallAttributes(domElement);
1109                 if (m_AssertionID && (!m_MinorVersion || *m_MinorVersion!=chDigit_0)) {
1110 #ifdef XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE
1111                     const_cast<DOMElement*>(domElement)->setIdAttributeNS(nullptr, ASSERTIONID_ATTRIB_NAME, true);
1112 #else
1113                     const_cast<DOMElement*>(domElement)->setIdAttributeNS(nullptr, ASSERTIONID_ATTRIB_NAME);
1114 #endif
1115                 }
1116             }
1117
1118             void processAttribute(const DOMAttr* attribute) {
1119                 static const XMLCh MAJORVERSION[] = UNICODE_LITERAL_12(M,a,j,o,r,V,e,r,s,i,o,n);
1120                 if (XMLHelper::isNodeNamed(attribute,nullptr,MAJORVERSION)) {
1121                     if (!XMLString::equals(attribute->getValue(),XML_ONE))
1122                         throw UnmarshallingException("Assertion has invalid major version.");
1123                 }
1124                 PROC_INTEGER_ATTRIB(MinorVersion,MINORVERSION,nullptr);
1125                 PROC_STRING_ATTRIB(AssertionID,ASSERTIONID,nullptr);
1126                 PROC_STRING_ATTRIB(Issuer,ISSUER,nullptr);
1127                 PROC_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,nullptr);
1128             }
1129         };
1130
1131     };
1132 };
1133
1134 #if defined (_MSC_VER)
1135     #pragma warning( pop )
1136 #endif
1137
1138 // Builder Implementations
1139
1140 IMPL_XMLOBJECTBUILDER(Action);
1141 IMPL_XMLOBJECTBUILDER(Advice);
1142 IMPL_XMLOBJECTBUILDER(Assertion);
1143 IMPL_XMLOBJECTBUILDER(AssertionIDReference);
1144 IMPL_XMLOBJECTBUILDER(Attribute);
1145 IMPL_XMLOBJECTBUILDER(AttributeDesignator);
1146 IMPL_XMLOBJECTBUILDER(AttributeStatement);
1147 IMPL_XMLOBJECTBUILDER(AttributeValue);
1148 IMPL_XMLOBJECTBUILDER(Audience);
1149 IMPL_XMLOBJECTBUILDER(AudienceRestrictionCondition);
1150 IMPL_XMLOBJECTBUILDER(AuthenticationStatement);
1151 IMPL_XMLOBJECTBUILDER(AuthorizationDecisionStatement);
1152 IMPL_XMLOBJECTBUILDER(AuthorityBinding);
1153 IMPL_XMLOBJECTBUILDER(Condition);
1154 IMPL_XMLOBJECTBUILDER(Conditions);
1155 IMPL_XMLOBJECTBUILDER(ConfirmationMethod);
1156 IMPL_XMLOBJECTBUILDER(DoNotCacheCondition);
1157 IMPL_XMLOBJECTBUILDER(Evidence);
1158 IMPL_XMLOBJECTBUILDER(NameIdentifier);
1159 IMPL_XMLOBJECTBUILDER(Statement);
1160 IMPL_XMLOBJECTBUILDER(Subject);
1161 IMPL_XMLOBJECTBUILDER(SubjectConfirmation);
1162 IMPL_XMLOBJECTBUILDER(SubjectConfirmationData);
1163 IMPL_XMLOBJECTBUILDER(SubjectLocality);
1164
1165 // Unicode literals
1166 const XMLCh Action::LOCAL_NAME[] =                  UNICODE_LITERAL_6(A,c,t,i,o,n);
1167 const XMLCh Action::TYPE_NAME[] =                   UNICODE_LITERAL_10(A,c,t,i,o,n,T,y,p,e);
1168 const XMLCh Action::NAMESPACE_ATTRIB_NAME[] =       UNICODE_LITERAL_9(N,a,m,e,s,p,a,c,e);
1169 const XMLCh Advice::LOCAL_NAME[] =                  UNICODE_LITERAL_6(A,d,v,i,c,e);
1170 const XMLCh Advice::TYPE_NAME[] =                   UNICODE_LITERAL_10(A,d,v,i,c,e,T,y,p,e);
1171 const XMLCh Assertion::LOCAL_NAME[] =               UNICODE_LITERAL_9(A,s,s,e,r,t,i,o,n);
1172 const XMLCh Assertion::TYPE_NAME[] =                UNICODE_LITERAL_13(A,s,s,e,r,t,i,o,n,T,y,p,e);
1173 const XMLCh Assertion::MINORVERSION_ATTRIB_NAME[] = UNICODE_LITERAL_12(M,i,n,o,r,V,e,r,s,i,o,n);
1174 const XMLCh Assertion::ASSERTIONID_ATTRIB_NAME[] =  UNICODE_LITERAL_11(A,s,s,e,r,t,i,o,n,I,D);
1175 const XMLCh Assertion::ISSUER_ATTRIB_NAME[] =       UNICODE_LITERAL_6(I,s,s,u,e,r);
1176 const XMLCh Assertion::ISSUEINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,s,s,u,e,I,n,s,t,a,n,t);
1177 const XMLCh AssertionIDReference::LOCAL_NAME[] =    UNICODE_LITERAL_20(A,s,s,e,r,t,i,o,n,I,D,R,e,f,e,r,e,n,c,e);
1178 const XMLCh Attribute::LOCAL_NAME[] =               UNICODE_LITERAL_9(A,t,t,r,i,b,u,t,e);
1179 const XMLCh Attribute::TYPE_NAME[] =                UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,T,y,p,e);
1180 const XMLCh AttributeDesignator::LOCAL_NAME[] =     UNICODE_LITERAL_19(A,t,t,r,i,b,u,t,e,D,e,s,i,g,n,a,t,o,r);
1181 const XMLCh AttributeDesignator::TYPE_NAME[] =      UNICODE_LITERAL_23(A,t,t,r,i,b,u,t,e,D,e,s,i,g,n,a,t,o,r,T,y,p,e);
1182 const XMLCh AttributeDesignator::ATTRIBUTENAME_ATTRIB_NAME[] =              UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,N,a,m,e);
1183 const XMLCh AttributeDesignator::ATTRIBUTENAMESPACE_ATTRIB_NAME[] =         UNICODE_LITERAL_18(A,t,t,r,i,b,u,t,e,N,a,m,e,s,p,a,c,e);
1184 const XMLCh AttributeStatement::LOCAL_NAME[] =      UNICODE_LITERAL_18(A,t,t,r,i,b,u,t,e,S,t,a,t,e,m,e,n,t);
1185 const XMLCh AttributeStatement::TYPE_NAME[] =       UNICODE_LITERAL_22(A,t,t,r,i,b,u,t,e,S,t,a,t,e,m,e,n,t,T,y,p,e);
1186 const XMLCh AttributeValue::LOCAL_NAME[] =          UNICODE_LITERAL_14(A,t,t,r,i,b,u,t,e,V,a,l,u,e);
1187 const XMLCh Audience::LOCAL_NAME[] =                UNICODE_LITERAL_8(A,u,d,i,e,n,c,e);
1188 const XMLCh AudienceRestrictionCondition::LOCAL_NAME[] =    UNICODE_LITERAL_28(A,u,d,i,e,n,c,e,R,e,s,t,r,i,c,t,i,o,n,C,o,n,d,i,t,i,o,n);
1189 const XMLCh AudienceRestrictionCondition::TYPE_NAME[] =     UNICODE_LITERAL_32(A,u,d,i,e,n,c,e,R,e,s,t,r,i,c,t,i,o,n,C,o,n,d,i,t,i,o,n,T,y,p,e);
1190 const XMLCh AuthenticationStatement::LOCAL_NAME[] = UNICODE_LITERAL_23(A,u,t,h,e,n,t,i,c,a,t,i,o,n,S,t,a,t,e,m,e,n,t);
1191 const XMLCh AuthenticationStatement::TYPE_NAME[] =  UNICODE_LITERAL_27(A,u,t,h,e,n,t,i,c,a,t,i,o,n,S,t,a,t,e,m,e,n,t,T,y,p,e);
1192 const XMLCh AuthenticationStatement::AUTHENTICATIONMETHOD_ATTRIB_NAME[] =   UNICODE_LITERAL_20(A,u,t,h,e,n,t,i,c,a,t,i,o,n,M,e,t,h,o,d);
1193 const XMLCh AuthenticationStatement::AUTHENTICATIONINSTANT_ATTRIB_NAME[] =  UNICODE_LITERAL_21(A,u,t,h,e,n,t,i,c,a,t,i,o,n,I,n,s,t,a,n,t);
1194 const XMLCh AuthorityBinding::LOCAL_NAME[] =        UNICODE_LITERAL_16(A,u,t,h,o,r,i,t,y,B,i,n,d,i,n,g);
1195 const XMLCh AuthorityBinding::TYPE_NAME[] =         UNICODE_LITERAL_20(A,u,t,h,o,r,i,t,y,B,i,n,d,i,n,g,T,y,p,e);
1196 const XMLCh AuthorityBinding::AUTHORITYKIND_ATTRIB_NAME[] = UNICODE_LITERAL_13(A,u,t,h,o,r,i,t,y,K,i,n,d);
1197 const XMLCh AuthorityBinding::LOCATION_ATTRIB_NAME[] =      UNICODE_LITERAL_8(L,o,c,a,t,i,o,n);
1198 const XMLCh AuthorityBinding::BINDING_ATTRIB_NAME[] =       UNICODE_LITERAL_7(B,i,n,d,i,n,g);
1199 const XMLCh AuthorizationDecisionStatement::LOCAL_NAME[] =  UNICODE_LITERAL_30(A,u,t,h,o,r,i,z,a,t,i,o,n,D,e,c,i,s,i,o,n,S,t,a,t,e,m,e,n,t);
1200 const XMLCh AuthorizationDecisionStatement::TYPE_NAME[] =   UNICODE_LITERAL_34(A,u,t,h,o,r,i,z,a,t,i,o,n,D,e,c,i,s,i,o,n,S,t,a,t,e,m,e,n,t,T,y,p,e);
1201 const XMLCh AuthorizationDecisionStatement::RESOURCE_ATTRIB_NAME[] =        UNICODE_LITERAL_8(R,e,s,o,u,r,c,e);
1202 const XMLCh AuthorizationDecisionStatement::DECISION_ATTRIB_NAME[] =        UNICODE_LITERAL_8(D,e,c,i,s,i,o,n);
1203 const XMLCh AuthorizationDecisionStatement::DECISION_PERMIT[] =             UNICODE_LITERAL_6(P,e,r,m,i,t);
1204 const XMLCh AuthorizationDecisionStatement::DECISION_DENY[] =               UNICODE_LITERAL_4(D,e,n,y);
1205 const XMLCh AuthorizationDecisionStatement::DECISION_INDETERMINATE[] =      UNICODE_LITERAL_13(I,n,d,e,t,e,r,m,i,n,a,t,e);
1206 const XMLCh Condition::LOCAL_NAME[] =               UNICODE_LITERAL_9(C,o,n,d,i,t,i,o,n);
1207 const XMLCh Conditions::LOCAL_NAME[] =              UNICODE_LITERAL_10(C,o,n,d,i,t,i,o,n,s);
1208 const XMLCh Conditions::TYPE_NAME[] =               UNICODE_LITERAL_14(C,o,n,d,i,t,i,o,n,s,T,y,p,e);
1209 const XMLCh Conditions::NOTBEFORE_ATTRIB_NAME[] =   UNICODE_LITERAL_9(N,o,t,B,e,f,o,r,e);
1210 const XMLCh Conditions::NOTONORAFTER_ATTRIB_NAME[] =UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1211 const XMLCh ConfirmationMethod::LOCAL_NAME[] =      UNICODE_LITERAL_18(C,o,n,f,i,r,m,a,t,i,o,n,M,e,t,h,o,d);
1212 const XMLCh DoNotCacheCondition::LOCAL_NAME[] =     UNICODE_LITERAL_19(D,o,N,o,t,C,a,c,h,e,C,o,n,d,i,t,i,o,n);
1213 const XMLCh DoNotCacheCondition::TYPE_NAME[] =      UNICODE_LITERAL_23(D,o,N,o,t,C,a,c,h,e,C,o,n,d,i,t,i,o,n,T,y,p,e);
1214 const XMLCh Evidence::LOCAL_NAME[] =                UNICODE_LITERAL_8(E,v,i,d,e,n,c,e);
1215 const XMLCh Evidence::TYPE_NAME[] =                 UNICODE_LITERAL_12(E,v,i,d,e,n,c,e,T,y,p,e);
1216 const XMLCh NameIdentifier::LOCAL_NAME[] =          UNICODE_LITERAL_14(N,a,m,e,I,d,e,n,t,i,f,i,e,r);
1217 const XMLCh NameIdentifier::TYPE_NAME[] =           UNICODE_LITERAL_18(N,a,m,e,I,d,e,n,t,i,f,i,e,r,T,y,p,e);
1218 const XMLCh NameIdentifier::NAMEQUALIFIER_ATTRIB_NAME[] =   UNICODE_LITERAL_13(N,a,m,e,Q,u,a,l,i,f,i,e,r);
1219 const XMLCh NameIdentifier::FORMAT_ATTRIB_NAME[] =  UNICODE_LITERAL_6(F,o,r,m,a,t);
1220 const XMLCh Statement::LOCAL_NAME[] =               UNICODE_LITERAL_9(S,t,a,t,e,m,e,n,t);
1221 const XMLCh Subject::LOCAL_NAME[] =                 UNICODE_LITERAL_7(S,u,b,j,e,c,t);
1222 const XMLCh Subject::TYPE_NAME[] =                  UNICODE_LITERAL_11(S,u,b,j,e,c,t,T,y,p,e);
1223 const XMLCh SubjectConfirmation::LOCAL_NAME[] =     UNICODE_LITERAL_19(S,u,b,j,e,c,t,C,o,n,f,i,r,m,a,t,i,o,n);
1224 const XMLCh SubjectConfirmation::TYPE_NAME[] =      UNICODE_LITERAL_23(S,u,b,j,e,c,t,C,o,n,f,i,r,m,a,t,i,o,n,T,y,p,e);
1225 const XMLCh SubjectConfirmationData::LOCAL_NAME[] = UNICODE_LITERAL_23(S,u,b,j,e,c,t,C,o,n,f,i,r,m,a,t,i,o,n,D,a,t,a);
1226 const XMLCh SubjectLocality::LOCAL_NAME[] =         UNICODE_LITERAL_15(S,u,b,j,e,c,t,L,o,c,a,l,i,t,y);
1227 const XMLCh SubjectLocality::TYPE_NAME[] =          UNICODE_LITERAL_19(S,u,b,j,e,c,t,L,o,c,a,l,i,t,y,T,y,p,e);
1228 const XMLCh SubjectLocality::IPADDRESS_ATTRIB_NAME[] =      UNICODE_LITERAL_9(I,P,A,d,d,r,e,s,s);
1229 const XMLCh SubjectLocality::DNSADDRESS_ATTRIB_NAME[] =     UNICODE_LITERAL_10(D,N,S,A,d,d,r,e,s,s);
1230 const XMLCh SubjectStatement::LOCAL_NAME[] =        UNICODE_LITERAL_16(S,u,b,j,e,c,t,S,t,a,t,e,m,e,n,t);
1231
1232 const XMLCh NameIdentifier::UNSPECIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
1233 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1234   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1235   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1236   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1237   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1238   chLatin_u, chLatin_n, chLatin_s, chLatin_p, chLatin_e, chLatin_c, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d, chLatin_d, chNull
1239 };
1240
1241 const XMLCh NameIdentifier::EMAIL[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
1242 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1243   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1244   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1245   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1246   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1247   chLatin_e, chLatin_m, chLatin_a, chLatin_i, chLatin_l, chLatin_A, chLatin_d, chLatin_d, chLatin_r, chLatin_e, chLatin_s, chLatin_s, chNull
1248 };
1249
1250 const XMLCh NameIdentifier::X509_SUBJECT[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName
1251 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1252   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1253   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1254   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1255   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1256   chLatin_X, chDigit_5, chDigit_0, chDigit_9, chLatin_S, chLatin_u, chLatin_b, chLatin_j, chLatin_e, chLatin_c, chLatin_t,
1257   chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1258 };
1259
1260 const XMLCh NameIdentifier::WIN_DOMAIN_QUALIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName
1261 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1262   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1263   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1264   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1265   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1266   chLatin_W, chLatin_i, chLatin_n, chLatin_d, chLatin_o, chLatin_w, chLatin_s,
1267   chLatin_D, chLatin_o, chLatin_m, chLatin_a, chLatin_i, chLatin_n,
1268   chLatin_Q, chLatin_u, chLatin_a, chLatin_l, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d,
1269   chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1270 };
1271
1272 const XMLCh SubjectConfirmation::ARTIFACT01[] = // urn:oasis:names:tc:SAML:1.0:cm:artifact-01
1273 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1274   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1275   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1276   chLatin_c, chLatin_m, chColon, chLatin_a, chLatin_r, chLatin_t, chLatin_i, chLatin_f, chLatin_a, chLatin_c, chLatin_t,
1277       chDash, chDigit_0, chDigit_1, chNull
1278 };
1279
1280 const XMLCh SubjectConfirmation::ARTIFACT[] = // urn:oasis:names:tc:SAML:1.0:cm:artifact
1281 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1282   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1283   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1284   chLatin_c, chLatin_m, chColon, chLatin_a, chLatin_r, chLatin_t, chLatin_i, chLatin_f, chLatin_a, chLatin_c, chLatin_t, chNull
1285 };
1286
1287 const XMLCh SubjectConfirmation::BEARER[] = // urn:oasis:names:tc:SAML:1.0:cm:bearer
1288 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1289   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1290   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1291   chLatin_c, chLatin_m, chColon, chLatin_b, chLatin_e, chLatin_a, chLatin_r, chLatin_e, chLatin_r, chNull
1292 };
1293
1294 const XMLCh SubjectConfirmation::HOLDER_KEY[] = // urn:oasis:names:tc:SAML:1.0:cm:holder-of-key
1295 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1296   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1297   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1298   chLatin_c, chLatin_m, chColon, chLatin_h, chLatin_o, chLatin_l, chLatin_d, chLatin_e, chLatin_r, chDash,
1299       chLatin_o, chLatin_f, chDash, chLatin_k, chLatin_e, chLatin_y, chNull
1300 };
1301
1302 const XMLCh SubjectConfirmation::SENDER_VOUCHES[] = // urn:oasis:names:tc:SAML:1.0:cm:sender-vouches
1303 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1304   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1305   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1306   chLatin_c, chLatin_m, chColon, chLatin_s, chLatin_e, chLatin_n, chLatin_d, chLatin_e, chLatin_r, chDash,
1307       chLatin_v, chLatin_o, chLatin_u, chLatin_c, chLatin_h, chLatin_e, chLatin_s, chNull
1308 };
1309
1310 const XMLCh Action::RWEDC_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc
1311 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1312   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1313   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1314   chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1315   chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chNull
1316 };
1317
1318 const XMLCh Action::RWEDC_NEG_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc-negation
1319 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1320   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1321   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1322   chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1323   chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chDash,
1324   chLatin_n, chLatin_e, chLatin_g, chLatin_a, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chNull
1325 };
1326
1327 const XMLCh Action::GHPP_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:ghpp
1328 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1329   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1330   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1331   chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1332   chLatin_g, chLatin_h, chLatin_p, chLatin_p, chNull
1333 };
1334
1335 const XMLCh Action::UNIX_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:unix
1336 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1337   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1338   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1339   chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1340   chLatin_u, chLatin_n, chLatin_i, chLatin_x, chNull
1341 };