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