af0dbf00203a8c778e40195f8973b7146405a06b
[shibboleth/cpp-opensaml.git] / saml / saml2 / core / impl / Assertions20Impl.cpp
1 /*
2  *  Copyright 2001-2007 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  * Assertions20Impl.cpp
19  * 
20  * Implementation classes for SAML 2.0 Assertions schema
21  */
22
23 #include "internal.h"
24 #include "exceptions.h"
25 #include "saml/encryption/EncryptedKeyResolver.h"
26 #include "saml2/core/Assertions.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/util/XMLHelper.h>
34
35 #include <ctime>
36 #include <xercesc/util/XMLUniDefs.hpp>
37
38 using namespace opensaml::saml2;
39 using namespace xmlencryption;
40 using namespace xmlsignature;
41 using namespace xmltooling;
42 using namespace std;
43 using xmlconstants::XMLSIG_NS;
44 using xmlconstants::XMLENC_NS;
45 using samlconstants::SAML20_NS;
46
47 #if defined (_MSC_VER)
48     #pragma warning( push )
49     #pragma warning( disable : 4250 4251 )
50 #endif
51
52 namespace opensaml {
53     namespace saml2 {
54
55         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AssertionIDRef);
56         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AssertionURIRef);
57         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Audience);
58         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AuthnContextClassRef);
59         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AuthnContextDeclRef);
60         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AuthenticatingAuthority);
61
62         class SAML_DLLLOCAL NameIDTypeImpl : public virtual NameIDType,
63             public AbstractSimpleElement,
64             public AbstractDOMCachingXMLObject,
65             public AbstractXMLObjectMarshaller,
66             public AbstractXMLObjectUnmarshaller
67         {
68             void init() {
69                 m_Format=m_SPProvidedID=m_NameQualifier=m_SPNameQualifier=NULL;
70             }
71             
72         protected:
73             NameIDTypeImpl() {
74                 init();
75             }
76             
77         public:
78             virtual ~NameIDTypeImpl() {
79                 XMLString::release(&m_NameQualifier);
80                 XMLString::release(&m_SPNameQualifier);
81                 XMLString::release(&m_Format);
82                 XMLString::release(&m_SPProvidedID);
83             }
84     
85             NameIDTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
86                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
87                 init();
88             }
89                 
90             NameIDTypeImpl(const NameIDTypeImpl& src)
91                     : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
92                 init();
93                 setNameQualifier(src.getNameQualifier());
94                 setSPNameQualifier(src.getSPNameQualifier());
95                 setFormat(src.getFormat());
96                 setSPProvidedID(src.getSPProvidedID());
97             }
98             
99             IMPL_XMLOBJECT_CLONE(NameIDType);
100             IMPL_STRING_ATTRIB(NameQualifier);
101             IMPL_STRING_ATTRIB(SPNameQualifier);
102             IMPL_STRING_ATTRIB(Format);
103             IMPL_STRING_ATTRIB(SPProvidedID);
104     
105         protected:
106             void marshallAttributes(DOMElement* domElement) const {
107                 MARSHALL_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,NULL);
108                 MARSHALL_STRING_ATTRIB(SPNameQualifier,SPNAMEQUALIFIER,NULL);
109                 MARSHALL_STRING_ATTRIB(Format,FORMAT,NULL);
110                 MARSHALL_STRING_ATTRIB(SPProvidedID,SPPROVIDEDID,NULL);
111             }
112
113             void processAttribute(const DOMAttr* attribute) {
114                 PROC_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,NULL);
115                 PROC_STRING_ATTRIB(SPNameQualifier,SPNAMEQUALIFIER,NULL);
116                 PROC_STRING_ATTRIB(Format,FORMAT,NULL);
117                 PROC_STRING_ATTRIB(SPProvidedID,SPPROVIDEDID,NULL);
118                 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
119             }
120         };
121
122         class SAML_DLLLOCAL NameIDImpl : public virtual NameID, public NameIDTypeImpl
123         {
124         public:
125             virtual ~NameIDImpl() {}
126     
127             NameIDImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
128                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
129                 
130             NameIDImpl(const NameIDImpl& src) : AbstractXMLObject(src), NameIDTypeImpl(src) {}
131             
132             IMPL_XMLOBJECT_CLONE(NameID);
133             NameIDType* cloneNameIDType() const {
134                 return new NameIDImpl(*this);
135             }
136         };
137
138         class SAML_DLLLOCAL IssuerImpl : public virtual Issuer, public NameIDTypeImpl
139         {
140         public:
141             virtual ~IssuerImpl() {}
142     
143             IssuerImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
144                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
145                 
146             IssuerImpl(const IssuerImpl& src) : AbstractXMLObject(src), NameIDTypeImpl(src) {}
147             
148             IMPL_XMLOBJECT_CLONE(Issuer);
149             NameIDType* cloneNameIDType() const {
150                 return new IssuerImpl(*this);
151             }
152         };
153
154         //TODO unit test for this
155         //  - need to test encryption/decryption too, or already done in xmltooling ?
156         class SAML_DLLLOCAL EncryptedElementTypeImpl : public virtual EncryptedElementType,
157             public AbstractComplexElement,
158             public AbstractDOMCachingXMLObject,
159             public AbstractXMLObjectMarshaller,
160             public AbstractXMLObjectUnmarshaller
161         {
162             void init() {
163                 m_EncryptedData=NULL;
164                 m_children.push_back(NULL);
165                 m_pos_EncryptedData=m_children.begin();
166             }
167             
168         protected:
169             EncryptedElementTypeImpl() {
170                 init();
171             }
172             
173         public:
174             virtual ~EncryptedElementTypeImpl() {}
175     
176             EncryptedElementTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
177                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
178                 init();
179             }
180                 
181             EncryptedElementTypeImpl(const EncryptedElementTypeImpl& src)
182                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
183                 init();
184                 if (src.getEncryptedData())
185                     setEncryptedData(src.getEncryptedData()->cloneEncryptedData());
186                 VectorOf(EncryptedKey) v=getEncryptedKeys();
187                 for (vector<EncryptedKey*>::const_iterator i=src.m_EncryptedKeys.begin(); i!=src.m_EncryptedKeys.end(); i++) {
188                     if (*i) {
189                         v.push_back((*i)->cloneEncryptedKey());
190                     }
191                 }
192             }
193         
194             IMPL_XMLOBJECT_CLONE(EncryptedElementType);
195             IMPL_TYPED_FOREIGN_CHILD(EncryptedData,xmlencryption);
196             IMPL_TYPED_FOREIGN_CHILDREN(EncryptedKey,xmlencryption,m_children.end());
197     
198         protected:
199             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
200                 PROC_TYPED_FOREIGN_CHILD(EncryptedData,xmlencryption,XMLENC_NS,false);
201                 PROC_TYPED_FOREIGN_CHILDREN(EncryptedKey,xmlencryption,XMLENC_NS,false);
202                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
203             }
204         };
205
206         class SAML_DLLLOCAL EncryptedIDImpl : public virtual EncryptedID, public EncryptedElementTypeImpl
207         {
208         public:
209             virtual ~EncryptedIDImpl() {}
210     
211             EncryptedIDImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
212                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
213                 
214             EncryptedIDImpl(const EncryptedIDImpl& src) : AbstractXMLObject(src), EncryptedElementTypeImpl(src) {}
215             
216             IMPL_XMLOBJECT_CLONE(EncryptedID);
217             EncryptedElementType* cloneEncryptedElementType() const {
218                 return new EncryptedIDImpl(*this);
219             }
220         };
221
222         class SAML_DLLLOCAL AudienceRestrictionImpl : public virtual AudienceRestriction,
223             public AbstractComplexElement,
224             public AbstractDOMCachingXMLObject,
225             public AbstractXMLObjectMarshaller,
226             public AbstractXMLObjectUnmarshaller
227         {
228         public:
229             virtual ~AudienceRestrictionImpl() {}
230     
231             AudienceRestrictionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
232                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
233             }
234                 
235             AudienceRestrictionImpl(const AudienceRestrictionImpl& src)
236                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
237                 VectorOf(Audience) v=getAudiences();
238                 for (vector<Audience*>::const_iterator i=src.m_Audiences.begin(); i!=src.m_Audiences.end(); i++) {
239                     if (*i) {
240                         v.push_back((*i)->cloneAudience());
241                     }
242                 }
243             }
244             
245             IMPL_XMLOBJECT_CLONE(AudienceRestriction);
246             Condition* cloneCondition() const {
247                 return cloneAudienceRestriction();
248             }
249             IMPL_TYPED_CHILDREN(Audience,m_children.end());
250     
251         protected:
252             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
253                 PROC_TYPED_CHILDREN(Audience,SAML20_NS,false);
254                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
255             }
256         };
257
258         class SAML_DLLLOCAL OneTimeUseImpl : public virtual OneTimeUse,
259             public AbstractSimpleElement,
260             public AbstractDOMCachingXMLObject,
261             public AbstractXMLObjectMarshaller,
262             public AbstractXMLObjectUnmarshaller
263         {
264         public:
265             virtual ~OneTimeUseImpl() {}
266     
267             OneTimeUseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
268                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
269             }
270                 
271             OneTimeUseImpl(const OneTimeUseImpl& src)
272                 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
273             }
274             
275             IMPL_XMLOBJECT_CLONE(OneTimeUse);
276             Condition* cloneCondition() const {
277                 return cloneOneTimeUse();
278             }
279         };
280
281         class SAML_DLLLOCAL ProxyRestrictionImpl : public virtual ProxyRestriction,
282             public AbstractComplexElement,
283             public AbstractDOMCachingXMLObject,
284             public AbstractXMLObjectMarshaller,
285             public AbstractXMLObjectUnmarshaller
286         {
287         public:
288             virtual ~ProxyRestrictionImpl() {
289                 XMLString::release(&m_Count);
290             }
291     
292             ProxyRestrictionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
293                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
294                 m_Count=NULL;
295             }
296                 
297             ProxyRestrictionImpl(const ProxyRestrictionImpl& src)
298                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
299                 setCount(src.m_Count);
300                 VectorOf(Audience) v=getAudiences();
301                 for (vector<Audience*>::const_iterator i=src.m_Audiences.begin(); i!=src.m_Audiences.end(); i++) {
302                     if (*i) {
303                         v.push_back((*i)->cloneAudience());
304                     }
305                 }
306             }
307             
308             IMPL_XMLOBJECT_CLONE(ProxyRestriction);
309             Condition* cloneCondition() const {
310                 return cloneProxyRestriction();
311             }
312             IMPL_TYPED_CHILDREN(Audience,m_children.end());
313             IMPL_INTEGER_ATTRIB(Count);
314     
315         protected:
316             void marshallAttributes(DOMElement* domElement) const {
317                 MARSHALL_INTEGER_ATTRIB(Count,COUNT,NULL);
318             }
319
320             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
321                 PROC_TYPED_CHILDREN(Audience,SAML20_NS,false);
322                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
323             }
324
325             void processAttribute(const DOMAttr* attribute) {
326                 PROC_INTEGER_ATTRIB(Count,COUNT,NULL);
327                 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
328             }
329         };
330
331
332         class SAML_DLLLOCAL ConditionsImpl : public virtual Conditions,
333             public AbstractComplexElement,
334             public AbstractDOMCachingXMLObject,
335             public AbstractXMLObjectMarshaller,
336             public AbstractXMLObjectUnmarshaller
337         {
338             void init() {
339                 m_NotBefore=m_NotOnOrAfter=NULL;
340             }
341         public:
342             virtual ~ConditionsImpl() {
343                 delete m_NotBefore;
344                 delete m_NotOnOrAfter;
345             }
346     
347             ConditionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
348                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
349                 init();
350             }
351                 
352             ConditionsImpl(const ConditionsImpl& src)
353                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
354                 init();
355                 setNotBefore(src.getNotBefore());
356                 setNotOnOrAfter(src.getNotOnOrAfter());
357
358                 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
359                     if (*i) {
360                         AudienceRestriction* arc=dynamic_cast<AudienceRestriction*>(*i);
361                         if (arc) {
362                             getAudienceRestrictions().push_back(arc->cloneAudienceRestriction());
363                             continue;
364                         }
365     
366                         OneTimeUse* dncc=dynamic_cast<OneTimeUse*>(*i);
367                         if (dncc) {
368                             getOneTimeUses().push_back(dncc->cloneOneTimeUse());
369                             continue;
370                         }
371     
372                         ProxyRestriction* prc=dynamic_cast<ProxyRestriction*>(*i);
373                         if (prc) {
374                             getProxyRestrictions().push_back(prc->cloneProxyRestriction());
375                             continue;
376                         }
377
378                         Condition* c=dynamic_cast<Condition*>(*i);
379                         if (c) {
380                             getConditions().push_back(c->cloneCondition());
381                             continue;
382                         }
383                     }
384                 }
385             }
386                         
387             IMPL_XMLOBJECT_CLONE(Conditions);
388             IMPL_DATETIME_ATTRIB(NotBefore,0);
389             IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
390             IMPL_TYPED_CHILDREN(AudienceRestriction, m_children.end());
391             IMPL_TYPED_CHILDREN(OneTimeUse,m_children.end());
392             IMPL_TYPED_CHILDREN(ProxyRestriction, m_children.end());
393             IMPL_TYPED_CHILDREN(Condition,m_children.end());
394     
395         protected:
396             void marshallAttributes(DOMElement* domElement) const {
397                 MARSHALL_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
398                 MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
399             }
400     
401             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
402                 PROC_TYPED_CHILDREN(AudienceRestriction,SAML20_NS,false);
403                 PROC_TYPED_CHILDREN(OneTimeUse,SAML20_NS,false);
404                 PROC_TYPED_CHILDREN(ProxyRestriction,SAML20_NS,false);
405                 PROC_TYPED_CHILDREN(Condition,SAML20_NS,false);
406                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
407             }
408     
409             void processAttribute(const DOMAttr* attribute) {
410                 PROC_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
411                 PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
412                 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
413             }
414         };
415
416         class SAML_DLLLOCAL SubjectConfirmationDataTypeImpl : public virtual SubjectConfirmationDataType, public virtual AbstractXMLObject
417         {
418             void init() {
419                 m_NotBefore=m_NotOnOrAfter=NULL;
420                 m_Recipient=m_InResponseTo=m_Address=NULL;
421             }
422
423         protected:
424             SubjectConfirmationDataTypeImpl() {
425                 init();
426             }
427
428         public:
429             virtual ~SubjectConfirmationDataTypeImpl() {
430                 delete m_NotBefore;
431                 delete m_NotOnOrAfter;
432                 XMLString::release(&m_Recipient);
433                 XMLString::release(&m_InResponseTo);
434                 XMLString::release(&m_Address);
435             }
436     
437             SubjectConfirmationDataTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
438                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
439                 init();
440             }
441                 
442             SubjectConfirmationDataTypeImpl(const SubjectConfirmationDataTypeImpl& src) : AbstractXMLObject(src) {
443                 init();
444                 setNotBefore(src.getNotBefore());
445                 setNotOnOrAfter(src.getNotOnOrAfter());
446                 setRecipient(src.getRecipient());
447                 setInResponseTo(src.getInResponseTo());
448                 setAddress(src.getAddress());
449             }
450             
451             IMPL_DATETIME_ATTRIB(NotBefore,0);
452             IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
453             IMPL_STRING_ATTRIB(Recipient);
454             IMPL_STRING_ATTRIB(InResponseTo);
455             IMPL_STRING_ATTRIB(Address);
456             
457         protected:
458             void marshallAttributes(DOMElement* domElement) const {
459                 MARSHALL_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
460                 MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
461                 MARSHALL_STRING_ATTRIB(Recipient,RECIPIENT,NULL);
462                 MARSHALL_STRING_ATTRIB(InResponseTo,INRESPONSETO,NULL);
463                 MARSHALL_STRING_ATTRIB(Address,ADDRESS,NULL);
464             }
465             
466             void processAttribute(const DOMAttr* attribute) {
467                 PROC_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
468                 PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
469                 PROC_STRING_ATTRIB(Recipient,RECIPIENT,NULL);
470                 PROC_STRING_ATTRIB(InResponseTo,INRESPONSETO,NULL);
471                 PROC_STRING_ATTRIB(Address,ADDRESS,NULL);
472             }
473         };
474
475         class SAML_DLLLOCAL SubjectConfirmationDataImpl : public SubjectConfirmationData,
476             public SubjectConfirmationDataTypeImpl, public AnyElementImpl
477         {
478         public:
479             virtual ~SubjectConfirmationDataImpl() {}
480     
481             SubjectConfirmationDataImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
482                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
483             }
484                 
485             SubjectConfirmationDataImpl(const SubjectConfirmationDataImpl& src)
486                     : SubjectConfirmationDataTypeImpl(src), AnyElementImpl(src) {
487             }
488
489             IMPL_XMLOBJECT_CLONE(SubjectConfirmationData);
490             SubjectConfirmationDataType* cloneSubjectConfirmationDataType() const {
491                 return new SubjectConfirmationDataImpl(*this);
492             }
493
494             void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
495                 if (!qualifiedName.hasNamespaceURI()) {
496                     if (XMLString::equals(qualifiedName.getLocalPart(),NOTBEFORE_ATTRIB_NAME)) {
497                         setNotBefore(value);
498                         return;
499                     }
500                     else if (XMLString::equals(qualifiedName.getLocalPart(),NOTONORAFTER_ATTRIB_NAME)) {
501                         setNotOnOrAfter(value);
502                         return;
503                     }
504                     else if (XMLString::equals(qualifiedName.getLocalPart(),RECIPIENT_ATTRIB_NAME)) {
505                         setRecipient(value);
506                         return;
507                     }
508                     else if (XMLString::equals(qualifiedName.getLocalPart(),INRESPONSETO_ATTRIB_NAME)) {
509                         setInResponseTo(value);
510                         return;
511                     }
512                     else if (XMLString::equals(qualifiedName.getLocalPart(),ADDRESS_ATTRIB_NAME)) {
513                         setAddress(value);
514                         return;
515                     }
516                 }
517                 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
518             }
519
520         protected:
521             void marshallAttributes(DOMElement* domElement) const {
522                 SubjectConfirmationDataTypeImpl::marshallAttributes(domElement);
523                 AnyElementImpl::marshallAttributes(domElement);
524             }
525
526             void processAttribute(const DOMAttr* attribute) {
527                 PROC_DATETIME_ATTRIB(NotBefore,NOTBEFORE,NULL);
528                 PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
529                 PROC_STRING_ATTRIB(Recipient,RECIPIENT,NULL);
530                 PROC_STRING_ATTRIB(InResponseTo,INRESPONSETO,NULL);
531                 PROC_STRING_ATTRIB(Address,ADDRESS,NULL);
532                 AnyElementImpl::processAttribute(attribute);
533             }
534         };
535
536         class SAML_DLLLOCAL KeyInfoConfirmationDataTypeImpl : public virtual KeyInfoConfirmationDataType,
537                 public SubjectConfirmationDataTypeImpl,
538                 public AbstractComplexElement,
539                 public AbstractAttributeExtensibleXMLObject,
540                 public AbstractDOMCachingXMLObject,
541                 public AbstractXMLObjectMarshaller,
542                 public AbstractXMLObjectUnmarshaller
543         {
544         public:
545             virtual ~KeyInfoConfirmationDataTypeImpl() {}
546     
547             KeyInfoConfirmationDataTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
548                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
549             }
550                 
551             KeyInfoConfirmationDataTypeImpl(const KeyInfoConfirmationDataTypeImpl& src)
552                     : AbstractXMLObject(src), SubjectConfirmationDataTypeImpl(src), AbstractComplexElement(src),
553                         AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
554                 VectorOf(KeyInfo) v=getKeyInfos();
555                 for (vector<KeyInfo*>::const_iterator i=src.m_KeyInfos.begin(); i!=src.m_KeyInfos.end(); ++i)
556                     v.push_back((*i)->cloneKeyInfo());
557             }
558             
559             IMPL_XMLOBJECT_CLONE(KeyInfoConfirmationDataType);
560             SubjectConfirmationDataType* cloneSubjectConfirmationDataType() const {
561                 return new KeyInfoConfirmationDataTypeImpl(*this);
562             }
563
564             IMPL_TYPED_CHILDREN(KeyInfo,m_children.end());
565             
566         public:
567             void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
568                 if (!qualifiedName.hasNamespaceURI()) {
569                     if (XMLString::equals(qualifiedName.getLocalPart(),NOTBEFORE_ATTRIB_NAME)) {
570                         setNotBefore(value);
571                         return;
572                     }
573                     else if (XMLString::equals(qualifiedName.getLocalPart(),NOTONORAFTER_ATTRIB_NAME)) {
574                         setNotOnOrAfter(value);
575                         return;
576                     }
577                     else if (XMLString::equals(qualifiedName.getLocalPart(),RECIPIENT_ATTRIB_NAME)) {
578                         setRecipient(value);
579                         return;
580                     }
581                     else if (XMLString::equals(qualifiedName.getLocalPart(),INRESPONSETO_ATTRIB_NAME)) {
582                         setInResponseTo(value);
583                         return;
584                     }
585                     else if (XMLString::equals(qualifiedName.getLocalPart(),ADDRESS_ATTRIB_NAME)) {
586                         setAddress(value);
587                         return;
588                     }
589                 }
590                 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
591             }
592
593         protected:
594             void marshallAttributes(DOMElement* domElement) const {
595                 SubjectConfirmationDataTypeImpl::marshallAttributes(domElement);
596                 marshallExtensionAttributes(domElement);
597             }
598     
599             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
600                 PROC_TYPED_CHILDREN(KeyInfo,XMLSIG_NS,false);
601                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
602             }
603
604             void processAttribute(const DOMAttr* attribute) {
605                 unmarshallExtensionAttribute(attribute);
606             }
607         };
608
609         class SAML_DLLLOCAL SubjectConfirmationImpl : public virtual SubjectConfirmation,
610             public AbstractComplexElement,
611             public AbstractDOMCachingXMLObject,
612             public AbstractXMLObjectMarshaller,
613             public AbstractXMLObjectUnmarshaller
614         {
615             void init() {
616                 m_Method=NULL;
617                 m_BaseID=NULL;
618                 m_NameID=NULL;
619                 m_EncryptedID=NULL;
620                 m_SubjectConfirmationData=NULL;
621                 m_children.push_back(NULL);
622                 m_children.push_back(NULL);
623                 m_children.push_back(NULL);
624                 m_children.push_back(NULL);
625                 m_pos_BaseID=m_children.begin();
626                 m_pos_NameID=m_pos_BaseID;
627                 ++m_pos_NameID;
628                 m_pos_EncryptedID=m_pos_NameID;
629                 ++m_pos_EncryptedID;
630                 m_pos_SubjectConfirmationData=m_pos_EncryptedID;
631                 ++m_pos_SubjectConfirmationData;
632             }
633         public:
634             virtual ~SubjectConfirmationImpl() {}
635     
636             SubjectConfirmationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
637                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
638                 init();
639             }
640                 
641             SubjectConfirmationImpl(const SubjectConfirmationImpl& src)
642                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
643                 init();
644                 setMethod(src.getMethod());
645                 if (src.getBaseID())
646                     setBaseID(src.getBaseID()->cloneBaseID());
647                 if (src.getNameID())
648                     setNameID(src.getNameID()->cloneNameID());
649                 if (src.getEncryptedID())
650                     setEncryptedID(src.getEncryptedID()->cloneEncryptedID());
651                 if (src.getSubjectConfirmationData())
652                     setSubjectConfirmationData(src.getSubjectConfirmationData()->clone());
653             }
654             
655             IMPL_XMLOBJECT_CLONE(SubjectConfirmation);
656             IMPL_STRING_ATTRIB(Method);
657             IMPL_TYPED_CHILD(BaseID);
658             IMPL_TYPED_CHILD(NameID);
659             IMPL_TYPED_CHILD(EncryptedID);
660             IMPL_XMLOBJECT_CHILD(SubjectConfirmationData);
661     
662         protected:
663             void marshallAttributes(DOMElement* domElement) const {
664                 MARSHALL_STRING_ATTRIB(Method,METHOD,NULL);
665             }
666
667             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
668                 PROC_TYPED_CHILD(BaseID,SAML20_NS,false);
669                 PROC_TYPED_CHILD(NameID,SAML20_NS,false);
670                 PROC_TYPED_CHILD(EncryptedID,SAML20_NS,false);
671                 PROC_XMLOBJECT_CHILD(SubjectConfirmationData,SAML20_NS);
672                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
673             }
674
675             void processAttribute(const DOMAttr* attribute) {
676                 PROC_STRING_ATTRIB(Method,METHOD,NULL);
677                 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
678             }
679         };
680
681         class SAML_DLLLOCAL SubjectImpl : public virtual Subject,
682             public AbstractComplexElement,
683             public AbstractDOMCachingXMLObject,
684             public AbstractXMLObjectMarshaller,
685             public AbstractXMLObjectUnmarshaller
686         {
687             void init() {
688                 m_BaseID=NULL;
689                 m_NameID=NULL;
690                 m_EncryptedID=NULL;
691                 m_children.push_back(NULL);
692                 m_children.push_back(NULL);
693                 m_children.push_back(NULL);
694                 m_pos_BaseID=m_children.begin();
695                 m_pos_NameID=m_pos_BaseID;
696                 ++m_pos_NameID;
697                 m_pos_EncryptedID=m_pos_NameID;
698                 ++m_pos_EncryptedID;
699             }
700         public:
701             virtual ~SubjectImpl() {}
702     
703             SubjectImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
704                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
705                 init();
706             }
707                 
708             SubjectImpl(const SubjectImpl& src)
709                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
710                 init();
711                 if (src.getBaseID())
712                     setBaseID(src.getBaseID()->cloneBaseID());
713                 if (src.getNameID())
714                     setNameID(src.getNameID()->cloneNameID());
715                 if (src.getEncryptedID())
716                     setEncryptedID(src.getEncryptedID()->cloneEncryptedID());
717                 VectorOf(SubjectConfirmation) v=getSubjectConfirmations();
718                 for (vector<SubjectConfirmation*>::const_iterator i=src.m_SubjectConfirmations.begin(); i!=src.m_SubjectConfirmations.end(); i++) {
719                     if (*i) {
720                         v.push_back((*i)->cloneSubjectConfirmation());
721                     }
722                 }
723             }
724             
725             IMPL_XMLOBJECT_CLONE(Subject);
726             IMPL_TYPED_CHILD(NameID);
727             IMPL_TYPED_CHILD(BaseID);
728             IMPL_TYPED_CHILD(EncryptedID);
729             IMPL_TYPED_CHILDREN(SubjectConfirmation,m_children.end());
730     
731         protected:
732             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
733                 PROC_TYPED_CHILD(BaseID,SAML20_NS,false);
734                 PROC_TYPED_CHILD(NameID,SAML20_NS,false);
735                 PROC_TYPED_CHILD(EncryptedID,SAML20_NS,false);
736                 PROC_TYPED_CHILDREN(SubjectConfirmation,SAML20_NS,false);
737                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
738             }
739         };
740
741         class SAML_DLLLOCAL SubjectLocalityImpl : public virtual SubjectLocality,
742             public AbstractSimpleElement,
743             public AbstractDOMCachingXMLObject,
744             public AbstractXMLObjectMarshaller,
745             public AbstractXMLObjectUnmarshaller
746         {
747             void init() {
748                 m_Address=m_DNSName=NULL;
749             }
750         public:
751             virtual ~SubjectLocalityImpl() {
752                 XMLString::release(&m_Address);
753                 XMLString::release(&m_DNSName);
754             }
755     
756             SubjectLocalityImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
757                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
758                 init();
759             }
760                 
761             SubjectLocalityImpl(const SubjectLocalityImpl& src)
762                     : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
763                 init();
764                 setAddress(src.getAddress());
765                 setDNSName(src.getDNSName());
766             }
767             
768             IMPL_XMLOBJECT_CLONE(SubjectLocality);
769             IMPL_STRING_ATTRIB(Address);
770             IMPL_STRING_ATTRIB(DNSName);
771     
772         protected:
773             void marshallAttributes(DOMElement* domElement) const {
774                 MARSHALL_STRING_ATTRIB(Address,ADDRESS,NULL);
775                 MARSHALL_STRING_ATTRIB(DNSName,DNSNAME,NULL);
776             }
777     
778             void processAttribute(const DOMAttr* attribute) {
779                 PROC_STRING_ATTRIB(Address,ADDRESS,NULL);
780                 PROC_STRING_ATTRIB(DNSName,DNSNAME,NULL);
781                 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
782             }
783         };
784
785         //TODO need unit test for this
786         class SAML_DLLLOCAL AuthnContextDeclImpl : public virtual AuthnContextDecl, public AnyElementImpl
787         {
788         public:
789             virtual ~AuthnContextDeclImpl() {}
790     
791             AuthnContextDeclImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
792                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
793             }
794                 
795             AuthnContextDeclImpl(const AuthnContextDeclImpl& src) : AnyElementImpl(src) {
796             }
797             
798             IMPL_XMLOBJECT_CLONE(AuthnContextDecl);
799         };
800
801         class SAML_DLLLOCAL AuthnContextImpl : public virtual AuthnContext,
802             public AbstractComplexElement,
803             public AbstractDOMCachingXMLObject,
804             public AbstractXMLObjectMarshaller,
805             public AbstractXMLObjectUnmarshaller
806         {
807             void init() {
808                 m_AuthnContextClassRef=NULL;
809                 m_AuthnContextDecl=NULL;
810                 m_AuthnContextDeclRef=NULL;
811                 m_children.push_back(NULL);
812                 m_children.push_back(NULL);
813                 m_children.push_back(NULL);
814                 m_pos_AuthnContextClassRef=m_children.begin();
815                 m_pos_AuthnContextDecl=m_pos_AuthnContextClassRef;
816                 ++m_pos_AuthnContextDecl;
817                 m_pos_AuthnContextDeclRef=m_pos_AuthnContextDecl;
818                 ++m_pos_AuthnContextDeclRef;
819             }
820         public:
821             virtual ~AuthnContextImpl() {}
822     
823             AuthnContextImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
824                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
825                 init();
826             }
827                 
828             AuthnContextImpl(const AuthnContextImpl& src)
829                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
830                 init();
831                 if (src.getAuthnContextClassRef())
832                     setAuthnContextClassRef(src.getAuthnContextClassRef()->cloneAuthnContextClassRef());
833                 if (src.getAuthnContextDecl())
834                     setAuthnContextDecl(src.getAuthnContextDecl()->clone());
835                 if (src.getAuthnContextDeclRef())
836                     setAuthnContextDeclRef(src.getAuthnContextDeclRef()->cloneAuthnContextDeclRef());
837                 VectorOf(AuthenticatingAuthority) v=getAuthenticatingAuthoritys();
838                 for (vector<AuthenticatingAuthority*>::const_iterator i=src.m_AuthenticatingAuthoritys.begin(); i!=src.m_AuthenticatingAuthoritys.end(); i++) {
839                     if (*i) {
840                         v.push_back((*i)->cloneAuthenticatingAuthority());
841                     }
842                 }
843             }
844             
845             IMPL_XMLOBJECT_CLONE(AuthnContext);
846             IMPL_TYPED_CHILD(AuthnContextClassRef);
847             IMPL_XMLOBJECT_CHILD(AuthnContextDecl);
848             IMPL_TYPED_CHILD(AuthnContextDeclRef);
849             IMPL_TYPED_CHILDREN(AuthenticatingAuthority,m_children.end());
850     
851         protected:
852             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
853                 PROC_TYPED_CHILD(AuthnContextClassRef,SAML20_NS,false);
854                 PROC_XMLOBJECT_CHILD(AuthnContextDecl,SAML20_NS);
855                 PROC_TYPED_CHILD(AuthnContextDeclRef,SAML20_NS,false);
856                 PROC_TYPED_CHILDREN(AuthenticatingAuthority,SAML20_NS,false);
857                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
858             }
859         };
860
861         class SAML_DLLLOCAL AuthnStatementImpl : public virtual AuthnStatement,
862             public AbstractComplexElement,
863             public AbstractDOMCachingXMLObject,
864             public AbstractXMLObjectMarshaller,
865             public AbstractXMLObjectUnmarshaller
866         {
867             void init() {
868                 m_AuthnInstant=NULL;
869                 m_SessionIndex=NULL;
870                 m_SessionNotOnOrAfter=NULL;
871                 m_SubjectLocality=NULL;
872                 m_AuthnContext=NULL;
873                 m_children.push_back(NULL);
874                 m_children.push_back(NULL);
875                 m_pos_SubjectLocality=m_children.begin();
876                 m_pos_AuthnContext=m_pos_SubjectLocality;
877                 ++m_pos_AuthnContext;
878             }
879         public:
880             virtual ~AuthnStatementImpl() {
881                 delete m_AuthnInstant;
882                 XMLString::release(&m_SessionIndex);
883                 delete m_SessionNotOnOrAfter;
884             }
885     
886             AuthnStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
887                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
888                 init();
889             }
890                 
891             AuthnStatementImpl(const AuthnStatementImpl& src)
892                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
893                 init();
894                 setAuthnInstant(src.getAuthnInstant());
895                 setSessionIndex(src.getSessionIndex());
896                 setSessionNotOnOrAfter(src.getSessionNotOnOrAfter());
897                 if (src.getSubjectLocality())
898                     setSubjectLocality(src.getSubjectLocality()->cloneSubjectLocality());
899                 if (src.getAuthnContext())
900                     setAuthnContext(src.getAuthnContext()->cloneAuthnContext());
901             }
902             
903             IMPL_XMLOBJECT_CLONE(AuthnStatement);
904             Statement* cloneStatement() const {
905                 return cloneAuthnStatement();
906             }
907             IMPL_DATETIME_ATTRIB(AuthnInstant,0);
908             IMPL_STRING_ATTRIB(SessionIndex);
909             IMPL_DATETIME_ATTRIB(SessionNotOnOrAfter,SAMLTIME_MAX);
910             IMPL_TYPED_CHILD(SubjectLocality);
911             IMPL_TYPED_CHILD(AuthnContext);
912     
913         protected:
914             void marshallAttributes(DOMElement* domElement) const {
915                 MARSHALL_DATETIME_ATTRIB(AuthnInstant,AUTHNINSTANT,NULL);
916                 MARSHALL_STRING_ATTRIB(SessionIndex,SESSIONINDEX,NULL);
917                 MARSHALL_DATETIME_ATTRIB(SessionNotOnOrAfter,SESSIONNOTONORAFTER,NULL);
918             }
919     
920             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
921                 PROC_TYPED_CHILD(SubjectLocality,SAML20_NS,false);
922                 PROC_TYPED_CHILD(AuthnContext,SAML20_NS,false);
923                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
924             }
925     
926             void processAttribute(const DOMAttr* attribute) {
927                 PROC_DATETIME_ATTRIB(AuthnInstant,AUTHNINSTANT,NULL);
928                 PROC_STRING_ATTRIB(SessionIndex,SESSIONINDEX,NULL);
929                 PROC_DATETIME_ATTRIB(SessionNotOnOrAfter,SESSIONNOTONORAFTER,NULL);
930                 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
931             }
932         };
933
934         class SAML_DLLLOCAL ActionImpl : public virtual Action,
935             public AbstractSimpleElement,
936             public AbstractDOMCachingXMLObject,
937             public AbstractXMLObjectMarshaller,
938             public AbstractXMLObjectUnmarshaller
939         {
940         public:
941             virtual ~ActionImpl() {
942                 XMLString::release(&m_Namespace);
943             }
944     
945             ActionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
946                     : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Namespace(NULL) {
947             }
948                 
949             ActionImpl(const ActionImpl& src)
950                     : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
951                 setNamespace(src.getNamespace());
952             }
953             
954             IMPL_XMLOBJECT_CLONE(Action);
955             IMPL_STRING_ATTRIB(Namespace);
956     
957         protected:
958             void marshallAttributes(DOMElement* domElement) const {
959                 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
960             }
961
962             void processAttribute(const DOMAttr* attribute) {
963                 PROC_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
964                 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
965             }
966         };
967
968         class SAML_DLLLOCAL EvidenceImpl : public virtual Evidence,
969             public AbstractComplexElement,
970             public AbstractDOMCachingXMLObject,
971             public AbstractXMLObjectMarshaller,
972             public AbstractXMLObjectUnmarshaller
973         {
974         public:
975             virtual ~EvidenceImpl() {}
976     
977             EvidenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
978                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
979             }
980                 
981             EvidenceImpl(const EvidenceImpl& src)
982                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
983                 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
984                     if (*i) {
985                         AssertionIDRef* ref=dynamic_cast<AssertionIDRef*>(*i);
986                         if (ref) {
987                             getAssertionIDRefs().push_back(ref->cloneAssertionIDRef());
988                             continue;
989                         }
990     
991                         AssertionURIRef* uri=dynamic_cast<AssertionURIRef*>(*i);
992                         if (uri) {
993                             getAssertionURIRefs().push_back(uri->cloneAssertionURIRef());
994                             continue;
995                         }
996
997                         Assertion* assertion=dynamic_cast<Assertion*>(*i);
998                         if (assertion) {
999                             getAssertions().push_back(assertion->cloneAssertion());
1000                             continue;
1001                         }
1002                         
1003                         EncryptedAssertion* enc=dynamic_cast<EncryptedAssertion*>(*i);
1004                         if (enc) {
1005                             getEncryptedAssertions().push_back(enc->cloneEncryptedAssertion());
1006                             continue;
1007                         }
1008                     }
1009                 }
1010             }
1011             
1012             IMPL_XMLOBJECT_CLONE(Evidence);
1013             IMPL_TYPED_CHILDREN(AssertionIDRef,m_children.end());
1014             IMPL_TYPED_CHILDREN(AssertionURIRef,m_children.end());
1015             IMPL_TYPED_CHILDREN(Assertion,m_children.end());
1016             IMPL_TYPED_CHILDREN(EncryptedAssertion,m_children.end());
1017     
1018         protected:
1019             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1020                 PROC_TYPED_CHILDREN(AssertionIDRef,SAML20_NS,false);
1021                 PROC_TYPED_CHILDREN(AssertionURIRef,SAML20_NS,false);
1022                 PROC_TYPED_CHILDREN(Assertion,SAML20_NS,false);
1023                 PROC_TYPED_CHILDREN(EncryptedAssertion,SAML20_NS,false);
1024                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1025             }
1026         };
1027
1028         class SAML_DLLLOCAL AuthzDecisionStatementImpl : public virtual AuthzDecisionStatement,
1029             public AbstractComplexElement,
1030             public AbstractDOMCachingXMLObject,
1031             public AbstractXMLObjectMarshaller,
1032             public AbstractXMLObjectUnmarshaller
1033         {
1034             void init() {
1035                 m_Resource=NULL;
1036                 m_Decision=NULL;
1037                 m_Evidence=NULL;
1038                 m_children.push_back(NULL);
1039                 m_pos_Evidence=m_children.begin();
1040             }
1041         public:
1042             virtual ~AuthzDecisionStatementImpl() {
1043                 XMLString::release(&m_Resource);
1044                 XMLString::release(&m_Decision);
1045             }
1046     
1047             AuthzDecisionStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1048                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1049                 init();
1050             }
1051                 
1052             AuthzDecisionStatementImpl(const AuthzDecisionStatementImpl& src)
1053                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1054                 init();
1055                 setResource(src.getResource());
1056                 setDecision(src.getDecision());
1057                 if (src.getEvidence())
1058                     setEvidence(src.getEvidence()->cloneEvidence());
1059                 VectorOf(Action) v=getActions();
1060                 for (vector<Action*>::const_iterator i=src.m_Actions.begin(); i!=src.m_Actions.end(); i++) {
1061                     if (*i) {
1062                         v.push_back((*i)->cloneAction());
1063                     }
1064                 }
1065             }
1066             
1067             IMPL_XMLOBJECT_CLONE(AuthzDecisionStatement);
1068             Statement* cloneStatement() const {
1069                 return cloneAuthzDecisionStatement();
1070             }
1071             IMPL_STRING_ATTRIB(Resource);
1072             IMPL_STRING_ATTRIB(Decision);
1073             IMPL_TYPED_CHILD(Evidence);
1074             IMPL_TYPED_CHILDREN(Action, m_pos_Evidence);
1075     
1076         protected:
1077             void marshallAttributes(DOMElement* domElement) const {
1078                 MARSHALL_STRING_ATTRIB(Resource,RESOURCE,NULL);
1079                 MARSHALL_STRING_ATTRIB(Decision,DECISION,NULL);
1080             }
1081     
1082             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1083                 PROC_TYPED_CHILD(Evidence,SAML20_NS,false);
1084                 PROC_TYPED_CHILDREN(Action,SAML20_NS,false);
1085                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1086             }
1087     
1088             void processAttribute(const DOMAttr* attribute) {
1089                 PROC_STRING_ATTRIB(Resource,RESOURCE,NULL);
1090                 PROC_STRING_ATTRIB(Decision,DECISION,NULL);
1091                 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1092             }
1093         };
1094
1095         //TODO need unit test for this
1096         class SAML_DLLLOCAL AttributeValueImpl : public virtual AttributeValue, public AnyElementImpl
1097         {
1098         public:
1099             virtual ~AttributeValueImpl() {}
1100     
1101             AttributeValueImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1102                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1103             }
1104                 
1105             AttributeValueImpl(const AttributeValueImpl& src) : AnyElementImpl(src) {
1106             }
1107             
1108             IMPL_XMLOBJECT_CLONE(AttributeValue);
1109         };
1110
1111
1112         class SAML_DLLLOCAL AttributeImpl : public virtual Attribute,
1113             public AbstractComplexElement,
1114             public AbstractAttributeExtensibleXMLObject,
1115             public AbstractDOMCachingXMLObject,
1116             public AbstractXMLObjectMarshaller,
1117             public AbstractXMLObjectUnmarshaller
1118         {
1119             void init() {
1120                 m_Name=m_NameFormat=m_FriendlyName=NULL;
1121             }
1122         public:
1123             virtual ~AttributeImpl() {
1124                 XMLString::release(&m_Name);
1125                 XMLString::release(&m_NameFormat);
1126                 XMLString::release(&m_FriendlyName);
1127             }
1128     
1129             AttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1130                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1131                 init();
1132             }
1133                 
1134             AttributeImpl(const AttributeImpl& src)
1135                     : AbstractXMLObject(src), AbstractComplexElement(src),
1136                         AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1137                 init();
1138                 setName(src.getName());
1139                 setNameFormat(src.getNameFormat());
1140                 setFriendlyName(src.getFriendlyName());
1141                 VectorOf(XMLObject) v=getAttributeValues();
1142                 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
1143                     if (*i) {
1144                         v.push_back((*i)->clone());
1145                     }
1146                 }
1147             }
1148             
1149             IMPL_XMLOBJECT_CLONE(Attribute);
1150             IMPL_STRING_ATTRIB(Name);
1151             IMPL_STRING_ATTRIB(NameFormat);
1152             IMPL_STRING_ATTRIB(FriendlyName);
1153             IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
1154     
1155             void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1156                 if (!qualifiedName.hasNamespaceURI()) {
1157                     if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) {
1158                         setName(value);
1159                         return;
1160                     }
1161                     else if (XMLString::equals(qualifiedName.getLocalPart(),NAMEFORMAT_ATTRIB_NAME)) {
1162                         setNameFormat(value);
1163                         return;
1164                     }
1165                     else if (XMLString::equals(qualifiedName.getLocalPart(),FRIENDLYNAME_ATTRIB_NAME)) {
1166                         setFriendlyName(value);
1167                         return;
1168                     }
1169                 }
1170                 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1171             }
1172
1173         protected:
1174             void marshallAttributes(DOMElement* domElement) const {
1175                 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
1176                 MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,NULL);
1177                 MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,NULL);
1178                 marshallExtensionAttributes(domElement);
1179             }
1180
1181             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1182                 getAttributeValues().push_back(childXMLObject);
1183             }
1184
1185             void processAttribute(const DOMAttr* attribute) {
1186                 unmarshallExtensionAttribute(attribute);
1187             }
1188         };
1189
1190         //TODO unit test for this 
1191         class SAML_DLLLOCAL EncryptedAttributeImpl : public virtual EncryptedAttribute, public EncryptedElementTypeImpl
1192         {
1193         public:
1194             virtual ~EncryptedAttributeImpl() {}
1195     
1196             EncryptedAttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1197                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1198                 
1199             EncryptedAttributeImpl(const EncryptedAttributeImpl& src) : AbstractXMLObject(src), EncryptedElementTypeImpl(src) {}
1200             
1201             IMPL_XMLOBJECT_CLONE(EncryptedAttribute);
1202             EncryptedElementType* cloneEncryptedElementType() const {
1203                 return new EncryptedAttributeImpl(*this);
1204             }
1205         };
1206
1207         class SAML_DLLLOCAL AttributeStatementImpl : public virtual AttributeStatement,
1208             public AbstractComplexElement,
1209             public AbstractDOMCachingXMLObject,
1210             public AbstractXMLObjectMarshaller,
1211             public AbstractXMLObjectUnmarshaller
1212         {
1213         public:
1214             virtual ~AttributeStatementImpl() {}
1215     
1216             AttributeStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1217                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1218             }
1219                 
1220             AttributeStatementImpl(const AttributeStatementImpl& src)
1221                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1222                 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1223                     if (*i) {
1224                         Attribute* attribute=dynamic_cast<Attribute*>(*i);
1225                         if (attribute) {
1226                             getAttributes().push_back(attribute->cloneAttribute());
1227                             continue;
1228                         }
1229                         
1230                         EncryptedAttribute* enc=dynamic_cast<EncryptedAttribute*>(*i);
1231                         if (enc) {
1232                             getEncryptedAttributes().push_back(enc->cloneEncryptedAttribute());
1233                             continue;
1234                         }
1235                     }
1236                 }
1237             }
1238             
1239             IMPL_XMLOBJECT_CLONE(AttributeStatement);
1240             Statement* cloneStatement() const {
1241                 return cloneAttributeStatement();
1242             }
1243             IMPL_TYPED_CHILDREN(Attribute, m_children.end());
1244             IMPL_TYPED_CHILDREN(EncryptedAttribute, m_children.end());
1245     
1246         protected:
1247             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1248                 PROC_TYPED_CHILDREN(Attribute,SAML20_NS,false);
1249                 PROC_TYPED_CHILDREN(EncryptedAttribute,SAML20_NS,false);
1250                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1251             }
1252         };
1253
1254         class SAML_DLLLOCAL AdviceImpl : public virtual Advice,
1255             public AbstractComplexElement,
1256             public AbstractDOMCachingXMLObject,
1257             public AbstractXMLObjectMarshaller,
1258             public AbstractXMLObjectUnmarshaller
1259         {
1260         public:
1261             virtual ~AdviceImpl() {}
1262     
1263             AdviceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1264                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1265             }
1266                 
1267             AdviceImpl(const AdviceImpl& src)
1268                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1269                 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1270                     if (*i) {
1271                         AssertionIDRef* ref=dynamic_cast<AssertionIDRef*>(*i);
1272                         if (ref) {
1273                             getAssertionIDRefs().push_back(ref->cloneAssertionIDRef());
1274                             continue;
1275                         }
1276     
1277                         AssertionURIRef* uri=dynamic_cast<AssertionURIRef*>(*i);
1278                         if (uri) {
1279                             getAssertionURIRefs().push_back(uri->cloneAssertionURIRef());
1280                             continue;
1281                         }
1282
1283                         Assertion* assertion=dynamic_cast<Assertion*>(*i);
1284                         if (assertion) {
1285                             getAssertions().push_back(assertion->cloneAssertion());
1286                             continue;
1287                         }
1288                         
1289                         EncryptedAssertion* enc=dynamic_cast<EncryptedAssertion*>(*i);
1290                         if (enc) {
1291                             getEncryptedAssertions().push_back(enc->cloneEncryptedAssertion());
1292                             continue;
1293                         }
1294
1295                         getUnknownXMLObjects().push_back((*i)->clone());
1296                     }
1297                 }
1298             }
1299             
1300             IMPL_XMLOBJECT_CLONE(Advice);
1301             IMPL_TYPED_CHILDREN(AssertionIDRef,m_children.end());
1302             IMPL_TYPED_CHILDREN(AssertionURIRef,m_children.end());
1303             IMPL_TYPED_CHILDREN(Assertion,m_children.end());
1304             IMPL_TYPED_CHILDREN(EncryptedAssertion,m_children.end());
1305             IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
1306     
1307         protected:
1308             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1309                 PROC_TYPED_CHILDREN(AssertionIDRef,SAML20_NS,false);
1310                 PROC_TYPED_CHILDREN(AssertionURIRef,SAML20_NS,false);
1311                 PROC_TYPED_CHILDREN(Assertion,SAML20_NS,false);
1312                 PROC_TYPED_CHILDREN(EncryptedAssertion,SAML20_NS,false);
1313                 
1314                 // Unknown child.
1315                 const XMLCh* nsURI=root->getNamespaceURI();
1316                 if (!XMLString::equals(nsURI,SAML20_NS) && nsURI && *nsURI) {
1317                     getUnknownXMLObjects().push_back(childXMLObject);
1318                     return;
1319                 }
1320                 
1321                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1322             }
1323         };
1324
1325         //TODO unit test for this 
1326         class SAML_DLLLOCAL EncryptedAssertionImpl : public virtual EncryptedAssertion, public EncryptedElementTypeImpl
1327         {
1328         public:
1329             virtual ~EncryptedAssertionImpl() {}
1330     
1331             EncryptedAssertionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1332                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1333                 
1334             EncryptedAssertionImpl(const EncryptedAssertionImpl& src) : AbstractXMLObject(src), EncryptedElementTypeImpl(src) {}
1335             
1336             IMPL_XMLOBJECT_CLONE(EncryptedAssertion);
1337             EncryptedElementType* cloneEncryptedElementType() const {
1338                 return new EncryptedAssertionImpl(*this);
1339             }
1340         };
1341
1342         class SAML_DLLLOCAL AssertionImpl : public virtual Assertion,
1343             public AbstractComplexElement,
1344             public AbstractDOMCachingXMLObject,
1345             public AbstractXMLObjectMarshaller,
1346             public AbstractXMLObjectUnmarshaller
1347         {
1348             void init() {
1349                 m_ID=NULL;
1350                 m_Version=NULL;
1351                 m_IssueInstant=NULL;
1352                 m_Issuer=NULL;
1353                 m_Signature=NULL;
1354                 m_Subject=NULL;
1355                 m_Conditions=NULL;
1356                 m_Advice=NULL;
1357                 m_children.push_back(NULL);
1358                 m_children.push_back(NULL);
1359                 m_children.push_back(NULL);
1360                 m_children.push_back(NULL);
1361                 m_children.push_back(NULL);
1362                 m_pos_Issuer=m_children.begin();
1363                 m_pos_Signature=m_pos_Issuer;
1364                 ++m_pos_Signature;
1365                 m_pos_Subject=m_pos_Signature;
1366                 ++m_pos_Subject;
1367                 m_pos_Conditions=m_pos_Subject;
1368                 ++m_pos_Conditions;
1369                 m_pos_Advice=m_pos_Conditions;
1370                 ++m_pos_Advice;
1371             }
1372         public:
1373             virtual ~AssertionImpl() {
1374                 XMLString::release(&m_ID);
1375                 XMLString::release(&m_Version);
1376                 delete m_IssueInstant;
1377             }
1378     
1379             AssertionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1380                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1381                 init();
1382             }
1383                 
1384             AssertionImpl(const AssertionImpl& src)
1385                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1386                 init();
1387                 setVersion(src.getVersion());
1388                 setID(src.getID());
1389                 setIssueInstant(src.getIssueInstant());
1390                 if (src.getIssuer())
1391                     setIssuer(src.getIssuer()->cloneIssuer());
1392                 if (src.getSignature())
1393                     setSignature(src.getSignature()->cloneSignature());
1394                 if (src.getSubject())
1395                     setSubject(src.getSubject()->cloneSubject());
1396                 if (src.getConditions())
1397                     setConditions(src.getConditions()->cloneConditions());
1398                 if (src.getAdvice())
1399                     setAdvice(src.getAdvice()->cloneAdvice());
1400                 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1401                     if (*i) {
1402                         AuthnStatement* authst=dynamic_cast<AuthnStatement*>(*i);
1403                         if (authst) {
1404                             getAuthnStatements().push_back(authst->cloneAuthnStatement());
1405                             continue;
1406                         }
1407
1408                         AttributeStatement* attst=dynamic_cast<AttributeStatement*>(*i);
1409                         if (attst) {
1410                             getAttributeStatements().push_back(attst->cloneAttributeStatement());
1411                             continue;
1412                         }
1413
1414                         AuthzDecisionStatement* authzst=dynamic_cast<AuthzDecisionStatement*>(*i);
1415                         if (authzst) {
1416                             getAuthzDecisionStatements().push_back(authzst->cloneAuthzDecisionStatement());
1417                             continue;
1418                         }
1419     
1420                         Statement* st=dynamic_cast<Statement*>(*i);
1421                         if (st) {
1422                             getStatements().push_back(st->cloneStatement());
1423                             continue;
1424                         }
1425                     }
1426                 }
1427             }
1428             
1429             //IMPL_TYPED_CHILD(Signature);
1430             // Need customized setter.
1431         protected:
1432             Signature* m_Signature;
1433             list<XMLObject*>::iterator m_pos_Signature;
1434         public:
1435             Signature* getSignature() const {
1436                 return m_Signature;
1437             }
1438             
1439             void setSignature(Signature* sig) {
1440                 prepareForAssignment(m_Signature,sig);
1441                 *m_pos_Signature=m_Signature=sig;
1442                 // Sync content reference back up.
1443                 if (m_Signature)
1444                     m_Signature->setContentReference(new opensaml::ContentReference(*this));
1445             }
1446             
1447             IMPL_XMLOBJECT_CLONE(Assertion);
1448             IMPL_STRING_ATTRIB(Version);
1449             IMPL_ID_ATTRIB(ID);
1450             IMPL_DATETIME_ATTRIB(IssueInstant,0);
1451             IMPL_TYPED_CHILD(Issuer);
1452             IMPL_TYPED_CHILD(Subject);
1453             IMPL_TYPED_CHILD(Conditions);
1454             IMPL_TYPED_CHILD(Advice);
1455             IMPL_TYPED_CHILDREN(Statement, m_children.end());
1456             IMPL_TYPED_CHILDREN(AuthnStatement, m_children.end());
1457             IMPL_TYPED_CHILDREN(AttributeStatement, m_children.end());
1458             IMPL_TYPED_CHILDREN(AuthzDecisionStatement, m_children.end());
1459     
1460         protected:
1461             void marshallAttributes(DOMElement* domElement) const {
1462                 if (!m_Version)
1463                     const_cast<AssertionImpl*>(this)->m_Version=XMLString::transcode("2.0");
1464                 MARSHALL_STRING_ATTRIB(Version,VER,NULL);
1465                 if (!m_ID)
1466                     const_cast<AssertionImpl*>(this)->m_ID=SAMLConfig::getConfig().generateIdentifier();
1467                 MARSHALL_ID_ATTRIB(ID,ID,NULL);
1468                 if (!m_IssueInstant) {
1469                     const_cast<AssertionImpl*>(this)->m_IssueInstantEpoch=time(NULL);
1470                     const_cast<AssertionImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
1471                 }
1472                 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1473             }
1474     
1475             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1476                 PROC_TYPED_CHILD(Issuer,SAML20_NS,false);
1477                 PROC_TYPED_CHILD(Signature,XMLSIG_NS,false);
1478                 PROC_TYPED_CHILD(Subject,SAML20_NS,false);
1479                 PROC_TYPED_CHILD(Conditions,SAML20_NS,false);
1480                 PROC_TYPED_CHILD(Advice,SAML20_NS,false);
1481                 PROC_TYPED_CHILDREN(AuthnStatement,SAML20_NS,false);
1482                 PROC_TYPED_CHILDREN(AttributeStatement,SAML20_NS,false);
1483                 PROC_TYPED_CHILDREN(AuthzDecisionStatement,SAML20_NS,false);
1484                 PROC_TYPED_CHILDREN(Statement,SAML20_NS,false);
1485                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1486             }
1487     
1488             void processAttribute(const DOMAttr* attribute) {
1489                 PROC_STRING_ATTRIB(Version,VER,NULL);
1490                 PROC_ID_ATTRIB(ID,ID,NULL);
1491                 PROC_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1492                 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1493             }
1494         };
1495
1496     };
1497 };
1498
1499 #if defined (_MSC_VER)
1500     #pragma warning( pop )
1501 #endif
1502
1503 // Builder Implementations
1504
1505 IMPL_XMLOBJECTBUILDER(Action);
1506 IMPL_XMLOBJECTBUILDER(Advice);
1507 IMPL_XMLOBJECTBUILDER(Assertion);
1508 IMPL_XMLOBJECTBUILDER(AssertionIDRef);
1509 IMPL_XMLOBJECTBUILDER(AssertionURIRef);
1510 IMPL_XMLOBJECTBUILDER(Attribute);
1511 IMPL_XMLOBJECTBUILDER(AttributeStatement);
1512 IMPL_XMLOBJECTBUILDER(AttributeValue);
1513 IMPL_XMLOBJECTBUILDER(Audience);
1514 IMPL_XMLOBJECTBUILDER(AudienceRestriction);
1515 IMPL_XMLOBJECTBUILDER(AuthenticatingAuthority);
1516 IMPL_XMLOBJECTBUILDER(AuthnContext);
1517 IMPL_XMLOBJECTBUILDER(AuthnContextClassRef);
1518 IMPL_XMLOBJECTBUILDER(AuthnContextDecl);
1519 IMPL_XMLOBJECTBUILDER(AuthnContextDeclRef);
1520 IMPL_XMLOBJECTBUILDER(AuthnStatement);
1521 IMPL_XMLOBJECTBUILDER(AuthzDecisionStatement);
1522 IMPL_XMLOBJECTBUILDER(Conditions);
1523 IMPL_XMLOBJECTBUILDER(EncryptedAssertion);
1524 IMPL_XMLOBJECTBUILDER(EncryptedAttribute);
1525 IMPL_XMLOBJECTBUILDER(EncryptedID);
1526 IMPL_XMLOBJECTBUILDER(Evidence);
1527 IMPL_XMLOBJECTBUILDER(Issuer);
1528 IMPL_XMLOBJECTBUILDER(KeyInfoConfirmationDataType);
1529 IMPL_XMLOBJECTBUILDER(NameID);
1530 IMPL_XMLOBJECTBUILDER(NameIDType);
1531 IMPL_XMLOBJECTBUILDER(OneTimeUse);
1532 IMPL_XMLOBJECTBUILDER(ProxyRestriction);
1533 IMPL_XMLOBJECTBUILDER(Subject);
1534 IMPL_XMLOBJECTBUILDER(SubjectConfirmation);
1535 IMPL_XMLOBJECTBUILDER(SubjectConfirmationData);
1536 IMPL_XMLOBJECTBUILDER(SubjectLocality);
1537
1538 // Unicode literals
1539 const XMLCh Action::LOCAL_NAME[] =                  UNICODE_LITERAL_6(A,c,t,i,o,n);
1540 const XMLCh Action::TYPE_NAME[] =                   UNICODE_LITERAL_10(A,c,t,i,o,n,T,y,p,e);
1541 const XMLCh Action::NAMESPACE_ATTRIB_NAME[] =       UNICODE_LITERAL_9(N,a,m,e,s,p,a,c,e);
1542 const XMLCh Advice::LOCAL_NAME[] =                  UNICODE_LITERAL_6(A,d,v,i,c,e);
1543 const XMLCh Advice::TYPE_NAME[] =                   UNICODE_LITERAL_10(A,d,v,i,c,e,T,y,p,e);
1544 const XMLCh Assertion::LOCAL_NAME[] =               UNICODE_LITERAL_9(A,s,s,e,r,t,i,o,n);
1545 const XMLCh Assertion::TYPE_NAME[] =                UNICODE_LITERAL_13(A,s,s,e,r,t,i,o,n,T,y,p,e);
1546 const XMLCh Assertion::VER_ATTRIB_NAME[] =          UNICODE_LITERAL_7(V,e,r,s,i,o,n);
1547 const XMLCh Assertion::ID_ATTRIB_NAME[] =           UNICODE_LITERAL_2(I,D);
1548 const XMLCh Assertion::ISSUEINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,s,s,u,e,I,n,s,t,a,n,t);
1549 const XMLCh AssertionIDRef::LOCAL_NAME[] =          UNICODE_LITERAL_14(A,s,s,e,r,t,i,o,n,I,D,R,e,f);
1550 const XMLCh AssertionURIRef::LOCAL_NAME[] =         UNICODE_LITERAL_15(A,s,s,e,r,t,i,o,n,U,R,I,R,e,f);
1551 const XMLCh Attribute::LOCAL_NAME[] =               UNICODE_LITERAL_9(A,t,t,r,i,b,u,t,e);
1552 const XMLCh Attribute::TYPE_NAME[] =                UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,T,y,p,e);
1553 const XMLCh Attribute::NAME_ATTRIB_NAME[] =         UNICODE_LITERAL_4(N,a,m,e);
1554 const XMLCh Attribute::NAMEFORMAT_ATTRIB_NAME[] =   UNICODE_LITERAL_10(N,a,m,e,F,o,r,m,a,t);
1555 const XMLCh Attribute::FRIENDLYNAME_ATTRIB_NAME[] = UNICODE_LITERAL_12(F,r,i,e,n,d,l,y,N,a,m,e);
1556 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);
1557 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);
1558 const XMLCh AttributeValue::LOCAL_NAME[] =          UNICODE_LITERAL_14(A,t,t,r,i,b,u,t,e,V,a,l,u,e);
1559 const XMLCh Audience::LOCAL_NAME[] =                UNICODE_LITERAL_8(A,u,d,i,e,n,c,e);
1560 const XMLCh AudienceRestriction::LOCAL_NAME[] =     UNICODE_LITERAL_19(A,u,d,i,e,n,c,e,R,e,s,t,r,i,c,t,i,o,n);
1561 const XMLCh AudienceRestriction::TYPE_NAME[] =      UNICODE_LITERAL_23(A,u,d,i,e,n,c,e,R,e,s,t,r,i,c,t,i,o,n,T,y,p,e);
1562 const XMLCh AuthenticatingAuthority::LOCAL_NAME[] = UNICODE_LITERAL_23(A,u,t,h,e,n,t,i,c,a,t,i,n,g,A,u,t,h,o,r,i,t,y);
1563 const XMLCh AuthnContext::LOCAL_NAME[] =            UNICODE_LITERAL_12(A,u,t,h,n,C,o,n,t,e,x,t);
1564 const XMLCh AuthnContext::TYPE_NAME[] =             UNICODE_LITERAL_16(A,u,t,h,n,C,o,n,t,e,x,t,T,y,p,e);
1565 const XMLCh AuthnContextClassRef::LOCAL_NAME[] =    UNICODE_LITERAL_20(A,u,t,h,n,C,o,n,t,e,x,t,C,l,a,s,s,R,e,f);
1566 const XMLCh AuthnContextDecl::LOCAL_NAME[] =        UNICODE_LITERAL_16(A,u,t,h,n,C,o,n,t,e,x,t,D,e,c,l);
1567 const XMLCh AuthnContextDeclRef::LOCAL_NAME[] =     UNICODE_LITERAL_19(A,u,t,h,n,C,o,n,t,e,x,t,D,e,c,l,R,e,f);
1568 const XMLCh AuthnStatement::LOCAL_NAME[] =          UNICODE_LITERAL_14(A,u,t,h,n,S,t,a,t,e,m,e,n,t);
1569 const XMLCh AuthnStatement::TYPE_NAME[] =           UNICODE_LITERAL_18(A,u,t,h,n,S,t,a,t,e,m,e,n,t,T,y,p,e);
1570 const XMLCh AuthnStatement::AUTHNINSTANT_ATTRIB_NAME[] =    UNICODE_LITERAL_12(A,u,t,h,n,I,n,s,t,a,n,t);
1571 const XMLCh AuthnStatement::SESSIONINDEX_ATTRIB_NAME[] =    UNICODE_LITERAL_12(S,e,s,s,i,o,n,I,n,d,e,x);
1572 const XMLCh AuthnStatement::SESSIONNOTONORAFTER_ATTRIB_NAME[] = UNICODE_LITERAL_19(S,e,s,s,i,o,n,N,o,t,O,n,O,r,A,f,t,e,r);
1573 const XMLCh AuthzDecisionStatement::LOCAL_NAME[] =  UNICODE_LITERAL_22(A,u,t,h,z,D,e,c,i,s,i,o,n,S,t,a,t,e,m,e,n,t);
1574 const XMLCh AuthzDecisionStatement::TYPE_NAME[] =   UNICODE_LITERAL_26(A,u,t,h,z,D,e,c,i,s,i,o,n,S,t,a,t,e,m,e,n,t,T,y,p,e);
1575 const XMLCh AuthzDecisionStatement::RESOURCE_ATTRIB_NAME[] =    UNICODE_LITERAL_8(R,e,s,o,u,r,c,e);
1576 const XMLCh AuthzDecisionStatement::DECISION_ATTRIB_NAME[] =    UNICODE_LITERAL_8(D,e,c,i,s,i,o,n);
1577 const XMLCh AuthzDecisionStatement::DECISION_PERMIT[] = UNICODE_LITERAL_6(P,e,r,m,i,t);
1578 const XMLCh AuthzDecisionStatement::DECISION_DENY[] =   UNICODE_LITERAL_4(D,e,n,y);
1579 const XMLCh AuthzDecisionStatement::DECISION_INDETERMINATE[] =  UNICODE_LITERAL_13(I,n,d,e,t,e,r,m,i,n,a,t,e);
1580 const XMLCh BaseID::LOCAL_NAME[] =                  UNICODE_LITERAL_6(B,a,s,e,I,D);
1581 const XMLCh BaseID::NAMEQUALIFIER_ATTRIB_NAME[] =   UNICODE_LITERAL_13(N,a,m,e,Q,u,a,l,i,f,i,e,r);
1582 const XMLCh BaseID::SPNAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_15(S,P,N,a,m,e,Q,u,a,l,i,f,i,e,r);
1583 const XMLCh Condition::LOCAL_NAME[] =               UNICODE_LITERAL_9(C,o,n,d,i,t,i,o,n);
1584 const XMLCh Conditions::LOCAL_NAME[] =              UNICODE_LITERAL_10(C,o,n,d,i,t,i,o,n,s);
1585 const XMLCh Conditions::TYPE_NAME[] =               UNICODE_LITERAL_14(C,o,n,d,i,t,i,o,n,s,T,y,p,e);
1586 const XMLCh Conditions::NOTBEFORE_ATTRIB_NAME[] =   UNICODE_LITERAL_9(N,o,t,B,e,f,o,r,e);
1587 const XMLCh Conditions::NOTONORAFTER_ATTRIB_NAME[] =UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1588 const XMLCh EncryptedAssertion::LOCAL_NAME[] =      UNICODE_LITERAL_18(E,n,c,r,y,p,t,e,d,A,s,s,e,r,t,i,o,n);
1589 const XMLCh EncryptedAttribute::LOCAL_NAME[] =      UNICODE_LITERAL_18(E,n,c,r,y,p,t,e,d,A,t,t,r,i,b,u,t,e);
1590 const XMLCh EncryptedElementType::LOCAL_NAME[] =    {chNull};
1591 const XMLCh EncryptedElementType::TYPE_NAME[] =     UNICODE_LITERAL_20(E,n,c,r,y,p,t,e,d,E,l,e,m,e,n,t,T,y,p,e);
1592 const XMLCh EncryptedID::LOCAL_NAME[] =             UNICODE_LITERAL_11(E,n,c,r,y,p,t,e,d,I,D);
1593 const XMLCh Evidence::LOCAL_NAME[] =                UNICODE_LITERAL_8(E,v,i,d,e,n,c,e);
1594 const XMLCh Evidence::TYPE_NAME[] =                 UNICODE_LITERAL_12(E,v,i,d,e,n,c,e,T,y,p,e);
1595 const XMLCh Issuer::LOCAL_NAME[] =                  UNICODE_LITERAL_6(I,s,s,u,e,r);
1596 const XMLCh KeyInfoConfirmationDataType::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);
1597 const XMLCh KeyInfoConfirmationDataType::TYPE_NAME[] = UNICODE_LITERAL_27(K,e,y,I,n,f,o,C,o,n,f,i,r,m,a,t,i,o,n,D,a,t,a,T,y,p,e);
1598 const XMLCh NameID::LOCAL_NAME[] =                  UNICODE_LITERAL_6(N,a,m,e,I,D);
1599 const XMLCh NameIDType::LOCAL_NAME[] =              {chNull};
1600 const XMLCh NameIDType::TYPE_NAME[] =               UNICODE_LITERAL_10(N,a,m,e,I,D,T,y,p,e);
1601 const XMLCh NameIDType::NAMEQUALIFIER_ATTRIB_NAME[] =   UNICODE_LITERAL_13(N,a,m,e,Q,u,a,l,i,f,i,e,r);
1602 const XMLCh NameIDType::SPNAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_15(S,P,N,a,m,e,Q,u,a,l,i,f,i,e,r);
1603 const XMLCh NameIDType::FORMAT_ATTRIB_NAME[] =      UNICODE_LITERAL_6(F,o,r,m,a,t);
1604 const XMLCh NameIDType::SPPROVIDEDID_ATTRIB_NAME[] =    UNICODE_LITERAL_12(S,P,P,r,o,v,i,d,e,d,I,D);
1605 const XMLCh OneTimeUse::LOCAL_NAME[] =              UNICODE_LITERAL_10(O,n,e,T,i,m,e,U,s,e);
1606 const XMLCh OneTimeUse::TYPE_NAME[] =               UNICODE_LITERAL_14(O,n,e,T,i,m,e,U,s,e,T,y,p,e);
1607 const XMLCh ProxyRestriction::LOCAL_NAME[] =        UNICODE_LITERAL_16(P,r,o,x,y,R,e,s,t,r,i,c,t,i,o,n);
1608 const XMLCh ProxyRestriction::TYPE_NAME[] =         UNICODE_LITERAL_20(P,r,o,x,y,R,e,s,t,r,i,c,t,i,o,n,T,y,p,e);
1609 const XMLCh ProxyRestriction::COUNT_ATTRIB_NAME[] = UNICODE_LITERAL_5(C,o,u,n,t);
1610 const XMLCh Statement::LOCAL_NAME[] =               UNICODE_LITERAL_9(S,t,a,t,e,m,e,n,t);
1611 const XMLCh Subject::LOCAL_NAME[] =                 UNICODE_LITERAL_7(S,u,b,j,e,c,t);
1612 const XMLCh Subject::TYPE_NAME[] =                  UNICODE_LITERAL_11(S,u,b,j,e,c,t,T,y,p,e);
1613 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);
1614 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);
1615 const XMLCh SubjectConfirmation::METHOD_ATTRIB_NAME[] = UNICODE_LITERAL_6(M,e,t,h,o,d);
1616 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);
1617 const XMLCh SubjectConfirmationDataType::NOTBEFORE_ATTRIB_NAME[] =      UNICODE_LITERAL_9(N,o,t,B,e,f,o,r,e);
1618 const XMLCh SubjectConfirmationDataType::NOTONORAFTER_ATTRIB_NAME[] =   UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1619 const XMLCh SubjectConfirmationDataType::INRESPONSETO_ATTRIB_NAME[] =   UNICODE_LITERAL_12(I,n,R,e,s,p,o,n,s,e,T,o);
1620 const XMLCh SubjectConfirmationDataType::RECIPIENT_ATTRIB_NAME[] =      UNICODE_LITERAL_9(R,e,c,i,p,i,e,n,t);
1621 const XMLCh SubjectConfirmationDataType::ADDRESS_ATTRIB_NAME[] =        UNICODE_LITERAL_7(A,d,d,r,e,s,s);
1622 const XMLCh SubjectLocality::LOCAL_NAME[] =         UNICODE_LITERAL_15(S,u,b,j,e,c,t,L,o,c,a,l,i,t,y);
1623 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);
1624 const XMLCh SubjectLocality::ADDRESS_ATTRIB_NAME[] =UNICODE_LITERAL_7(A,d,d,r,e,s,s);
1625 const XMLCh SubjectLocality::DNSNAME_ATTRIB_NAME[] =UNICODE_LITERAL_7(D,N,S,N,a,m,e);
1626
1627 const XMLCh NameIDType::UNSPECIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
1628 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1629   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1630   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1631   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1632   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1633   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
1634 };
1635
1636 const XMLCh NameIDType::EMAIL[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
1637 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1638   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1639   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1640   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1641   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1642   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
1643 };
1644
1645 const XMLCh NameIDType::X509_SUBJECT[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName
1646 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1647   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1648   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1649   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1650   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1651   chLatin_X, chDigit_5, chDigit_0, chDigit_9, chLatin_S, chLatin_u, chLatin_b, chLatin_j, chLatin_e, chLatin_c, chLatin_t,
1652   chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1653 };
1654
1655 const XMLCh NameIDType::WIN_DOMAIN_QUALIFIED[] = // urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName
1656 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1657   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1658   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_1, chColon,
1659   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1660   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1661   chLatin_W, chLatin_i, chLatin_n, chLatin_d, chLatin_o, chLatin_w, chLatin_s,
1662   chLatin_D, chLatin_o, chLatin_m, chLatin_a, chLatin_i, chLatin_n,
1663   chLatin_Q, chLatin_u, chLatin_a, chLatin_l, chLatin_i, chLatin_f, chLatin_i, chLatin_e, chLatin_d,
1664   chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull
1665 };
1666
1667 const XMLCh NameIDType::KERBEROS[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos
1668 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1669   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1670   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1671   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1672   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1673   chLatin_k, chLatin_e, chLatin_r, chLatin_b, chLatin_e, chLatin_r, chLatin_o, chLatin_s, chNull
1674 };
1675
1676 const XMLCh NameIDType::ENTITY[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:entity
1677 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1678   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1679   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1680   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1681   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1682   chLatin_e, chLatin_n, chLatin_t, chLatin_i, chLatin_t, chLatin_y, chNull
1683 };
1684
1685 const XMLCh NameIDType::PERSISTENT[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:persistent
1686 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1687   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1688   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1689   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1690   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1691   chLatin_p, chLatin_e, chLatin_r, chLatin_s, chLatin_i, chLatin_s, chLatin_t, chLatin_e, chLatin_n, chLatin_t, chNull
1692 };
1693
1694 const XMLCh NameIDType::TRANSIENT[] = // urn:oasis:names:tc:SAML:2.0:nameid-format:transient
1695 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1696   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1697   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1698   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_i, chLatin_d, chDash,
1699   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1700   chLatin_t, chLatin_r, chLatin_a, chLatin_n, chLatin_s, chLatin_i, chLatin_e, chLatin_n, chLatin_t, chNull
1701 };
1702
1703 const XMLCh SubjectConfirmation::BEARER[] = // urn:oasis:names:tc:SAML:2.0:cm:bearer
1704 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1705   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1706   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1707   chLatin_c, chLatin_m, chColon, chLatin_b, chLatin_e, chLatin_a, chLatin_r, chLatin_e, chLatin_r, chNull
1708 };
1709
1710 const XMLCh SubjectConfirmation::HOLDER_KEY[] = // urn:oasis:names:tc:SAML:2.0:cm:holder-of-key
1711 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1712   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1713   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1714   chLatin_c, chLatin_m, chColon, chLatin_h, chLatin_o, chLatin_l, chLatin_d, chLatin_e, chLatin_r, chDash,
1715       chLatin_o, chLatin_f, chDash, chLatin_k, chLatin_e, chLatin_y, chNull
1716 };
1717
1718 const XMLCh SubjectConfirmation::SENDER_VOUCHES[] = // urn:oasis:names:tc:SAML:2.0:cm:sender-vouches
1719 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1720   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1721   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1722   chLatin_c, chLatin_m, chColon, chLatin_s, chLatin_e, chLatin_n, chLatin_d, chLatin_e, chLatin_r, chDash,
1723       chLatin_v, chLatin_o, chLatin_u, chLatin_c, chLatin_h, chLatin_e, chLatin_s, chNull
1724 };
1725
1726 const XMLCh Action::RWEDC_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc
1727 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1728   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1729   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1730   chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1731   chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chNull
1732 };
1733
1734 const XMLCh Action::RWEDC_NEG_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:rwedc-negation
1735 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1736   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1737   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1738   chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1739   chLatin_r, chLatin_w, chLatin_e, chLatin_d, chLatin_c, chDash,
1740   chLatin_n, chLatin_e, chLatin_g, chLatin_a, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chNull
1741 };
1742
1743 const XMLCh Action::GHPP_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:ghpp
1744 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1745   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1746   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1747   chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1748   chLatin_g, chLatin_h, chLatin_p, chLatin_p, chNull
1749 };
1750
1751 const XMLCh Action::UNIX_ACTION_NAMESPACE[] = // urn:oasis:names:tc:SAML:1.0:action:unix
1752 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1753   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1754   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_1, chPeriod, chDigit_0, chColon,
1755   chLatin_a, chLatin_c, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chColon,
1756   chLatin_u, chLatin_n, chLatin_i, chLatin_x, chNull
1757 };
1758
1759 const XMLCh Attribute::UNSPECIFIED[] = // urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified
1760 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1761   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1762   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1763   chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chDash,
1764   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1765   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
1766 };
1767
1768 const XMLCh Attribute::URI_REFERENCE[] = // urn:oasis:names:tc:SAML:2.0:attrname-format:uri
1769 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1770   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1771   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1772   chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chDash,
1773   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1774   chLatin_u, chLatin_r, chLatin_i, chNull
1775 };
1776
1777 const XMLCh Attribute::BASIC[] = // urn:oasis:names:tc:SAML:2.0:attrname-format:basic
1778 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1779   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1780   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1781   chLatin_a, chLatin_t, chLatin_t, chLatin_r, chLatin_n, chLatin_a, chLatin_m, chLatin_e, chDash,
1782   chLatin_f, chLatin_o, chLatin_r, chLatin_m, chLatin_a, chLatin_t, chColon,
1783   chLatin_b, chLatin_a, chLatin_s, chLatin_i, chLatin_c, chNull
1784 };