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