9e4f6714a66a2f64ce7472d7bf90b6aac9229179
[shibboleth/cpp-opensaml.git] / saml / saml2 / core / impl / Protocols20Impl.cpp
1 /*
2  *  Copyright 2001-2009 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  * Protocols20Impl.cpp
19  * 
20  * Implementation classes for SAML 2.0 Protocols schema.
21  */
22
23 #include "internal.h"
24 #include "exceptions.h"
25 #include "saml2/core/Protocols.h"
26 #include "signature/ContentReference.h"
27
28 #include <xmltooling/AbstractComplexElement.h>
29 #include <xmltooling/AbstractSimpleElement.h>
30 #include <xmltooling/encryption/Encryption.h>
31 #include <xmltooling/impl/AnyElement.h>
32 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
33 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
34 #include <xmltooling/signature/Signature.h>
35 #include <xmltooling/util/XMLHelper.h>
36
37 #include <ctime>
38 #include <xercesc/util/XMLUniDefs.hpp>
39
40 using namespace opensaml::saml2p;
41 using namespace opensaml::saml2;
42 using namespace xmlsignature;
43 using namespace xmlencryption;
44 using namespace xmltooling;
45 using namespace std;
46 using xmlconstants::XMLSIG_NS;
47 using xmlconstants::XMLENC_NS;
48 using xmlconstants::XML_BOOL_NULL;
49 using samlconstants::SAML20_NS;
50 using samlconstants::SAML20P_NS;
51
52 #if defined (_MSC_VER)
53     #pragma warning( push )
54     #pragma warning( disable : 4250 4251 )
55 #endif
56
57 namespace opensaml {
58     namespace saml2p {
59
60         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Artifact);
61         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,GetComplete);
62         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,NewID);
63         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,RequesterID);
64         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,SessionIndex);
65         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,StatusMessage);
66
67         DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,RespondTo);
68
69         //TODO need unit test for this, using objects from another namespace
70         class SAML_DLLLOCAL ExtensionsImpl : public virtual Extensions,
71              public AbstractComplexElement,
72              public AbstractDOMCachingXMLObject,
73              public AbstractXMLObjectMarshaller,
74              public AbstractXMLObjectUnmarshaller
75         {
76         public:
77             virtual ~ExtensionsImpl() {}
78     
79             ExtensionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
80                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
81             }
82                 
83             ExtensionsImpl(const ExtensionsImpl& src)
84                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
85                 VectorOf(XMLObject) v=getUnknownXMLObjects();
86                 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
87                     v.push_back((*i)->clone());
88             }
89             
90             IMPL_XMLOBJECT_CLONE(Extensions);
91             IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
92     
93         protected:
94             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
95                 // Unknown child.
96                 const XMLCh* nsURI=root->getNamespaceURI();
97                 if (!XMLString::equals(nsURI,SAML20P_NS) && nsURI && *nsURI) {
98                     getUnknownXMLObjects().push_back(childXMLObject);
99                     return;
100                 }
101                 
102                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
103             }
104         };
105
106         class SAML_DLLLOCAL StatusCodeImpl : public virtual StatusCode,
107              public AbstractComplexElement,
108              public AbstractDOMCachingXMLObject,
109              public AbstractXMLObjectMarshaller,
110              public AbstractXMLObjectUnmarshaller
111         {
112             void init() {
113                 m_Value=NULL;
114                 m_StatusCode=NULL;
115                 m_children.push_back(NULL);
116                 m_pos_StatusCode=m_children.begin();
117             }
118             public:
119                 virtual ~StatusCodeImpl() {}
120
121                 StatusCodeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
122                     : AbstractXMLObject(nsURI, localName, prefix, schemaType)
123                 {
124                         init();
125                 }
126
127                 StatusCodeImpl(const StatusCodeImpl& src)
128                         : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
129                     init();
130                     setValue(src.getValue());
131                     if (src.getStatusCode())
132                         setStatusCode(src.getStatusCode()->cloneStatusCode());
133                 }
134
135                 IMPL_XMLOBJECT_CLONE(StatusCode);
136                 IMPL_STRING_ATTRIB(Value);
137                 IMPL_TYPED_CHILD(StatusCode);
138
139             protected:
140                 void marshallAttributes(DOMElement* domElement) const {
141                     MARSHALL_STRING_ATTRIB(Value,VALUE,NULL);
142                 }
143
144                 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
145                     PROC_TYPED_CHILD(StatusCode,SAML20P_NS,false);
146                     AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
147                 }
148
149                 void processAttribute(const DOMAttr* attribute) {
150                     PROC_STRING_ATTRIB(Value,VALUE,NULL);
151                     AbstractXMLObjectUnmarshaller::processAttribute(attribute);
152                 }
153         };
154
155         //TODO need unit tests for non-SAML namespace children
156         class SAML_DLLLOCAL StatusDetailImpl : public virtual StatusDetail,
157             public AbstractComplexElement,
158             public AbstractDOMCachingXMLObject,
159             public AbstractXMLObjectMarshaller,
160             public AbstractXMLObjectUnmarshaller
161         {
162             public:
163                 virtual ~StatusDetailImpl() {}
164
165                 StatusDetailImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
166                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) { }
167
168                 StatusDetailImpl(const StatusDetailImpl& src)
169                         : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
170                     VectorOf(XMLObject) v=getUnknownXMLObjects();
171                     for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
172                         v.push_back((*i)->clone());
173                 }
174
175                 IMPL_XMLOBJECT_CLONE(StatusDetail);
176                 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
177
178             protected:
179                 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
180                     getUnknownXMLObjects().push_back(childXMLObject);
181                 }
182         };
183
184
185         class SAML_DLLLOCAL StatusImpl : public virtual Status,
186              public AbstractComplexElement,
187              public AbstractDOMCachingXMLObject,
188              public AbstractXMLObjectMarshaller,
189              public AbstractXMLObjectUnmarshaller
190         {
191             void init() {
192                 m_StatusCode=NULL;
193                 m_StatusMessage=NULL;
194                 m_StatusDetail=NULL;
195                 m_children.push_back(NULL);
196                 m_children.push_back(NULL);
197                 m_children.push_back(NULL);
198                 m_pos_StatusCode=m_children.begin();
199                 m_pos_StatusMessage=m_pos_StatusCode;
200                 ++m_pos_StatusMessage;
201                 m_pos_StatusDetail=m_pos_StatusMessage;
202                 ++m_pos_StatusDetail;
203             }
204         public:
205             virtual ~StatusImpl() { }
206     
207             StatusImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
208                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
209                 init();
210             }
211                 
212             StatusImpl(const StatusImpl& src)
213                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
214                 init();
215                 if (src.getStatusCode())
216                     setStatusCode(src.getStatusCode()->cloneStatusCode());
217                 if (src.getStatusMessage())
218                     setStatusMessage(src.getStatusMessage()->cloneStatusMessage());
219                 if (src.getStatusDetail())
220                     setStatusDetail(src.getStatusDetail()->cloneStatusDetail());
221             }
222             
223             IMPL_XMLOBJECT_CLONE(Status);
224             IMPL_TYPED_CHILD(StatusCode);
225             IMPL_TYPED_CHILD(StatusMessage);
226             IMPL_TYPED_CHILD(StatusDetail);
227     
228         protected:
229     
230             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
231                 PROC_TYPED_CHILD(StatusCode,SAML20P_NS,false);
232                 PROC_TYPED_CHILD(StatusMessage,SAML20P_NS,false);
233                 PROC_TYPED_CHILD(StatusDetail,SAML20P_NS,false);
234                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
235             }
236     
237         };
238
239
240         class SAML_DLLLOCAL RequestAbstractTypeImpl : public virtual RequestAbstractType,
241             public AbstractComplexElement,
242             public AbstractDOMCachingXMLObject,
243             public AbstractXMLObjectMarshaller,
244             public AbstractXMLObjectUnmarshaller
245         {
246             void init() {
247                 m_ID=NULL;
248                 m_Version=NULL;
249                 m_IssueInstant=NULL;
250                 m_Destination=NULL;
251                 m_Consent=NULL;
252                 m_Issuer=NULL;
253                 m_Signature=NULL;
254                 m_Extensions=NULL;
255                 m_children.push_back(NULL);
256                 m_children.push_back(NULL);
257                 m_children.push_back(NULL);
258                 m_pos_Issuer=m_children.begin();
259                 m_pos_Signature=m_pos_Issuer;
260                 ++m_pos_Signature;
261                 m_pos_Extensions=m_pos_Signature;
262                 ++m_pos_Extensions;
263             }
264         protected:
265             RequestAbstractTypeImpl() {
266                 init();
267             }
268         public:
269             virtual ~RequestAbstractTypeImpl() {
270                 XMLString::release(&m_ID);
271                 XMLString::release(&m_Version);
272                 XMLString::release(&m_Destination);
273                 XMLString::release(&m_Consent);
274                 delete m_IssueInstant;
275             }
276     
277             RequestAbstractTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
278                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
279                 init();
280             }
281                 
282             RequestAbstractTypeImpl(const RequestAbstractTypeImpl& src)
283                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
284                 init();
285                 setID(src.getID());
286                 setVersion(src.getVersion());
287                 setIssueInstant(src.getIssueInstant());
288                 setDestination(src.getDestination());
289                 setConsent(src.getConsent());
290                 if (src.getIssuer())
291                     setIssuer(src.getIssuer()->cloneIssuer());
292                 if (src.getSignature())
293                     setSignature(src.getSignature()->cloneSignature());
294                 if (src.getExtensions())
295                     setExtensions(src.getExtensions()->cloneExtensions());
296             }
297             
298             //IMPL_TYPED_CHILD(Signature);
299             // Need customized setter.
300         protected:
301             Signature* m_Signature;
302             list<XMLObject*>::iterator m_pos_Signature;
303         public:
304             Signature* getSignature() const {
305                 return m_Signature;
306             }
307             
308             void setSignature(Signature* sig) {
309                 prepareForAssignment(m_Signature,sig);
310                 *m_pos_Signature=m_Signature=sig;
311                 // Sync content reference back up.
312                 if (m_Signature)
313                     m_Signature->setContentReference(new opensaml::ContentReference(*this));
314             }
315             
316             IMPL_STRING_ATTRIB(Version);
317             IMPL_ID_ATTRIB(ID);
318             IMPL_DATETIME_ATTRIB(IssueInstant,0);
319             IMPL_STRING_ATTRIB(Destination);
320             IMPL_STRING_ATTRIB(Consent);
321             IMPL_TYPED_FOREIGN_CHILD(Issuer,saml2);
322             IMPL_TYPED_CHILD(Extensions);
323     
324         protected:
325             void marshallAttributes(DOMElement* domElement) const {
326                 if (!m_Version)
327                     const_cast<RequestAbstractTypeImpl*>(this)->m_Version=XMLString::transcode("2.0");
328                 MARSHALL_STRING_ATTRIB(Version,VER,NULL);
329                 if (!m_ID)
330                     const_cast<RequestAbstractTypeImpl*>(this)->m_ID=SAMLConfig::getConfig().generateIdentifier();
331                 MARSHALL_ID_ATTRIB(ID,ID,NULL);
332                 if (!m_IssueInstant) {
333                     const_cast<RequestAbstractTypeImpl*>(this)->m_IssueInstantEpoch=time(NULL);
334                     const_cast<RequestAbstractTypeImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
335                 }
336                 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
337                 MARSHALL_STRING_ATTRIB(Destination,DESTINATION,NULL);
338                 MARSHALL_STRING_ATTRIB(Consent,CONSENT,NULL);
339             }
340     
341             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
342                 PROC_TYPED_FOREIGN_CHILD(Issuer,saml2,SAML20_NS,false);
343                 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
344                 PROC_TYPED_CHILD(Extensions,SAML20P_NS,false);
345                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
346             }
347     
348             void processAttribute(const DOMAttr* attribute) {
349                 PROC_ID_ATTRIB(ID,ID,NULL);
350                 PROC_STRING_ATTRIB(Version,VER,NULL);
351                 PROC_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
352                 PROC_STRING_ATTRIB(Destination,DESTINATION,NULL);
353                 PROC_STRING_ATTRIB(Consent,CONSENT,NULL);
354                 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
355             }
356         };
357
358
359         class SAML_DLLLOCAL AssertionIDRequestImpl : public virtual AssertionIDRequest, public RequestAbstractTypeImpl
360         {
361         public:
362             virtual ~AssertionIDRequestImpl() { }
363     
364             AssertionIDRequestImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
365                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) { }
366                 
367             AssertionIDRequestImpl(const AssertionIDRequestImpl& src) : AbstractXMLObject(src), RequestAbstractTypeImpl(src) {
368                 VectorOf(AssertionIDRef) v=getAssertionIDRefs();
369                 for (vector<AssertionIDRef*>::const_iterator i=src.m_AssertionIDRefs.begin(); i!=src.m_AssertionIDRefs.end(); i++) {
370                     if (*i) {                               
371                         v.push_back((*i)->cloneAssertionIDRef());
372                     }
373                 }
374
375             }
376             
377             IMPL_XMLOBJECT_CLONE(AssertionIDRequest);
378             RequestAbstractType* cloneRequestAbstractType() const {
379                 return cloneAssertionIDRequest();
380             }
381
382             IMPL_TYPED_FOREIGN_CHILDREN(AssertionIDRef,saml2,m_children.end());
383     
384         protected:
385             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
386                 PROC_TYPED_FOREIGN_CHILDREN(AssertionIDRef,saml2,SAML20_NS,false);
387                 RequestAbstractTypeImpl::processChildElement(childXMLObject,root);
388             }
389         };
390
391         class SAML_DLLLOCAL SubjectQueryImpl : public virtual SubjectQuery, public RequestAbstractTypeImpl
392         {
393             void init()
394             {
395                 m_Subject = NULL;
396                 m_children.push_back(NULL);
397                 m_pos_Subject = m_pos_Extensions;
398                 ++m_pos_Subject;
399             }
400         protected:
401             SubjectQueryImpl() {
402                 init();
403             }
404         public:
405             virtual ~SubjectQueryImpl() { }
406     
407             SubjectQueryImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
408                 : AbstractXMLObject(nsURI, localName, prefix, schemaType)
409             { 
410                 init();
411             }
412                 
413             SubjectQueryImpl(const SubjectQueryImpl& src) : AbstractXMLObject(src), RequestAbstractTypeImpl(src) {
414                 init();
415                 if (src.getSubject())
416                     setSubject(src.getSubject()->cloneSubject());
417             }
418             
419             IMPL_TYPED_FOREIGN_CHILD(Subject,saml2);
420     
421         protected:
422             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
423                 PROC_TYPED_FOREIGN_CHILD(Subject,saml2,SAML20_NS,false);
424                 RequestAbstractTypeImpl::processChildElement(childXMLObject,root);
425             }
426         };
427
428
429         class SAML_DLLLOCAL RequestedAuthnContextImpl : public virtual RequestedAuthnContext,
430             public AbstractComplexElement,
431             public AbstractDOMCachingXMLObject,
432             public AbstractXMLObjectMarshaller,
433             public AbstractXMLObjectUnmarshaller
434         {
435             void init() {
436                 m_Comparison=NULL;
437             }
438         public:
439             virtual ~RequestedAuthnContextImpl() {
440                 XMLString::release(&m_Comparison);
441             }
442     
443             RequestedAuthnContextImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
444                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
445                 init();
446             }
447                 
448             RequestedAuthnContextImpl(const RequestedAuthnContextImpl& src)
449                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
450                 init();
451                 setComparison(src.getComparison());
452                 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
453                     if (*i) {
454                         AuthnContextClassRef* classref=dynamic_cast<AuthnContextClassRef*>(*i);
455                         if (classref) {
456                             getAuthnContextClassRefs().push_back(classref->cloneAuthnContextClassRef());
457                             continue;
458                         }
459
460                         AuthnContextDeclRef* declref=dynamic_cast<AuthnContextDeclRef*>(*i);
461                         if (declref) {
462                             getAuthnContextDeclRefs().push_back(declref->cloneAuthnContextDeclRef());
463                             continue;
464                         }
465                     }
466                 }
467             }
468             
469             IMPL_XMLOBJECT_CLONE(RequestedAuthnContext);
470             IMPL_STRING_ATTRIB(Comparison);
471             IMPL_TYPED_FOREIGN_CHILDREN(AuthnContextClassRef,saml2,m_children.end());
472             IMPL_TYPED_FOREIGN_CHILDREN(AuthnContextDeclRef,saml2,m_children.end());
473     
474         protected:
475             void marshallAttributes(DOMElement* domElement) const {
476                 MARSHALL_STRING_ATTRIB(Comparison,COMPARISON,NULL);
477             }
478     
479             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
480                 PROC_TYPED_FOREIGN_CHILDREN(AuthnContextClassRef,saml2,SAML20_NS,false);
481                 PROC_TYPED_FOREIGN_CHILDREN(AuthnContextDeclRef,saml2,SAML20_NS,false);
482                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
483             }
484     
485             void processAttribute(const DOMAttr* attribute) {
486                 PROC_STRING_ATTRIB(Comparison,COMPARISON,NULL);
487                 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
488             }
489         };
490
491
492         class SAML_DLLLOCAL AuthnQueryImpl : public virtual AuthnQuery, public SubjectQueryImpl
493         {
494             void init() {
495                 m_SessionIndex=NULL;
496                 m_RequestedAuthnContext=NULL;
497                 m_children.push_back(NULL);
498                 m_pos_RequestedAuthnContext = m_pos_Subject;
499                 ++m_pos_RequestedAuthnContext;
500                 
501             }
502         public:
503             virtual ~AuthnQueryImpl() {
504                 XMLString::release(&m_SessionIndex);
505             }
506     
507             AuthnQueryImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
508                 : AbstractXMLObject(nsURI, localName, prefix, schemaType)
509             {
510                 init();
511             }
512                 
513             AuthnQueryImpl(const AuthnQueryImpl& src) : AbstractXMLObject(src), SubjectQueryImpl(src) {
514                 init();
515                 setSessionIndex(src.getSessionIndex());
516                 if (src.getRequestedAuthnContext())
517                     setRequestedAuthnContext(src.getRequestedAuthnContext()->cloneRequestedAuthnContext());
518             }
519             
520             IMPL_XMLOBJECT_CLONE(AuthnQuery);
521             SubjectQuery* cloneSubjectQuery() const {
522                 return cloneAuthnQuery();
523             }
524             RequestAbstractType* cloneRequestAbstractType() const {
525                 return cloneAuthnQuery();
526             }
527
528             IMPL_STRING_ATTRIB(SessionIndex);
529             IMPL_TYPED_CHILD(RequestedAuthnContext);
530     
531         protected:
532             void marshallAttributes(DOMElement* domElement) const {
533                 MARSHALL_STRING_ATTRIB(SessionIndex,SESSIONINDEX,NULL);
534                 SubjectQueryImpl::marshallAttributes(domElement);
535             }
536     
537             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
538                 PROC_TYPED_CHILD(RequestedAuthnContext,SAML20P_NS,false);
539                 SubjectQueryImpl::processChildElement(childXMLObject,root);
540             }
541             void processAttribute(const DOMAttr* attribute) {
542                 PROC_STRING_ATTRIB(SessionIndex,SESSIONINDEX,NULL);
543                 SubjectQueryImpl::processAttribute(attribute);
544             }
545         };
546
547         class SAML_DLLLOCAL AttributeQueryImpl : public virtual AttributeQuery, public SubjectQueryImpl
548         {
549         public:
550             virtual ~AttributeQueryImpl() { }
551     
552             AttributeQueryImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
553                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) { }
554                 
555             AttributeQueryImpl(const AttributeQueryImpl& src) : AbstractXMLObject(src), SubjectQueryImpl(src) {
556                 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
557                     if (*i) {
558                         Attribute* attrib=dynamic_cast<Attribute*>(*i);
559                         if (attrib) {
560                             getAttributes().push_back(attrib->cloneAttribute());
561                             continue;
562                         }
563                     }
564                 }
565
566             }
567             
568             IMPL_XMLOBJECT_CLONE(AttributeQuery);
569             SubjectQuery* cloneSubjectQuery() const {
570                 return cloneAttributeQuery();
571             }
572             RequestAbstractType* cloneRequestAbstractType() const {
573                 return cloneAttributeQuery();
574             }
575
576             IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
577     
578         protected:
579             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
580                 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
581                 SubjectQueryImpl::processChildElement(childXMLObject,root);
582             }
583         };
584
585         class SAML_DLLLOCAL AuthzDecisionQueryImpl : public virtual AuthzDecisionQuery, public SubjectQueryImpl
586         {
587             void init() {
588                 m_Resource=NULL;
589                 m_Evidence=NULL;
590                 m_children.push_back(NULL);
591                 m_pos_Evidence=m_pos_Subject;
592                 ++m_pos_Evidence;
593                 
594             }
595         public:
596             virtual ~AuthzDecisionQueryImpl() {
597                 XMLString::release(&m_Resource);
598             }
599     
600             AuthzDecisionQueryImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
601                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
602                 init();
603             }
604                 
605             AuthzDecisionQueryImpl(const AuthzDecisionQueryImpl& src) : AbstractXMLObject(src), SubjectQueryImpl(src) {
606                 init();
607                 setResource(src.getResource());
608                 if (src.getEvidence())
609                     setEvidence(src.getEvidence()->cloneEvidence());
610                 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
611                     if (*i) {
612                         Action* action=dynamic_cast<Action*>(*i);
613                         if (action) {
614                             getActions().push_back(action->cloneAction());
615                             continue;
616                         }
617                     }
618                 }
619             }
620             
621             IMPL_XMLOBJECT_CLONE(AuthzDecisionQuery);
622             SubjectQuery* cloneSubjectQuery() const {
623                 return cloneAuthzDecisionQuery();
624             }
625             RequestAbstractType* cloneRequestAbstractType() const {
626                 return cloneAuthzDecisionQuery();
627             }
628
629             IMPL_STRING_ATTRIB(Resource);
630             IMPL_TYPED_FOREIGN_CHILDREN(Action,saml2,m_pos_Evidence);
631             IMPL_TYPED_FOREIGN_CHILD(Evidence,saml2);
632     
633         protected:
634             void marshallAttributes(DOMElement* domElement) const {
635                 MARSHALL_STRING_ATTRIB(Resource,RESOURCE,NULL);
636                 SubjectQueryImpl::marshallAttributes(domElement);
637             }
638     
639             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
640                 PROC_TYPED_FOREIGN_CHILD(Evidence,saml2,SAML20_NS,false);
641                 PROC_TYPED_FOREIGN_CHILDREN(Action,saml2,SAML20_NS,false);
642                 SubjectQueryImpl::processChildElement(childXMLObject,root);
643             }
644             void processAttribute(const DOMAttr* attribute) {
645                 PROC_STRING_ATTRIB(Resource,RESOURCE,NULL);
646                 SubjectQueryImpl::processAttribute(attribute);
647             }
648         };
649
650         class SAML_DLLLOCAL NameIDPolicyImpl : public virtual NameIDPolicy,
651             public AbstractSimpleElement,
652             public AbstractDOMCachingXMLObject,
653             public AbstractXMLObjectMarshaller,
654             public AbstractXMLObjectUnmarshaller
655         {
656             void init() {
657                 m_Format=NULL;
658                 m_SPNameQualifier=NULL;
659                 m_AllowCreate=XML_BOOL_NULL;
660             }
661             public:
662                 virtual ~NameIDPolicyImpl()
663                 {
664                     XMLString::release(&m_Format);
665                     XMLString::release(&m_SPNameQualifier);
666                 }
667
668                 NameIDPolicyImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
669                     : AbstractXMLObject(nsURI, localName, prefix, schemaType)
670                 {
671                         init();
672                 }
673
674                 NameIDPolicyImpl(const NameIDPolicyImpl& src)
675                         : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
676                     init();
677                     setFormat(src.getFormat());
678                     setSPNameQualifier(src.getSPNameQualifier());
679                     AllowCreate(m_AllowCreate);
680                 }
681
682                 IMPL_XMLOBJECT_CLONE(NameIDPolicy);
683                 IMPL_STRING_ATTRIB(Format);
684                 IMPL_STRING_ATTRIB(SPNameQualifier);
685                 IMPL_BOOLEAN_ATTRIB(AllowCreate);
686
687             protected:
688                 void marshallAttributes(DOMElement* domElement) const {
689                     MARSHALL_STRING_ATTRIB(Format,FORMAT,NULL);
690                     MARSHALL_STRING_ATTRIB(SPNameQualifier,SPNAMEQUALIFIER,NULL);
691                     MARSHALL_BOOLEAN_ATTRIB(AllowCreate,ALLOWCREATE,NULL);
692                 }
693
694                 void processAttribute(const DOMAttr* attribute) {
695                     PROC_STRING_ATTRIB(Format,FORMAT,NULL);
696                     PROC_STRING_ATTRIB(SPNameQualifier,SPNAMEQUALIFIER,NULL);
697                     PROC_BOOLEAN_ATTRIB(AllowCreate,ALLOWCREATE,NULL);
698                     AbstractXMLObjectUnmarshaller::processAttribute(attribute);
699                 }
700         };
701
702         class SAML_DLLLOCAL IDPEntryImpl : public virtual IDPEntry,
703             public AbstractSimpleElement,
704             public AbstractDOMCachingXMLObject,
705             public AbstractXMLObjectMarshaller,
706             public AbstractXMLObjectUnmarshaller
707         {
708             void init() {
709                 m_ProviderID=NULL;
710                 m_Name=NULL;
711                 m_Loc=NULL;
712             }
713             public:
714                 virtual ~IDPEntryImpl()
715                 {
716                     XMLString::release(&m_ProviderID);
717                     XMLString::release(&m_Name);
718                     XMLString::release(&m_Loc);
719                 }
720
721                 IDPEntryImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
722                     : AbstractXMLObject(nsURI, localName, prefix, schemaType)
723                 {
724                         init();
725                 }
726
727                 IDPEntryImpl(const IDPEntryImpl& src)
728                         : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
729                     init();
730                     setProviderID(src.getProviderID());
731                     setName(src.getName());
732                     setLoc(src.getLoc());
733                 }
734
735                 IMPL_XMLOBJECT_CLONE(IDPEntry);
736                 IMPL_STRING_ATTRIB(ProviderID);
737                 IMPL_STRING_ATTRIB(Name);
738                 IMPL_STRING_ATTRIB(Loc);
739
740             protected:
741                 void marshallAttributes(DOMElement* domElement) const {
742                     MARSHALL_STRING_ATTRIB(ProviderID,PROVIDERID,NULL);
743                     MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
744                     MARSHALL_STRING_ATTRIB(Loc,LOC,NULL);
745                 }
746
747                 void processAttribute(const DOMAttr* attribute) {
748                     PROC_STRING_ATTRIB(ProviderID,PROVIDERID,NULL);
749                     PROC_STRING_ATTRIB(Name,NAME,NULL);
750                     PROC_STRING_ATTRIB(Loc,LOC,NULL);
751                     AbstractXMLObjectUnmarshaller::processAttribute(attribute);
752                 }
753         };
754
755         class SAML_DLLLOCAL IDPListImpl : public virtual IDPList,
756             public AbstractComplexElement,
757             public AbstractDOMCachingXMLObject,
758             public AbstractXMLObjectMarshaller,
759             public AbstractXMLObjectUnmarshaller
760         {
761             void init() {
762                 m_GetComplete=NULL;
763                 m_children.push_back(NULL);
764                 m_pos_GetComplete=m_children.begin();
765                 
766             }
767         public:
768             virtual ~IDPListImpl() { }
769     
770             IDPListImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
771                 : AbstractXMLObject(nsURI, localName, prefix, schemaType)
772             {
773                 init();
774             }
775                 
776             IDPListImpl(const IDPListImpl& src)
777                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
778                 init();
779                 if (src.getGetComplete())
780                     setGetComplete(src.getGetComplete()->cloneGetComplete());
781                 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
782                     if (*i) {
783                         IDPEntry* entry=dynamic_cast<IDPEntry*>(*i);
784                         if (entry) {
785                             getIDPEntrys().push_back(entry->cloneIDPEntry());
786                             continue;
787                         }
788                     }
789                 }
790             }
791             
792             IMPL_XMLOBJECT_CLONE(IDPList);
793             IMPL_TYPED_CHILDREN(IDPEntry,m_pos_GetComplete);
794             IMPL_TYPED_CHILD(GetComplete);
795     
796         protected:
797             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
798                 PROC_TYPED_CHILDREN(IDPEntry,SAML20P_NS,false);
799                 PROC_TYPED_CHILD(GetComplete,SAML20P_NS,false);
800                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
801             }
802         };
803
804
805         class SAML_DLLLOCAL ScopingImpl : public virtual Scoping,
806             public AbstractComplexElement,
807             public AbstractDOMCachingXMLObject,
808             public AbstractXMLObjectMarshaller,
809             public AbstractXMLObjectUnmarshaller
810         {
811             void init() {
812                 m_ProxyCount=NULL;
813                 m_IDPList=NULL;
814                 m_children.push_back(NULL);
815                 m_pos_IDPList=m_children.begin();
816                 
817             }
818         public:
819             virtual ~ScopingImpl() {
820                 XMLString::release(&m_ProxyCount); 
821             }
822     
823             ScopingImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
824                 : AbstractXMLObject(nsURI, localName, prefix, schemaType)
825             {
826                 init();
827             }
828                 
829             ScopingImpl(const ScopingImpl& src)
830                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
831                 init();
832                 setProxyCount(m_ProxyCount);
833                 if (src.getIDPList())
834                     setIDPList(src.getIDPList()->cloneIDPList());
835                 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
836                     if (*i) {
837                         RequesterID* reqid =dynamic_cast<RequesterID*>(*i);
838                         if (reqid) {
839                             getRequesterIDs().push_back(reqid->cloneRequesterID());
840                             continue;
841                         }
842                     }
843                 }
844             }
845             
846             IMPL_XMLOBJECT_CLONE(Scoping);
847             IMPL_INTEGER_ATTRIB(ProxyCount);
848             IMPL_TYPED_CHILD(IDPList);
849             IMPL_TYPED_CHILDREN(RequesterID,m_children.end());
850     
851         protected:
852             void marshallAttributes(DOMElement* domElement) const {
853                     MARSHALL_INTEGER_ATTRIB(ProxyCount,PROXYCOUNT,NULL);
854             }
855     
856             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
857                 PROC_TYPED_CHILD(IDPList,SAML20P_NS,false);
858                 PROC_TYPED_CHILDREN(RequesterID,SAML20P_NS,false);
859                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
860             }
861
862             void processAttribute(const DOMAttr* attribute) {
863                 PROC_INTEGER_ATTRIB(ProxyCount,PROXYCOUNT,NULL);
864                 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
865             }
866         };
867
868         class SAML_DLLLOCAL AuthnRequestImpl : public virtual AuthnRequest, public RequestAbstractTypeImpl
869         {
870             void init() {
871                 m_ForceAuthn=XML_BOOL_NULL;
872                 m_IsPassive=XML_BOOL_NULL;
873                 m_ProtocolBinding=NULL;
874                 m_AssertionConsumerServiceIndex=NULL;
875                 m_AssertionConsumerServiceURL=NULL;
876                 m_AttributeConsumingServiceIndex=NULL;
877                 m_ProviderName=NULL;
878
879                 m_Subject=NULL;
880                 m_NameIDPolicy=NULL;
881                 m_Conditions=NULL;
882                 m_RequestedAuthnContext=NULL;
883                 m_Scoping=NULL;
884                 m_children.push_back(NULL);
885                 m_children.push_back(NULL);
886                 m_children.push_back(NULL);
887                 m_children.push_back(NULL);
888                 m_children.push_back(NULL);
889                 m_pos_Subject=m_pos_Extensions;
890                 ++m_pos_Subject;
891                 m_pos_NameIDPolicy=m_pos_Subject;
892                 ++m_pos_NameIDPolicy;
893                 m_pos_Conditions=m_pos_NameIDPolicy;
894                 ++m_pos_Conditions;
895                 m_pos_RequestedAuthnContext=m_pos_Conditions;
896                 ++m_pos_RequestedAuthnContext;
897                 m_pos_Scoping=m_pos_RequestedAuthnContext;
898                 ++m_pos_Scoping;
899                 
900             }
901         public:
902             virtual ~AuthnRequestImpl() {
903                 XMLString::release(&m_ProtocolBinding);
904                 XMLString::release(&m_AssertionConsumerServiceURL);
905                 XMLString::release(&m_ProviderName);
906                 XMLString::release(&m_AssertionConsumerServiceIndex);
907                 XMLString::release(&m_AttributeConsumingServiceIndex);
908             }
909     
910             AuthnRequestImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
911                 : AbstractXMLObject(nsURI, localName, prefix, schemaType)
912             {
913                 init();
914             }
915                 
916             AuthnRequestImpl(const AuthnRequestImpl& src) : AbstractXMLObject(src), RequestAbstractTypeImpl(src) {
917                 init();
918
919                 ForceAuthn(m_ForceAuthn);
920                 IsPassive(m_IsPassive);
921                 setProtocolBinding(src.getProtocolBinding());
922                 setAssertionConsumerServiceIndex(m_AssertionConsumerServiceIndex);
923                 setAssertionConsumerServiceURL(src.getAssertionConsumerServiceURL());
924                 setAttributeConsumingServiceIndex(m_AttributeConsumingServiceIndex);
925                 setProviderName(src.getProviderName());
926
927                 if (src.getSubject())
928                     setSubject(src.getSubject()->cloneSubject());
929                 if (src.getNameIDPolicy())
930                     setNameIDPolicy(src.getNameIDPolicy()->cloneNameIDPolicy());
931                 if (src.getConditions())
932                     setConditions(src.getConditions()->cloneConditions());
933                 if (src.getRequestedAuthnContext())
934                     setRequestedAuthnContext(src.getRequestedAuthnContext()->cloneRequestedAuthnContext());
935                 if (src.getScoping())
936                     setScoping(src.getScoping()->cloneScoping());
937             }
938             
939             IMPL_XMLOBJECT_CLONE(AuthnRequest);
940             RequestAbstractType* cloneRequestAbstractType() const {
941                 return cloneAuthnRequest();
942             }
943
944             IMPL_BOOLEAN_ATTRIB(ForceAuthn);
945             IMPL_BOOLEAN_ATTRIB(IsPassive);
946             IMPL_STRING_ATTRIB(ProtocolBinding);
947             IMPL_INTEGER_ATTRIB(AssertionConsumerServiceIndex);
948             IMPL_STRING_ATTRIB(AssertionConsumerServiceURL);
949             IMPL_INTEGER_ATTRIB(AttributeConsumingServiceIndex);
950             IMPL_STRING_ATTRIB(ProviderName);
951
952             IMPL_TYPED_FOREIGN_CHILD(Subject,saml2);
953             IMPL_TYPED_CHILD(NameIDPolicy);
954             IMPL_TYPED_FOREIGN_CHILD(Conditions,saml2);
955             IMPL_TYPED_CHILD(RequestedAuthnContext);
956             IMPL_TYPED_CHILD(Scoping);
957     
958         protected:
959             void marshallAttributes(DOMElement* domElement) const {
960                 MARSHALL_BOOLEAN_ATTRIB(ForceAuthn,FORCEAUTHN,NULL);
961                 MARSHALL_BOOLEAN_ATTRIB(IsPassive,ISPASSIVE,NULL);
962                 MARSHALL_STRING_ATTRIB(ProtocolBinding,PROTOCOLBINDING,NULL);
963                 MARSHALL_INTEGER_ATTRIB(AssertionConsumerServiceIndex,ASSERTIONCONSUMERSERVICEINDEX,NULL);
964                 MARSHALL_STRING_ATTRIB(AssertionConsumerServiceURL,ASSERTIONCONSUMERSERVICEURL,NULL);
965                 MARSHALL_INTEGER_ATTRIB(AttributeConsumingServiceIndex,ATTRIBUTECONSUMINGSERVICEINDEX,NULL);
966                 MARSHALL_STRING_ATTRIB(ProviderName,PROVIDERNAME,NULL);
967                 RequestAbstractTypeImpl::marshallAttributes(domElement);
968             }
969     
970             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
971                 PROC_TYPED_FOREIGN_CHILD(Subject,saml2,SAML20_NS,false);
972                 PROC_TYPED_CHILD(NameIDPolicy,SAML20P_NS,false);
973                 PROC_TYPED_FOREIGN_CHILD(Conditions,saml2,SAML20_NS,false);
974                 PROC_TYPED_CHILD(RequestedAuthnContext,SAML20P_NS,false);
975                 PROC_TYPED_CHILD(Scoping,SAML20P_NS,false);
976                 RequestAbstractTypeImpl::processChildElement(childXMLObject,root);
977             }
978             void processAttribute(const DOMAttr* attribute) {
979                 PROC_BOOLEAN_ATTRIB(ForceAuthn,FORCEAUTHN,NULL);
980                 PROC_BOOLEAN_ATTRIB(IsPassive,ISPASSIVE,NULL);
981                 PROC_STRING_ATTRIB(ProtocolBinding,PROTOCOLBINDING,NULL);
982                 PROC_INTEGER_ATTRIB(AssertionConsumerServiceIndex,ASSERTIONCONSUMERSERVICEINDEX,NULL);
983                 PROC_STRING_ATTRIB(AssertionConsumerServiceURL,ASSERTIONCONSUMERSERVICEURL,NULL);
984                 PROC_INTEGER_ATTRIB(AttributeConsumingServiceIndex,ATTRIBUTECONSUMINGSERVICEINDEX,NULL);
985                 PROC_STRING_ATTRIB(ProviderName,PROVIDERNAME,NULL);
986                 RequestAbstractTypeImpl::processAttribute(attribute);
987             }
988         };
989
990         class SAML_DLLLOCAL StatusResponseTypeImpl : public virtual StatusResponseType,
991             public AbstractComplexElement,
992             public AbstractDOMCachingXMLObject,
993             public AbstractXMLObjectMarshaller,
994             public AbstractXMLObjectUnmarshaller
995         {
996             void init() {
997                 m_ID=NULL;
998                 m_InResponseTo=NULL;
999                 m_Version=NULL;
1000                 m_IssueInstant=NULL;
1001                 m_Destination=NULL;
1002                 m_Consent=NULL;
1003                 m_Issuer=NULL;
1004                 m_Signature=NULL;
1005                 m_Extensions=NULL;
1006                 m_Status=NULL;
1007                 m_children.push_back(NULL);
1008                 m_children.push_back(NULL);
1009                 m_children.push_back(NULL);
1010                 m_children.push_back(NULL);
1011                 m_pos_Issuer=m_children.begin();
1012                 m_pos_Signature=m_pos_Issuer;
1013                 ++m_pos_Signature;
1014                 m_pos_Extensions=m_pos_Signature;
1015                 ++m_pos_Extensions;
1016                 m_pos_Status=m_pos_Extensions;
1017                 ++m_pos_Status;
1018             }
1019         protected:
1020             StatusResponseTypeImpl() {
1021                 init();
1022             }
1023         public:
1024             virtual ~StatusResponseTypeImpl() {
1025                 XMLString::release(&m_ID);
1026                 XMLString::release(&m_InResponseTo);
1027                 XMLString::release(&m_Version);
1028                 XMLString::release(&m_Destination);
1029                 XMLString::release(&m_Consent);
1030                 delete m_IssueInstant;
1031             }
1032     
1033             StatusResponseTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1034                 : AbstractXMLObject(nsURI, localName, prefix, schemaType)
1035             {
1036                 init();
1037             }
1038                 
1039             StatusResponseTypeImpl(const StatusResponseTypeImpl& src)
1040                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1041                 init();
1042                 setID(src.getID());
1043                 setInResponseTo(src.getInResponseTo());
1044                 setVersion(src.getVersion());
1045                 setIssueInstant(src.getIssueInstant());
1046                 setDestination(src.getDestination());
1047                 setConsent(src.getConsent());
1048                 if (src.getIssuer())
1049                     setIssuer(src.getIssuer()->cloneIssuer());
1050                 if (src.getSignature())
1051                     setSignature(src.getSignature()->cloneSignature());
1052                 if (src.getExtensions())
1053                     setExtensions(src.getExtensions()->cloneExtensions());
1054                 if (src.getStatus())
1055                     setStatus(src.getStatus()->cloneStatus());
1056             }
1057             
1058             //IMPL_TYPED_CHILD(Signature);
1059             // Need customized setter.
1060         protected:
1061             Signature* m_Signature;
1062             list<XMLObject*>::iterator m_pos_Signature;
1063         public:
1064             Signature* getSignature() const {
1065                 return m_Signature;
1066             }
1067             
1068             void setSignature(Signature* sig) {
1069                 prepareForAssignment(m_Signature,sig);
1070                 *m_pos_Signature=m_Signature=sig;
1071                 // Sync content reference back up.
1072                 if (m_Signature)
1073                     m_Signature->setContentReference(new opensaml::ContentReference(*this));
1074             }
1075             
1076             IMPL_STRING_ATTRIB(Version);
1077             IMPL_ID_ATTRIB(ID);
1078             IMPL_STRING_ATTRIB(InResponseTo);
1079             IMPL_DATETIME_ATTRIB(IssueInstant,0);
1080             IMPL_STRING_ATTRIB(Destination);
1081             IMPL_STRING_ATTRIB(Consent);
1082             IMPL_TYPED_FOREIGN_CHILD(Issuer,saml2);
1083             IMPL_TYPED_CHILD(Extensions);
1084             IMPL_TYPED_CHILD(Status);
1085     
1086         protected:
1087             void marshallAttributes(DOMElement* domElement) const {
1088                 if (!m_Version)
1089                     const_cast<StatusResponseTypeImpl*>(this)->m_Version=XMLString::transcode("2.0");
1090                 MARSHALL_STRING_ATTRIB(Version,VER,NULL);
1091                 if (!m_ID)
1092                     const_cast<StatusResponseTypeImpl*>(this)->m_ID=SAMLConfig::getConfig().generateIdentifier();
1093                 MARSHALL_ID_ATTRIB(ID,ID,NULL);
1094                 if (!m_IssueInstant) {
1095                     const_cast<StatusResponseTypeImpl*>(this)->m_IssueInstantEpoch=time(NULL);
1096                     const_cast<StatusResponseTypeImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
1097                 }
1098                 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1099                 MARSHALL_STRING_ATTRIB(Destination,DESTINATION,NULL);
1100                 MARSHALL_STRING_ATTRIB(Consent,CONSENT,NULL);
1101                 MARSHALL_STRING_ATTRIB(InResponseTo,INRESPONSETO,NULL);
1102             }
1103     
1104             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1105                 PROC_TYPED_FOREIGN_CHILD(Issuer,saml2,SAML20_NS,false);
1106                 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
1107                 PROC_TYPED_CHILD(Extensions,SAML20P_NS,false);
1108                 PROC_TYPED_CHILD(Status,SAML20P_NS,false);
1109                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1110             }
1111     
1112             void processAttribute(const DOMAttr* attribute) {
1113                 PROC_ID_ATTRIB(ID,ID,NULL);
1114                 PROC_STRING_ATTRIB(Version,VER,NULL);
1115                 PROC_STRING_ATTRIB(InResponseTo,INRESPONSETO,NULL);
1116                 PROC_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,NULL);
1117                 PROC_STRING_ATTRIB(Destination,DESTINATION,NULL);
1118                 PROC_STRING_ATTRIB(Consent,CONSENT,NULL);
1119                 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1120             }
1121         };
1122
1123         class SAML_DLLLOCAL ResponseImpl : public virtual Response, public StatusResponseTypeImpl
1124         {
1125         public:
1126             virtual ~ResponseImpl() { }
1127     
1128             ResponseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1129                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) { }
1130                 
1131             ResponseImpl(const ResponseImpl& src) : AbstractXMLObject(src), StatusResponseTypeImpl(src) {
1132                 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1133                     if (*i) {
1134                         saml2::Assertion* assertion=dynamic_cast<saml2::Assertion*>(*i);
1135                         if (assertion) {
1136                             getAssertions().push_back(assertion->cloneAssertion());
1137                             continue;
1138                         }
1139                         EncryptedAssertion* encAssertion=dynamic_cast<EncryptedAssertion*>(*i);
1140                         if (encAssertion) {
1141                             getEncryptedAssertions().push_back(encAssertion->cloneEncryptedAssertion());
1142                             continue;
1143                         }
1144                     }
1145                 }
1146
1147             }
1148             
1149             IMPL_XMLOBJECT_CLONE(Response);
1150             StatusResponseType* cloneStatusResponseType() const {
1151                 return cloneResponse();
1152             }
1153
1154             IMPL_TYPED_FOREIGN_CHILDREN(Assertion,saml2,m_children.end());
1155             IMPL_TYPED_FOREIGN_CHILDREN(EncryptedAssertion,saml2,m_children.end());
1156     
1157         protected:
1158             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1159                 PROC_TYPED_FOREIGN_CHILDREN(Assertion,saml2,SAML20_NS,false);
1160                 PROC_TYPED_FOREIGN_CHILDREN(EncryptedAssertion,saml2,SAML20_NS,false);
1161                 StatusResponseTypeImpl::processChildElement(childXMLObject,root);
1162             }
1163         };
1164
1165         class SAML_DLLLOCAL ArtifactResolveImpl : public virtual ArtifactResolve, public RequestAbstractTypeImpl
1166         {
1167             void init() {
1168                 m_Artifact=NULL;
1169                 m_children.push_back(NULL);
1170                 m_pos_Artifact=m_pos_Extensions;
1171                 ++m_pos_Artifact;
1172             }
1173         public:
1174             virtual ~ArtifactResolveImpl() { }
1175     
1176             ArtifactResolveImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1177                 : AbstractXMLObject(nsURI, localName, prefix, schemaType)
1178             { 
1179                 init();
1180             }
1181                 
1182             ArtifactResolveImpl(const ArtifactResolveImpl& src) : AbstractXMLObject(src), RequestAbstractTypeImpl(src) {
1183                 init();
1184                 if(src.getArtifact())
1185                     setArtifact(src.getArtifact()->cloneArtifact());
1186             }
1187             
1188             IMPL_XMLOBJECT_CLONE(ArtifactResolve);
1189             RequestAbstractType* cloneRequestAbstractType() const {
1190                 return cloneArtifactResolve();
1191             }
1192
1193             IMPL_TYPED_CHILD(Artifact);
1194     
1195         protected:
1196             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1197                 PROC_TYPED_CHILD(Artifact,SAML20P_NS,false);
1198                 RequestAbstractTypeImpl::processChildElement(childXMLObject,root);
1199             }
1200         };
1201
1202         class SAML_DLLLOCAL ArtifactResponseImpl : public virtual ArtifactResponse, public StatusResponseTypeImpl
1203         {
1204             void init() {
1205                 m_Payload=NULL;
1206                 m_children.push_back(NULL);
1207                 m_pos_Payload=m_pos_Status;
1208                 ++m_pos_Payload;
1209             }
1210         public:
1211             virtual ~ArtifactResponseImpl() { }
1212     
1213             ArtifactResponseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1214                 : AbstractXMLObject(nsURI, localName, prefix, schemaType)
1215             {
1216                 init();
1217             }
1218                 
1219             ArtifactResponseImpl(const ArtifactResponseImpl& src) : AbstractXMLObject(src), StatusResponseTypeImpl(src) {
1220                 init();
1221                 if (src.getPayload())
1222                     setPayload(getPayload()->clone());
1223
1224             }
1225             
1226             IMPL_XMLOBJECT_CLONE(ArtifactResponse);
1227             StatusResponseType* cloneStatusResponseType() const {
1228                 return cloneArtifactResponse();
1229             }
1230
1231             IMPL_XMLOBJECT_CHILD(Payload);
1232     
1233         protected:
1234             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1235                 // These are valid elements for the parent StatusResponseType, so don't process these.
1236                 // If not one of these, then it must be the payload.
1237                 if (
1238                     ! XMLHelper::isNodeNamed(root,SAML20_NS,saml2::Issuer::LOCAL_NAME) &&
1239                     ! XMLHelper::isNodeNamed(root,XMLSIG_NS,xmlsignature::Signature::LOCAL_NAME) &&
1240                     ! XMLHelper::isNodeNamed(root,SAML20P_NS,saml2p::Extensions::LOCAL_NAME) &&
1241                     ! XMLHelper::isNodeNamed(root,SAML20P_NS,saml2p::Status::LOCAL_NAME)
1242                    )
1243                 {
1244                     setPayload(childXMLObject);
1245                     return;
1246                 }
1247
1248                 StatusResponseTypeImpl::processChildElement(childXMLObject,root);
1249             }
1250         };
1251
1252         class SAML_DLLLOCAL NewEncryptedIDImpl : public virtual NewEncryptedID,
1253             public AbstractComplexElement,
1254             public AbstractDOMCachingXMLObject,
1255             public AbstractXMLObjectMarshaller,
1256             public AbstractXMLObjectUnmarshaller
1257         {
1258             void init() {
1259                 m_EncryptedData=NULL;
1260                 m_children.push_back(NULL);
1261                 m_pos_EncryptedData=m_children.begin();
1262             }
1263             
1264         protected:
1265             NewEncryptedIDImpl()
1266             {
1267                 init();
1268             }
1269             
1270         public:
1271             virtual ~NewEncryptedIDImpl() {}
1272     
1273             NewEncryptedIDImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1274                     : AbstractXMLObject(nsURI, localName, prefix, schemaType)
1275             {
1276                 init();
1277             }
1278                 
1279             NewEncryptedIDImpl(const NewEncryptedIDImpl& src)
1280                     : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1281                 init();
1282                 if (src.getEncryptedData())
1283                     setEncryptedData(src.getEncryptedData()->cloneEncryptedData());
1284                 VectorOf(xmlencryption::EncryptedKey) v=getEncryptedKeys();
1285                 for (vector<xmlencryption::EncryptedKey*>::const_iterator i=src.m_EncryptedKeys.begin(); i!=src.m_EncryptedKeys.end(); i++) {
1286                     if (*i) {
1287                         v.push_back((*i)->cloneEncryptedKey());
1288                     }
1289                 }
1290             }
1291     
1292             IMPL_XMLOBJECT_CLONE(NewEncryptedID);
1293             EncryptedElementType* cloneEncryptedElementType() const {
1294                 return new NewEncryptedIDImpl(*this);
1295             }
1296
1297             IMPL_TYPED_FOREIGN_CHILD(EncryptedData,xmlencryption);
1298             IMPL_TYPED_FOREIGN_CHILDREN(EncryptedKey,xmlencryption,m_children.end());
1299     
1300         protected:
1301             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1302                 PROC_TYPED_FOREIGN_CHILD(EncryptedData,xmlencryption,XMLENC_NS,false);
1303                 PROC_TYPED_FOREIGN_CHILDREN(EncryptedKey,xmlencryption,XMLENC_NS,false);
1304                 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1305             }
1306         };
1307
1308         class SAML_DLLLOCAL TerminateImpl : public virtual Terminate,
1309             public AbstractSimpleElement,
1310             public AbstractDOMCachingXMLObject,
1311             public AbstractXMLObjectMarshaller,
1312             public AbstractXMLObjectUnmarshaller
1313         {
1314             public:
1315                 virtual ~TerminateImpl() { }
1316
1317                 TerminateImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1318                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) { }
1319
1320                 TerminateImpl(const TerminateImpl& src)
1321                     : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
1322                 }
1323
1324                 IMPL_XMLOBJECT_CLONE(Terminate);
1325
1326             protected:
1327                 // has no attributes or children
1328         };
1329
1330         class SAML_DLLLOCAL ManageNameIDRequestImpl : public virtual ManageNameIDRequest, public RequestAbstractTypeImpl
1331         {
1332             void init() {
1333                 m_NameID=NULL;
1334                 m_EncryptedID=NULL;
1335                 m_NewID=NULL;
1336                 m_NewEncryptedID=NULL;
1337                 m_Terminate=NULL;
1338                 m_children.push_back(NULL);
1339                 m_children.push_back(NULL);
1340                 m_children.push_back(NULL);
1341                 m_children.push_back(NULL);
1342                 m_children.push_back(NULL);
1343                 m_pos_NameID=m_pos_Extensions;
1344                 ++m_pos_NameID;
1345                 m_pos_EncryptedID=m_pos_NameID;
1346                 ++m_pos_EncryptedID;
1347                 m_pos_NewID=m_pos_EncryptedID;
1348                 ++m_pos_NewID;
1349                 m_pos_NewEncryptedID=m_pos_NewID;
1350                 ++m_pos_NewEncryptedID;
1351                 m_pos_Terminate=m_pos_NewEncryptedID;
1352                 ++m_pos_Terminate;
1353                 
1354             }
1355         public:
1356             virtual ~ManageNameIDRequestImpl() { }
1357     
1358             ManageNameIDRequestImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1359                 : AbstractXMLObject(nsURI, localName, prefix, schemaType)
1360             {
1361                 init();
1362             }
1363                 
1364             ManageNameIDRequestImpl(const ManageNameIDRequestImpl& src) : AbstractXMLObject(src), RequestAbstractTypeImpl(src) {
1365                 init();
1366
1367                 if (src.getNameID())
1368                     setNameID(src.getNameID()->cloneNameID());
1369                 if (src.getEncryptedID())
1370                     setEncryptedID(src.getEncryptedID()->cloneEncryptedID());
1371                 if (src.getNewID())
1372                     setNewID(src.getNewID()->cloneNewID());
1373                 if (src.getNewEncryptedID())
1374                     setNewEncryptedID(src.getNewEncryptedID()->cloneNewEncryptedID());
1375                 if (src.getTerminate())
1376                     setTerminate(src.getTerminate()->cloneTerminate());
1377
1378             }
1379             
1380             IMPL_XMLOBJECT_CLONE(ManageNameIDRequest);
1381             RequestAbstractType* cloneRequestAbstractType() const {
1382                 return cloneManageNameIDRequest();
1383             }
1384
1385             IMPL_TYPED_FOREIGN_CHILD(NameID,saml2);
1386             IMPL_TYPED_FOREIGN_CHILD(EncryptedID,saml2);
1387             IMPL_TYPED_CHILD(NewID);
1388             IMPL_TYPED_CHILD(NewEncryptedID);
1389             IMPL_TYPED_CHILD(Terminate);
1390     
1391         protected:
1392             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1393                 PROC_TYPED_FOREIGN_CHILD(NameID,saml2,SAML20_NS,false);
1394                 PROC_TYPED_FOREIGN_CHILD(EncryptedID,saml2,SAML20_NS,false);
1395                 PROC_TYPED_CHILD(NewID,SAML20P_NS,false);
1396                 PROC_TYPED_CHILD(NewEncryptedID,SAML20P_NS,false);
1397                 PROC_TYPED_CHILD(Terminate,SAML20P_NS,false);
1398                 RequestAbstractTypeImpl::processChildElement(childXMLObject,root);
1399             }
1400         };
1401
1402         class SAML_DLLLOCAL ManageNameIDResponseImpl : public virtual ManageNameIDResponse, public StatusResponseTypeImpl
1403         {
1404         public:
1405             virtual ~ManageNameIDResponseImpl() { }
1406
1407             ManageNameIDResponseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1408                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) { }
1409             
1410             ManageNameIDResponseImpl(const ManageNameIDResponseImpl& src) : AbstractXMLObject(src), StatusResponseTypeImpl(src) {
1411             }
1412
1413             IMPL_XMLOBJECT_CLONE(ManageNameIDResponse);
1414             StatusResponseType* cloneStatusResponseType() const {
1415                 return cloneManageNameIDResponse();
1416             }
1417         };
1418
1419         class SAML_DLLLOCAL LogoutRequestImpl : public virtual LogoutRequest, public RequestAbstractTypeImpl
1420         {
1421             void init() {
1422                 m_Reason=NULL;
1423                 m_NotOnOrAfter=NULL;
1424
1425                 m_BaseID=NULL;
1426                 m_NameID=NULL;
1427                 m_EncryptedID=NULL;
1428                 m_children.push_back(NULL);
1429                 m_children.push_back(NULL);
1430                 m_children.push_back(NULL);
1431                 m_pos_BaseID=m_pos_Extensions;
1432                 ++m_pos_BaseID;
1433                 m_pos_NameID=m_pos_BaseID;
1434                 ++m_pos_NameID;
1435                 m_pos_EncryptedID=m_pos_NameID;
1436                 ++m_pos_EncryptedID;
1437                 
1438             }
1439         public:
1440             virtual ~LogoutRequestImpl() {
1441                 XMLString::release(&m_Reason);
1442                 delete m_NotOnOrAfter;
1443             }
1444     
1445             LogoutRequestImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1446                 : AbstractXMLObject(nsURI, localName, prefix, schemaType)
1447             {
1448                 init();
1449             }
1450                 
1451             LogoutRequestImpl(const LogoutRequestImpl& src) : AbstractXMLObject(src), RequestAbstractTypeImpl(src) {
1452                 init();
1453
1454                 setReason(src.getReason());
1455                 setNotOnOrAfter(src.getNotOnOrAfter());
1456
1457                 if (src.getBaseID())
1458                     setBaseID(src.getBaseID()->cloneBaseID());
1459                 if (src.getNameID())
1460                     setNameID(src.getNameID()->cloneNameID());
1461                 if (src.getEncryptedID())
1462                     setEncryptedID(src.getEncryptedID()->cloneEncryptedID());
1463
1464                 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1465                     if (*i) {
1466                         SessionIndex* si = dynamic_cast<SessionIndex*>(*i);
1467                         if (si) {
1468                             getSessionIndexs().push_back(si->cloneSessionIndex());
1469                             continue;
1470                         }
1471                     }
1472                 }
1473             }
1474             
1475             IMPL_XMLOBJECT_CLONE(LogoutRequest);
1476             RequestAbstractType* cloneRequestAbstractType() const {
1477                 return cloneLogoutRequest();
1478             }
1479
1480             IMPL_STRING_ATTRIB(Reason);
1481             IMPL_DATETIME_ATTRIB(NotOnOrAfter,SAMLTIME_MAX);
1482             IMPL_TYPED_FOREIGN_CHILD(BaseID,saml2);
1483             IMPL_TYPED_FOREIGN_CHILD(NameID,saml2);
1484             IMPL_TYPED_FOREIGN_CHILD(EncryptedID,saml2);
1485             IMPL_TYPED_CHILDREN(SessionIndex,m_children.end());
1486     
1487         protected:
1488             void marshallAttributes(DOMElement* domElement) const {
1489                 MARSHALL_STRING_ATTRIB(Reason,REASON,NULL);
1490                 MARSHALL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
1491                 RequestAbstractTypeImpl::marshallAttributes(domElement);
1492             }
1493     
1494             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1495                 PROC_TYPED_FOREIGN_CHILD(BaseID,saml2,SAML20_NS,false);
1496                 PROC_TYPED_FOREIGN_CHILD(NameID,saml2,SAML20_NS,false);
1497                 PROC_TYPED_FOREIGN_CHILD(EncryptedID,saml2,SAML20_NS,false);
1498                 PROC_TYPED_CHILDREN(SessionIndex,SAML20P_NS,false);
1499                 RequestAbstractTypeImpl::processChildElement(childXMLObject,root);
1500             }
1501             void processAttribute(const DOMAttr* attribute) {
1502                 PROC_STRING_ATTRIB(Reason,REASON,NULL);
1503                 PROC_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER,NULL);
1504                 RequestAbstractTypeImpl::processAttribute(attribute);
1505             }
1506         };
1507
1508         class SAML_DLLLOCAL LogoutResponseImpl : public virtual LogoutResponse, public StatusResponseTypeImpl
1509         {
1510         public:
1511             virtual ~LogoutResponseImpl() { }
1512
1513             LogoutResponseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1514                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) { }
1515             
1516             LogoutResponseImpl(const LogoutResponseImpl& src) : AbstractXMLObject(src), StatusResponseTypeImpl(src) {
1517             }
1518
1519             IMPL_XMLOBJECT_CLONE(LogoutResponse);
1520             StatusResponseType* cloneStatusResponseType() const {
1521                 return cloneLogoutResponse();
1522             }
1523         };
1524
1525
1526         class SAML_DLLLOCAL NameIDMappingRequestImpl : public virtual NameIDMappingRequest, public RequestAbstractTypeImpl
1527         {
1528             void init() {
1529                 m_BaseID=NULL;
1530                 m_NameID=NULL;
1531                 m_EncryptedID=NULL;
1532                 m_NameIDPolicy=NULL;
1533                 m_children.push_back(NULL);
1534                 m_children.push_back(NULL);
1535                 m_children.push_back(NULL);
1536                 m_children.push_back(NULL);
1537                 m_pos_BaseID=m_pos_Extensions;
1538                 ++m_pos_BaseID;
1539                 m_pos_NameID=m_pos_BaseID;
1540                 ++m_pos_NameID;
1541                 m_pos_EncryptedID=m_pos_NameID;
1542                 ++m_pos_EncryptedID;
1543                 m_pos_NameIDPolicy=m_pos_EncryptedID;
1544                 ++m_pos_NameIDPolicy;
1545                 
1546             }
1547         public:
1548             virtual ~NameIDMappingRequestImpl() { }
1549     
1550             NameIDMappingRequestImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1551                 : AbstractXMLObject(nsURI, localName, prefix, schemaType)
1552             {
1553                 init();
1554             }
1555                 
1556             NameIDMappingRequestImpl(const NameIDMappingRequestImpl& src) : AbstractXMLObject(src), RequestAbstractTypeImpl(src) {
1557                 init();
1558
1559                 if (src.getBaseID())
1560                     setBaseID(src.getBaseID()->cloneBaseID());
1561                 if (src.getNameID())
1562                     setNameID(src.getNameID()->cloneNameID());
1563                 if (src.getEncryptedID())
1564                     setEncryptedID(src.getEncryptedID()->cloneEncryptedID());
1565                 if (src.getNameIDPolicy())
1566                     setNameIDPolicy(src.getNameIDPolicy()->cloneNameIDPolicy());
1567
1568             }
1569             
1570             IMPL_XMLOBJECT_CLONE(NameIDMappingRequest);
1571             RequestAbstractType* cloneRequestAbstractType() const {
1572                 return cloneNameIDMappingRequest();
1573             }
1574
1575             IMPL_TYPED_FOREIGN_CHILD(BaseID,saml2);
1576             IMPL_TYPED_FOREIGN_CHILD(NameID,saml2);
1577             IMPL_TYPED_FOREIGN_CHILD(EncryptedID,saml2);
1578             IMPL_TYPED_CHILD(NameIDPolicy);
1579     
1580         protected:
1581             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1582                 PROC_TYPED_FOREIGN_CHILD(BaseID,saml2,SAML20_NS,false);
1583                 PROC_TYPED_FOREIGN_CHILD(NameID,saml2,SAML20_NS,false);
1584                 PROC_TYPED_FOREIGN_CHILD(EncryptedID,saml2,SAML20_NS,false);
1585                 PROC_TYPED_CHILD(NameIDPolicy,SAML20P_NS,false);
1586                 RequestAbstractTypeImpl::processChildElement(childXMLObject,root);
1587             }
1588         };
1589
1590         class SAML_DLLLOCAL NameIDMappingResponseImpl : public virtual NameIDMappingResponse, public StatusResponseTypeImpl
1591         {
1592             void init() {
1593                 m_NameID=NULL;
1594                 m_EncryptedID=NULL;
1595                 m_children.push_back(NULL);
1596                 m_children.push_back(NULL);
1597                 m_pos_NameID=m_pos_Status;
1598                 ++m_pos_NameID;
1599                 m_pos_EncryptedID=m_pos_NameID;
1600                 ++m_pos_EncryptedID;
1601             }
1602         public:
1603             virtual ~NameIDMappingResponseImpl() { }
1604     
1605             NameIDMappingResponseImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1606                 : AbstractXMLObject(nsURI, localName, prefix, schemaType)
1607             {
1608                 init();
1609             }
1610                 
1611             NameIDMappingResponseImpl(const NameIDMappingResponseImpl& src) : AbstractXMLObject(src), StatusResponseTypeImpl(src) {
1612                 init();
1613
1614                 if (src.getNameID())
1615                     setNameID(getNameID()->cloneNameID());
1616                 if (src.getEncryptedID())
1617                     setEncryptedID(getEncryptedID()->cloneEncryptedID());
1618
1619             }
1620             
1621             IMPL_XMLOBJECT_CLONE(NameIDMappingResponse);
1622             StatusResponseType* cloneStatusResponseType() const {
1623                 return cloneNameIDMappingResponse();
1624             }
1625
1626             IMPL_TYPED_FOREIGN_CHILD(NameID,saml2);
1627             IMPL_TYPED_FOREIGN_CHILD(EncryptedID,saml2);
1628     
1629         protected:
1630             void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1631                 PROC_TYPED_FOREIGN_CHILD(NameID,saml2,SAML20_NS,false);
1632                 PROC_TYPED_FOREIGN_CHILD(EncryptedID,saml2,SAML20_NS,false);
1633                 StatusResponseTypeImpl::processChildElement(childXMLObject,root);
1634             }
1635         };
1636     };
1637 };
1638
1639 #if defined (_MSC_VER)
1640     #pragma warning( pop )
1641 #endif
1642
1643 // Builder Implementations
1644 IMPL_XMLOBJECTBUILDER(Artifact);
1645 IMPL_XMLOBJECTBUILDER(ArtifactResolve);
1646 IMPL_XMLOBJECTBUILDER(ArtifactResponse);
1647 IMPL_XMLOBJECTBUILDER(AssertionIDRequest);
1648 IMPL_XMLOBJECTBUILDER(AttributeQuery);
1649 IMPL_XMLOBJECTBUILDER(AuthnQuery);
1650 IMPL_XMLOBJECTBUILDER(AuthnRequest);
1651 IMPL_XMLOBJECTBUILDER(AuthzDecisionQuery);
1652 IMPL_XMLOBJECTBUILDER(Extensions);
1653 IMPL_XMLOBJECTBUILDER(GetComplete);
1654 IMPL_XMLOBJECTBUILDER(IDPEntry);
1655 IMPL_XMLOBJECTBUILDER(IDPList);
1656 IMPL_XMLOBJECTBUILDER(LogoutRequest);
1657 IMPL_XMLOBJECTBUILDER(LogoutResponse);
1658 IMPL_XMLOBJECTBUILDER(ManageNameIDRequest);
1659 IMPL_XMLOBJECTBUILDER(ManageNameIDResponse);
1660 IMPL_XMLOBJECTBUILDER(NameIDMappingRequest);
1661 IMPL_XMLOBJECTBUILDER(NameIDMappingResponse);
1662 IMPL_XMLOBJECTBUILDER(NameIDPolicy);
1663 IMPL_XMLOBJECTBUILDER(NewEncryptedID);
1664 IMPL_XMLOBJECTBUILDER(NewID);
1665 IMPL_XMLOBJECTBUILDER(RequestedAuthnContext);
1666 IMPL_XMLOBJECTBUILDER(RequesterID);
1667 IMPL_XMLOBJECTBUILDER(Response);
1668 IMPL_XMLOBJECTBUILDER(Scoping);
1669 IMPL_XMLOBJECTBUILDER(SessionIndex);
1670 IMPL_XMLOBJECTBUILDER(Status);
1671 IMPL_XMLOBJECTBUILDER(StatusCode);
1672 IMPL_XMLOBJECTBUILDER(StatusDetail);
1673 IMPL_XMLOBJECTBUILDER(StatusMessage);
1674 IMPL_XMLOBJECTBUILDER(Terminate);
1675
1676 IMPL_XMLOBJECTBUILDER(RespondTo);
1677
1678 // Unicode literals
1679 const XMLCh Artifact::LOCAL_NAME[] = UNICODE_LITERAL_8(A,r,t,i,f,a,c,t);
1680 const XMLCh ArtifactResolve::LOCAL_NAME[] = UNICODE_LITERAL_15(A,r,t,i,f,a,c,t,R,e,s,o,l,v,e);
1681 const XMLCh ArtifactResolve::TYPE_NAME[] = UNICODE_LITERAL_19(A,r,t,i,f,a,c,t,R,e,s,o,l,v,e,T,y,p,e);
1682 const XMLCh ArtifactResponse::LOCAL_NAME[] = UNICODE_LITERAL_16(A,r,t,i,f,a,c,t,R,e,s,p,o,n,s,e);
1683 const XMLCh ArtifactResponse::TYPE_NAME[] = UNICODE_LITERAL_20(A,r,t,i,f,a,c,t,R,e,s,p,o,n,s,e,T,y,p,e);
1684 const XMLCh AssertionIDRequest::LOCAL_NAME[] = UNICODE_LITERAL_18(A,s,s,e,r,t,i,o,n,I,D,R,e,q,u,e,s,t);
1685 const XMLCh AssertionIDRequest::TYPE_NAME[] = UNICODE_LITERAL_22(A,s,s,e,r,t,i,o,n,I,D,R,e,q,u,e,s,t,T,y,p,e);
1686 const XMLCh AttributeQuery::LOCAL_NAME[] = UNICODE_LITERAL_14(A,t,t,r,i,b,u,t,e,Q,u,e,r,y);
1687 const XMLCh AttributeQuery::TYPE_NAME[] = UNICODE_LITERAL_18(A,t,t,r,i,b,u,t,e,Q,u,e,r,y,T,y,p,e);
1688 const XMLCh AuthnQuery::LOCAL_NAME[] = UNICODE_LITERAL_10(A,u,t,h,n,Q,u,e,r,y);
1689 const XMLCh AuthnQuery::TYPE_NAME[] = UNICODE_LITERAL_14(A,u,t,h,n,Q,u,e,r,y,T,y,p,e);
1690 const XMLCh AuthnQuery::SESSIONINDEX_ATTRIB_NAME[] = UNICODE_LITERAL_12(S,e,s,s,i,o,n,I,n,d,e,x);
1691 const XMLCh AuthnRequest::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,n,R,e,q,u,e,s,t);
1692 const XMLCh AuthnRequest::TYPE_NAME[] = UNICODE_LITERAL_16(A,u,t,h,n,R,e,q,u,e,s,t,T,y,p,e);
1693 const XMLCh AuthnRequest::FORCEAUTHN_ATTRIB_NAME[] = UNICODE_LITERAL_10(F,o,r,c,e,A,u,t,h,n);
1694 const XMLCh AuthnRequest::ISPASSIVE_ATTRIB_NAME[] = UNICODE_LITERAL_9(I,s,P,a,s,s,i,v,e);
1695 const XMLCh AuthnRequest::PROTOCOLBINDING_ATTRIB_NAME[] = UNICODE_LITERAL_15(P,r,o,t,o,c,o,l,B,i,n,d,i,n,g);
1696 const XMLCh AuthnRequest::ASSERTIONCONSUMERSERVICEINDEX_ATTRIB_NAME[] = UNICODE_LITERAL_29(A,s,s,e,r,t,i,o,n,C,o,n,s,u,m,e,r,S,e,r,v,i,c,e,I,n,d,e,x);
1697 const XMLCh AuthnRequest::ASSERTIONCONSUMERSERVICEURL_ATTRIB_NAME[] = UNICODE_LITERAL_27(A,s,s,e,r,t,i,o,n,C,o,n,s,u,m,e,r,S,e,r,v,i,c,e,U,R,L);
1698 const XMLCh AuthnRequest::ATTRIBUTECONSUMINGSERVICEINDEX_ATTRIB_NAME[] = UNICODE_LITERAL_30(A,t,t,r,i,b,u,t,e,C,o,n,s,u,m,i,n,g,S,e,r,v,i,c,e,I,n,d,e,x);
1699 const XMLCh AuthnRequest::PROVIDERNAME_ATTRIB_NAME[] = UNICODE_LITERAL_12(P,r,o,v,i,d,e,r,N,a,m,e);
1700 const XMLCh AuthzDecisionQuery::LOCAL_NAME[] = UNICODE_LITERAL_18(A,u,t,h,z,D,e,c,i,s,i,o,n,Q,u,e,r,y);
1701 const XMLCh AuthzDecisionQuery::TYPE_NAME[] = UNICODE_LITERAL_22(A,u,t,h,z,D,e,c,i,s,i,o,n,Q,u,e,r,y,T,y,p,e);
1702 const XMLCh AuthzDecisionQuery::RESOURCE_ATTRIB_NAME[] = UNICODE_LITERAL_8(R,e,s,o,u,r,c,e);
1703 const XMLCh Extensions::LOCAL_NAME[] = UNICODE_LITERAL_10(E,x,t,e,n,s,i,o,n,s);
1704 const XMLCh Extensions::TYPE_NAME[] = UNICODE_LITERAL_14(E,x,t,e,n,s,i,o,n,s,T,y,p,e);
1705 const XMLCh GetComplete::LOCAL_NAME[] = UNICODE_LITERAL_11(G,e,t,C,o,m,p,l,e,t,e);
1706 const XMLCh IDPEntry::LOCAL_NAME[] = UNICODE_LITERAL_8(I,D,P,E,n,t,r,y);
1707 const XMLCh IDPEntry::TYPE_NAME[] = UNICODE_LITERAL_12(I,D,P,E,n,t,r,y,T,y,p,e);
1708 const XMLCh IDPEntry::PROVIDERID_ATTRIB_NAME[] = UNICODE_LITERAL_10(P,r,o,v,i,d,e,r,I,D);
1709 const XMLCh IDPEntry::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e);
1710 const XMLCh IDPEntry::LOC_ATTRIB_NAME[] = UNICODE_LITERAL_3(L,o,c);
1711 const XMLCh IDPList::LOCAL_NAME[] = UNICODE_LITERAL_7(I,D,P,L,i,s,t);
1712 const XMLCh IDPList::TYPE_NAME[] = UNICODE_LITERAL_11(I,D,P,L,i,s,t,T,y,p,e);
1713 const XMLCh LogoutRequest::LOCAL_NAME[] = UNICODE_LITERAL_13(L,o,g,o,u,t,R,e,q,u,e,s,t);
1714 const XMLCh LogoutRequest::TYPE_NAME[] = UNICODE_LITERAL_17(L,o,g,o,u,t,R,e,q,u,e,s,t,T,y,p,e);
1715 const XMLCh LogoutRequest::REASON_ATTRIB_NAME[] = UNICODE_LITERAL_6(R,e,a,s,o,n);
1716 const XMLCh LogoutRequest::NOTONORAFTER_ATTRIB_NAME[] = UNICODE_LITERAL_12(N,o,t,O,n,O,r,A,f,t,e,r);
1717 const XMLCh LogoutResponse::LOCAL_NAME[] = UNICODE_LITERAL_14(L,o,g,o,u,t,R,e,s,p,o,n,s,e);
1718 const XMLCh ManageNameIDRequest::LOCAL_NAME[] = UNICODE_LITERAL_19(M,a,n,a,g,e,N,a,m,e,I,D,R,e,q,u,e,s,t);
1719 const XMLCh ManageNameIDRequest::TYPE_NAME[] = UNICODE_LITERAL_23(M,a,n,a,g,e,N,a,m,e,I,D,R,e,q,u,e,s,t,T,y,p,e);
1720 const XMLCh ManageNameIDResponse::LOCAL_NAME[] = UNICODE_LITERAL_20(M,a,n,a,g,e,N,a,m,e,I,D,R,e,s,p,o,n,s,e);
1721 const XMLCh NameIDMappingRequest::LOCAL_NAME[] = UNICODE_LITERAL_20(N,a,m,e,I,D,M,a,p,p,i,n,g,R,e,q,u,e,s,t);
1722 const XMLCh NameIDMappingRequest::TYPE_NAME[] = UNICODE_LITERAL_24(N,a,m,e,I,D,M,a,p,p,i,n,g,R,e,q,u,e,s,t,T,y,p,e);
1723 const XMLCh NameIDMappingResponse::LOCAL_NAME[] = UNICODE_LITERAL_21(N,a,m,e,I,D,M,a,p,p,i,n,g,R,e,s,p,o,n,s,e);
1724 const XMLCh NameIDMappingResponse::TYPE_NAME[] = UNICODE_LITERAL_25(N,a,m,e,I,D,M,a,p,p,i,n,g,R,e,s,p,o,n,s,e,T,y,p,e);
1725 const XMLCh NameIDPolicy::LOCAL_NAME[] = UNICODE_LITERAL_12(N,a,m,e,I,D,P,o,l,i,c,y);
1726 const XMLCh NameIDPolicy::TYPE_NAME[] = UNICODE_LITERAL_16(N,a,m,e,I,D,P,o,l,i,c,y,T,y,p,e);
1727 const XMLCh NameIDPolicy::FORMAT_ATTRIB_NAME[] = UNICODE_LITERAL_6(F,o,r,m,a,t);
1728 const XMLCh NameIDPolicy::SPNAMEQUALIFIER_ATTRIB_NAME[] = UNICODE_LITERAL_15(S,P,N,a,m,e,Q,u,a,l,i,f,i,e,r);
1729 const XMLCh NameIDPolicy::ALLOWCREATE_ATTRIB_NAME[] = UNICODE_LITERAL_11(A,l,l,o,w,C,r,e,a,t,e);
1730 const XMLCh NewEncryptedID::LOCAL_NAME[] = UNICODE_LITERAL_14(N,e,w,E,n,c,r,y,p,t,e,d,I,D);
1731 const XMLCh NewID::LOCAL_NAME[] = UNICODE_LITERAL_5(N,e,w,I,D);
1732 const XMLCh RequesterID::LOCAL_NAME[] = UNICODE_LITERAL_11(R,e,q,u,e,s,t,e,r,I,D);
1733 const XMLCh RequestedAuthnContext::LOCAL_NAME[] = UNICODE_LITERAL_21(R,e,q,u,e,s,t,e,d,A,u,t,h,n,C,o,n,t,e,x,t);
1734 const XMLCh RequestedAuthnContext::TYPE_NAME[] = UNICODE_LITERAL_25(R,e,q,u,e,s,t,e,d,A,u,t,h,n,C,o,n,t,e,x,t,T,y,p,e);
1735 const XMLCh RequestedAuthnContext::COMPARISON_ATTRIB_NAME[] = UNICODE_LITERAL_10(C,o,m,p,a,r,i,s,o,n);
1736 const XMLCh RequestedAuthnContext::COMPARISON_EXACT[] = UNICODE_LITERAL_5(e,x,a,c,t);
1737 const XMLCh RequestedAuthnContext::COMPARISON_MINIMUM[] = UNICODE_LITERAL_7(m,i,n,i,m,u,m);
1738 const XMLCh RequestedAuthnContext::COMPARISON_MAXIMUM[] = UNICODE_LITERAL_7(m,a,x,i,m,u,m);
1739 const XMLCh RequestedAuthnContext::COMPARISON_BETTER[] = UNICODE_LITERAL_6(b,e,t,t,e,r);
1740 const XMLCh RequestAbstractType::LOCAL_NAME[] = {chNull};
1741 const XMLCh RequestAbstractType::TYPE_NAME[] = UNICODE_LITERAL_19(R,e,q,u,e,s,t,A,b,s,t,r,a,c,t,T,y,p,e);
1742 const XMLCh RequestAbstractType::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
1743 const XMLCh RequestAbstractType::VER_ATTRIB_NAME[] = UNICODE_LITERAL_7(V,e,r,s,i,o,n);
1744 const XMLCh RequestAbstractType::ISSUEINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,s,s,u,e,I,n,s,t,a,n,t);
1745 const XMLCh RequestAbstractType::DESTINATION_ATTRIB_NAME[] = UNICODE_LITERAL_11(D,e,s,t,i,n,a,t,i,o,n);
1746 const XMLCh RequestAbstractType::CONSENT_ATTRIB_NAME[] = UNICODE_LITERAL_7(C,o,n,s,e,n,t);
1747 const XMLCh RespondTo::LOCAL_NAME[] = UNICODE_LITERAL_9(R,e,s,p,o,n,d,T,o);
1748 const XMLCh Response::LOCAL_NAME[] = UNICODE_LITERAL_8(R,e,s,p,o,n,s,e);
1749 const XMLCh Response::TYPE_NAME[] = UNICODE_LITERAL_12(R,e,s,p,o,n,s,e,T,y,p,e);
1750 const XMLCh Scoping::LOCAL_NAME[] = UNICODE_LITERAL_7(S,c,o,p,i,n,g);
1751 const XMLCh Scoping::TYPE_NAME[] = UNICODE_LITERAL_11(S,c,o,p,i,n,g,T,y,p,e);
1752 const XMLCh Scoping::PROXYCOUNT_ATTRIB_NAME[] = UNICODE_LITERAL_10(P,r,o,x,y,C,o,u,n,t);
1753 const XMLCh SessionIndex::LOCAL_NAME[] = UNICODE_LITERAL_12(S,e,s,s,i,o,n,I,n,d,e,x);
1754 const XMLCh Status::LOCAL_NAME[] = UNICODE_LITERAL_6(S,t,a,t,u,s);
1755 const XMLCh Status::TYPE_NAME[] = UNICODE_LITERAL_10(S,t,a,t,u,s,T,y,p,e);
1756 const XMLCh StatusCode::LOCAL_NAME[] = UNICODE_LITERAL_10(S,t,a,t,u,s,C,o,d,e);
1757 const XMLCh StatusCode::TYPE_NAME[] = UNICODE_LITERAL_14(S,t,a,t,u,s,C,o,d,e,T,y,p,e);
1758 const XMLCh StatusCode::VALUE_ATTRIB_NAME[] = UNICODE_LITERAL_5(V,a,l,u,e);
1759 const XMLCh StatusDetail::LOCAL_NAME[] = UNICODE_LITERAL_12(S,t,a,t,u,s,D,e,t,a,i,l);
1760 const XMLCh StatusDetail::TYPE_NAME[] = UNICODE_LITERAL_16(S,t,a,t,u,s,D,e,t,a,i,l,T,y,p,e);
1761 const XMLCh StatusMessage::LOCAL_NAME[] = UNICODE_LITERAL_13(S,t,a,t,u,s,M,e,s,s,a,g,e);
1762 const XMLCh StatusResponseType::LOCAL_NAME[] = {chNull};
1763 const XMLCh StatusResponseType::TYPE_NAME[] = UNICODE_LITERAL_18(S,t,a,t,u,s,R,e,s,p,o,n,s,e,T,y,p,e);
1764 const XMLCh StatusResponseType::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
1765 const XMLCh StatusResponseType::INRESPONSETO_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,n,R,e,s,p,o,n,s,e,T,o);
1766 const XMLCh StatusResponseType::VER_ATTRIB_NAME[] = UNICODE_LITERAL_7(V,e,r,s,i,o,n);
1767 const XMLCh StatusResponseType::ISSUEINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,s,s,u,e,I,n,s,t,a,n,t);
1768 const XMLCh StatusResponseType::DESTINATION_ATTRIB_NAME[] = UNICODE_LITERAL_11(D,e,s,t,i,n,a,t,i,o,n);
1769 const XMLCh StatusResponseType::CONSENT_ATTRIB_NAME[] = UNICODE_LITERAL_7(C,o,n,s,e,n,t);
1770 const XMLCh SubjectQuery::LOCAL_NAME[] = UNICODE_LITERAL_12(S,u,b,j,e,c,t,Q,u,e,r,y);
1771 const XMLCh SubjectQuery::TYPE_NAME[] = UNICODE_LITERAL_24(S,u,b,j,e,c,t,Q,u,e,r,y,A,b,s,t,r,a,c,t,T,y,p,e);
1772 const XMLCh Terminate::LOCAL_NAME[] = UNICODE_LITERAL_9(T,e,r,m,i,n,a,t,e);
1773 const XMLCh Terminate::TYPE_NAME[] = UNICODE_LITERAL_13(T,e,r,m,i,n,a,t,e,T,y,p,e);
1774
1775 // Unicode literals: LogoutRequest element, Reason attribute
1776 const XMLCh LogoutRequest::REASON_USER[] = // urn:oasis:names:tc:SAML:2.0:logout:user
1777 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1778   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1779   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1780   chLatin_l, chLatin_o, chLatin_g, chLatin_o, chLatin_u, chLatin_t, chColon,
1781   chLatin_u, chLatin_s, chLatin_e, chLatin_r, chNull
1782 };
1783
1784 const XMLCh LogoutRequest::REASON_ADMIN[] = // urn:oasis:names:tc:SAML:2.0:logout:admin
1785 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1786   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1787   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1788   chLatin_l, chLatin_o, chLatin_g, chLatin_o, chLatin_u, chLatin_t, chColon,
1789   chLatin_a, chLatin_d, chLatin_m, chLatin_i, chLatin_n, chNull
1790 };
1791
1792
1793 const XMLCh LogoutRequest::REASON_GLOBAL_TIMEOUT[] = // urn:oasis:names:tc:SAML:2.0:logout:global-timeout
1794 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1795   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1796   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1797   chLatin_l, chLatin_o, chLatin_g, chLatin_o, chLatin_u, chLatin_t, chColon,
1798   chLatin_g, chLatin_l, chLatin_o, chLatin_b, chLatin_a, chLatin_l, 
1799     chDash, chLatin_t, chLatin_i, chLatin_m, chLatin_e, chLatin_o, chLatin_u, chLatin_t, chNull
1800 };
1801
1802
1803 const XMLCh LogoutRequest::REASON_SP_TIMEOUT[] = // urn:oasis:names:tc:SAML:2.0:logout:sp-timeout
1804 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1805   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1806   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1807   chLatin_l, chLatin_o, chLatin_g, chLatin_o, chLatin_u, chLatin_t, chColon,
1808   chLatin_s, chLatin_p, chDash, chLatin_t, chLatin_i, chLatin_m, chLatin_e, chLatin_o, chLatin_u, chLatin_t, chNull
1809 };
1810
1811
1812 // Unicode literals, StatusCode Value
1813 const XMLCh StatusCode::SUCCESS[] = //  urn:oasis:names:tc:SAML:2.0:status:Success 
1814 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1815   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1816   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1817   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1818   chLatin_S, chLatin_u, chLatin_c, chLatin_c, chLatin_e, chLatin_s, chLatin_s, chNull
1819 };
1820
1821 const XMLCh StatusCode::REQUESTER[] = //  urn:oasis:names:tc:SAML:2.0:status:Requester 
1822 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1823   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1824   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1825   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1826   chLatin_R, chLatin_e, chLatin_q, chLatin_u, chLatin_e, chLatin_s, chLatin_t, chLatin_e, chLatin_r, chNull
1827 };
1828
1829 const XMLCh StatusCode::RESPONDER[] = //  urn:oasis:names:tc:SAML:2.0:status:Responder 
1830 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1831   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1832   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1833   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1834   chLatin_R, chLatin_e, chLatin_s, chLatin_p, chLatin_o, chLatin_n, chLatin_d, chLatin_e, chLatin_r, chNull
1835 };
1836
1837 const XMLCh StatusCode::VERSION_MISMATCH[] = //  urn:oasis:names:tc:SAML:2.0:status:VersionMismatch 
1838 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1839   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1840   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1841   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1842   chLatin_V, chLatin_e, chLatin_r, chLatin_s, chLatin_i, chLatin_o, chLatin_n,
1843     chLatin_M, chLatin_i, chLatin_s, chLatin_m, chLatin_a, chLatin_t, chLatin_c, chLatin_h, chNull
1844 };
1845
1846 const XMLCh StatusCode::AUTHN_FAILED[] = //  urn:oasis:names:tc:SAML:2.0:status:AuthnFailed 
1847 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1848   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1849   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1850   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1851   chLatin_A, chLatin_u, chLatin_t, chLatin_h, chLatin_n,
1852     chLatin_F, chLatin_a, chLatin_i, chLatin_l, chLatin_e, chLatin_d, chNull
1853 };
1854
1855 const XMLCh StatusCode::INVALID_ATTR_NAME_OR_VALUE[] = //  urn:oasis:names:tc:SAML:2.0:status:InvalidAttrNameOrValue 
1856 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1857   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1858   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1859   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1860   chLatin_I, chLatin_n, chLatin_v, chLatin_a, chLatin_l, chLatin_i, chLatin_d, 
1861     chLatin_A, chLatin_t, chLatin_t, chLatin_r, chLatin_N, chLatin_a, chLatin_m, chLatin_e, 
1862     chLatin_O, chLatin_r, chLatin_V, chLatin_a, chLatin_l, chLatin_u, chLatin_e, chNull
1863 };
1864
1865 const XMLCh StatusCode::INVALID_NAMEID_POLICY[] = //  urn:oasis:names:tc:SAML:2.0:status:InvalidNameIDPolicy 
1866 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1867   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1868   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1869   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1870   chLatin_I, chLatin_n, chLatin_v, chLatin_a, chLatin_l, chLatin_i, chLatin_d, 
1871    chLatin_N, chLatin_a, chLatin_m, chLatin_e, chLatin_I, chLatin_D, 
1872    chLatin_P, chLatin_o, chLatin_l, chLatin_i, chLatin_c, chLatin_y, chNull
1873 };
1874
1875 const XMLCh StatusCode::NO_AUTHN_CONTEXT[] = //  urn:oasis:names:tc:SAML:2.0:status:NoAuthnContext 
1876 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1877   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1878   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1879   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1880   chLatin_N, chLatin_o, chLatin_A, chLatin_u, chLatin_t, chLatin_h, chLatin_n, 
1881   chLatin_C, chLatin_o, chLatin_n, chLatin_t, chLatin_e, chLatin_x, chLatin_t, chNull
1882 };
1883
1884 const XMLCh StatusCode::NO_AVAILABLE_IDP[] = //  urn:oasis:names:tc:SAML:2.0:status:NoAvailableIDP 
1885 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1886   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1887   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1888   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1889   chLatin_N, chLatin_o, chLatin_A, chLatin_v, chLatin_a, chLatin_i, chLatin_l, chLatin_a, chLatin_b, chLatin_l, chLatin_e, 
1890    chLatin_I, chLatin_D, chLatin_P, chNull
1891 };
1892
1893 const XMLCh StatusCode::NO_PASSIVE[] = //  urn:oasis:names:tc:SAML:2.0:status:NoPassive 
1894 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1895   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1896   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1897   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1898   chLatin_N, chLatin_o, chLatin_P, chLatin_a, chLatin_s, chLatin_s, chLatin_i, chLatin_v, chLatin_e, chNull
1899 };
1900
1901 const XMLCh StatusCode::NO_SUPPORTED_IDP[] = //  urn:oasis:names:tc:SAML:2.0:status:NoSupportedIDP 
1902 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1903   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1904   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1905   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1906   chLatin_N, chLatin_o, chLatin_S, chLatin_u, chLatin_p, chLatin_p, chLatin_o, chLatin_r, chLatin_t, chLatin_e, chLatin_d,
1907       chLatin_I, chLatin_D, chLatin_P, chNull
1908 };
1909
1910 const XMLCh StatusCode::PARTIAL_LOGOUT[] = //  urn:oasis:names:tc:SAML:2.0:status:PartialLogout 
1911 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1912   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1913   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1914   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1915   chLatin_P, chLatin_a, chLatin_r, chLatin_t, chLatin_i, chLatin_a, chLatin_l, 
1916     chLatin_L, chLatin_o, chLatin_g, chLatin_o, chLatin_u, chLatin_t, chNull
1917 };
1918
1919 const XMLCh StatusCode::PROXY_COUNT_EXCEEDED[] = //  urn:oasis:names:tc:SAML:2.0:status:ProxyCountExceeded 
1920 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1921   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1922   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1923   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1924   chLatin_P, chLatin_r, chLatin_o, chLatin_x, chLatin_y, chLatin_C, chLatin_o, chLatin_u, chLatin_n, chLatin_t, 
1925     chLatin_E, chLatin_x, chLatin_c, chLatin_e, chLatin_e, chLatin_d, chLatin_e, chLatin_d, chNull
1926 };
1927
1928 const XMLCh StatusCode::REQUEST_DENIED[] = //  urn:oasis:names:tc:SAML:2.0:status:RequestDenied 
1929 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1930   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1931   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1932   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1933   chLatin_R, chLatin_e, chLatin_q, chLatin_u, chLatin_e, chLatin_s, chLatin_t, 
1934     chLatin_D, chLatin_e, chLatin_n, chLatin_i, chLatin_e, chLatin_d, chNull
1935 };
1936
1937 const XMLCh StatusCode::REQUEST_UNSUPPORTED[] = //  urn:oasis:names:tc:SAML:2.0:status:RequestUnsupported 
1938 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1939   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1940   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1941   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1942   chLatin_R, chLatin_e, chLatin_q, chLatin_u, chLatin_e, chLatin_s, chLatin_t, 
1943     chLatin_U, chLatin_n, chLatin_s, chLatin_u, chLatin_p, chLatin_p, chLatin_o, chLatin_r, chLatin_t, chLatin_e, chLatin_d, chNull
1944 };
1945
1946 const XMLCh StatusCode::REQUEST_VERSION_DEPRECATED[] = //  urn:oasis:names:tc:SAML:2.0:status:RequestVersionDeprecated 
1947 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1948   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1949   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1950   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1951   chLatin_R, chLatin_e, chLatin_q, chLatin_u, chLatin_e, chLatin_s, chLatin_t, 
1952     chLatin_V, chLatin_e, chLatin_r, chLatin_s, chLatin_i, chLatin_o, chLatin_n, 
1953     chLatin_D, chLatin_e, chLatin_p, chLatin_r, chLatin_e, chLatin_c, chLatin_a, chLatin_t, chLatin_e, chLatin_d, chNull
1954 };
1955
1956 const XMLCh StatusCode::REQUEST_VERSION_TOO_HIGH[] = //  urn:oasis:names:tc:SAML:2.0:status:RequestVersionTooHigh 
1957 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1958   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1959   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1960   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1961   chLatin_R, chLatin_e, chLatin_q, chLatin_u, chLatin_e, chLatin_s, chLatin_t, 
1962   chLatin_V, chLatin_e, chLatin_r, chLatin_s, chLatin_i, chLatin_o, chLatin_n, 
1963   chLatin_T, chLatin_o, chLatin_o, chLatin_H, chLatin_i, chLatin_g, chLatin_h, chNull
1964 };
1965
1966 const XMLCh StatusCode::REQUEST_VERSION_TOO_LOW[] = //  urn:oasis:names:tc:SAML:2.0:status:RequestVersionTooLow 
1967 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1968   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1969   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1970   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1971   chLatin_R, chLatin_e, chLatin_q, chLatin_u, chLatin_e, chLatin_s, chLatin_t, 
1972     chLatin_V, chLatin_e, chLatin_r, chLatin_s, chLatin_i, chLatin_o, chLatin_n, 
1973     chLatin_T, chLatin_o, chLatin_o, chLatin_L, chLatin_o, chLatin_w, chNull
1974 };
1975
1976 const XMLCh StatusCode::RESOURCE_NOT_RECOGNIZED[] = //  urn:oasis:names:tc:SAML:2.0:status:ResourceNotRecognized 
1977 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1978   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1979   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1980   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1981   chLatin_R, chLatin_e, chLatin_s, chLatin_o, chLatin_u, chLatin_r, chLatin_c, chLatin_e, 
1982     chLatin_N, chLatin_o, chLatin_t, 
1983     chLatin_R, chLatin_e, chLatin_c, chLatin_o, chLatin_g, chLatin_n, chLatin_i, chLatin_z, chLatin_e, chLatin_d, chNull
1984 };
1985
1986 const XMLCh StatusCode::TOO_MANY_RESPONSES[] = //  urn:oasis:names:tc:SAML:2.0:status:TooManyResponses 
1987 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1988   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1989   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1990   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
1991   chLatin_T, chLatin_o, chLatin_o, chLatin_M, chLatin_a, chLatin_n, chLatin_y, 
1992     chLatin_R, chLatin_e, chLatin_s, chLatin_p, chLatin_o, chLatin_n, chLatin_s, chLatin_e, chLatin_s, chNull
1993 };
1994
1995 const XMLCh StatusCode::UNKNOWN_ATTR_PROFILE[] = //  urn:oasis:names:tc:SAML:2.0:status:UnknownAttrProfile 
1996 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
1997   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
1998   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
1999   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
2000   chLatin_U, chLatin_n, chLatin_k, chLatin_n, chLatin_o, chLatin_w, chLatin_n, 
2001     chLatin_A, chLatin_t, chLatin_t, chLatin_r, 
2002     chLatin_P, chLatin_r, chLatin_o, chLatin_f, chLatin_i, chLatin_l, chLatin_e, chNull
2003 };
2004
2005 const XMLCh StatusCode::UNKNOWN_PRINCIPAL[] = //  urn:oasis:names:tc:SAML:2.0:status:UnknownPrincipal 
2006 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
2007   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
2008   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
2009   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
2010   chLatin_U, chLatin_n, chLatin_k, chLatin_n, chLatin_o, chLatin_w, chLatin_n, 
2011     chLatin_P, chLatin_r, chLatin_i, chLatin_n, chLatin_c, chLatin_i, chLatin_p, chLatin_a, chLatin_l, chNull
2012 };
2013
2014 const XMLCh StatusCode::UNSUPPORTED_BINDING[] = //  urn:oasis:names:tc:SAML:2.0:status:UnsupportedBinding 
2015 { chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
2016   chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon, chLatin_t, chLatin_c, chColon,
2017   chLatin_S, chLatin_A, chLatin_M, chLatin_L, chColon, chDigit_2, chPeriod, chDigit_0, chColon,
2018   chLatin_s, chLatin_t, chLatin_a, chLatin_t, chLatin_u, chLatin_s, chColon,
2019   chLatin_U, chLatin_n, chLatin_s, chLatin_u, chLatin_p, chLatin_p, chLatin_o, chLatin_r, chLatin_t, chLatin_e, chLatin_d, 
2020     chLatin_B, chLatin_i, chLatin_n, chLatin_d, chLatin_i, chLatin_n, chLatin_g, chNull
2021 };
2022