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