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