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