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