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