2 * Copyright 2001-2010 Internet2
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
20 * Implementation classes for SAML 2.0 Metadata schema.
24 #include "exceptions.h"
25 #include "saml2/metadata/Metadata.h"
26 #include "signature/ContentReference.h"
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/KeyInfo.h>
35 #include <xmltooling/signature/Signature.h>
36 #include <xmltooling/util/DateTime.h>
37 #include <xmltooling/util/XMLHelper.h>
40 #include <xercesc/util/XMLUniDefs.hpp>
41 #include <xsec/framework/XSECDefs.hpp>
43 using namespace samlconstants;
44 using namespace opensaml::saml2md;
45 using namespace opensaml::saml2;
46 using namespace xmlencryption;
47 using namespace xmlsignature;
48 using namespace xmltooling;
50 using xmlconstants::XMLSIG_NS;
51 using xmlconstants::XML_BOOL_NULL;
53 #if defined (_MSC_VER)
54 #pragma warning( push )
55 #pragma warning( disable : 4250 4251 )
61 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AffiliateMember);
62 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AttributeProfile);
63 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Company);
64 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,EmailAddress);
65 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,GivenName);
66 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,NameIDFormat);
67 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,SurName);
68 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,TelephoneNumber);
70 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,ActionNamespace);
71 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,SourceID);
73 class SAML_DLLLOCAL localizedNameTypeImpl : public virtual localizedNameType,
74 public AbstractSimpleElement,
75 public AbstractDOMCachingXMLObject,
76 public AbstractXMLObjectMarshaller,
77 public AbstractXMLObjectUnmarshaller
85 localizedNameTypeImpl() {
90 virtual ~localizedNameTypeImpl() {
91 XMLString::release(&m_Lang);
92 XMLString::release(&m_LangPrefix);
95 localizedNameTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
96 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
100 localizedNameTypeImpl(const localizedNameTypeImpl& src)
101 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
103 setLang(src.getLang());
104 if (src.m_LangPrefix)
105 m_LangPrefix = XMLString::replicate(src.m_LangPrefix);
108 IMPL_XMLOBJECT_CLONE(localizedNameType);
109 IMPL_XMLOBJECT_FOREIGN_ATTRIB(Lang,XMLCh);
112 void marshallAttributes(DOMElement* domElement) const {
113 if (m_Lang && *m_Lang) {
114 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(xmlconstants::XML_NS,LANG_ATTRIB_NAME);
115 if (m_LangPrefix && *m_LangPrefix)
116 attr->setPrefix(m_LangPrefix);
117 attr->setNodeValue(m_Lang);
118 domElement->setAttributeNodeNS(attr);
122 void processAttribute(const DOMAttr* attribute) {
123 if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
124 setLang(attribute->getValue());
125 const XMLCh* temp = attribute->getPrefix();
126 if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
127 m_LangPrefix = XMLString::replicate(temp);
130 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
134 class SAML_DLLLOCAL localizedURITypeImpl : public virtual localizedURIType,
135 public AbstractSimpleElement,
136 public AbstractDOMCachingXMLObject,
137 public AbstractXMLObjectMarshaller,
138 public AbstractXMLObjectUnmarshaller
142 m_LangPrefix=nullptr;
146 localizedURITypeImpl() {
151 virtual ~localizedURITypeImpl() {
152 XMLString::release(&m_Lang);
153 XMLString::release(&m_LangPrefix);
156 localizedURITypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
157 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
161 localizedURITypeImpl(const localizedURITypeImpl& src)
162 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
164 setLang(src.getLang());
165 if (src.m_LangPrefix)
166 m_LangPrefix = XMLString::replicate(src.m_LangPrefix);
169 IMPL_XMLOBJECT_CLONE(localizedURIType);
170 IMPL_XMLOBJECT_FOREIGN_ATTRIB(Lang,XMLCh);
173 void marshallAttributes(DOMElement* domElement) const {
174 if (m_Lang && *m_Lang) {
175 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(xmlconstants::XML_NS,LANG_ATTRIB_NAME);
176 if (m_LangPrefix && *m_LangPrefix)
177 attr->setPrefix(m_LangPrefix);
178 attr->setNodeValue(m_Lang);
179 domElement->setAttributeNodeNS(attr);
183 void processAttribute(const DOMAttr* attribute) {
184 if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
185 setLang(attribute->getValue());
186 const XMLCh* temp = attribute->getPrefix();
187 if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
188 m_LangPrefix = XMLString::replicate(temp);
191 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
195 class SAML_DLLLOCAL OrganizationNameImpl : public virtual OrganizationName, public localizedNameTypeImpl
198 virtual ~OrganizationNameImpl() {}
200 OrganizationNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
201 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
203 OrganizationNameImpl(const OrganizationNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
205 IMPL_XMLOBJECT_CLONE(OrganizationName);
206 localizedNameType* clonelocalizedNameType() const {
207 return new OrganizationNameImpl(*this);
211 class SAML_DLLLOCAL OrganizationDisplayNameImpl : public virtual OrganizationDisplayName, public localizedNameTypeImpl
214 virtual ~OrganizationDisplayNameImpl() {}
216 OrganizationDisplayNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
217 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
219 OrganizationDisplayNameImpl(const OrganizationDisplayNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
221 IMPL_XMLOBJECT_CLONE(OrganizationDisplayName);
222 localizedNameType* clonelocalizedNameType() const {
223 return new OrganizationDisplayNameImpl(*this);
227 class SAML_DLLLOCAL OrganizationURLImpl : public virtual OrganizationURL, public localizedURITypeImpl
230 virtual ~OrganizationURLImpl() {}
232 OrganizationURLImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
233 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
235 OrganizationURLImpl(const OrganizationURLImpl& src) : AbstractXMLObject(src), localizedURITypeImpl(src) {}
237 IMPL_XMLOBJECT_CLONE(OrganizationURL);
238 localizedURIType* clonelocalizedURIType() const {
239 return new OrganizationURLImpl(*this);
243 class SAML_DLLLOCAL ServiceNameImpl : public virtual ServiceName, public localizedNameTypeImpl
246 virtual ~ServiceNameImpl() {}
248 ServiceNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
249 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
251 ServiceNameImpl(const ServiceNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
253 IMPL_XMLOBJECT_CLONE(ServiceName);
254 localizedNameType* clonelocalizedNameType() const {
255 return new ServiceNameImpl(*this);
259 class SAML_DLLLOCAL ServiceDescriptionImpl : public virtual ServiceDescription, public localizedNameTypeImpl
262 virtual ~ServiceDescriptionImpl() {}
264 ServiceDescriptionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
265 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
267 ServiceDescriptionImpl(const ServiceDescriptionImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
269 IMPL_XMLOBJECT_CLONE(ServiceDescription);
270 localizedNameType* clonelocalizedNameType() const {
271 return new ServiceDescriptionImpl(*this);
275 class SAML_DLLLOCAL ExtensionsImpl : public virtual Extensions,
276 public AbstractComplexElement,
277 public AbstractDOMCachingXMLObject,
278 public AbstractXMLObjectMarshaller,
279 public AbstractXMLObjectUnmarshaller
282 virtual ~ExtensionsImpl() {}
284 ExtensionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
285 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
288 ExtensionsImpl(const ExtensionsImpl& src)
289 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
290 VectorOf(XMLObject) v=getUnknownXMLObjects();
291 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
292 v.push_back((*i)->clone());
295 IMPL_XMLOBJECT_CLONE(Extensions);
296 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
299 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
301 const XMLCh* nsURI=root->getNamespaceURI();
302 if (!XMLString::equals(nsURI,SAML20MD_NS) && nsURI && *nsURI) {
303 getUnknownXMLObjects().push_back(childXMLObject);
307 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
311 class SAML_DLLLOCAL OrganizationImpl : public virtual Organization,
312 public AbstractComplexElement,
313 public AbstractAttributeExtensibleXMLObject,
314 public AbstractDOMCachingXMLObject,
315 public AbstractXMLObjectMarshaller,
316 public AbstractXMLObjectUnmarshaller
318 list<XMLObject*>::iterator m_pos_OrganizationDisplayName;
319 list<XMLObject*>::iterator m_pos_OrganizationURL;
322 m_children.push_back(nullptr);
323 m_children.push_back(nullptr);
324 m_children.push_back(nullptr);
325 m_Extensions=nullptr;
326 m_pos_Extensions=m_children.begin();
327 m_pos_OrganizationDisplayName=m_pos_Extensions;
328 ++m_pos_OrganizationDisplayName;
329 m_pos_OrganizationURL=m_pos_OrganizationDisplayName;
330 ++m_pos_OrganizationURL;
333 virtual ~OrganizationImpl() {}
335 OrganizationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
336 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
340 OrganizationImpl(const OrganizationImpl& src)
341 : AbstractXMLObject(src), AbstractComplexElement(src),
342 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
344 if (src.getExtensions())
345 setExtensions(src.getExtensions()->cloneExtensions());
346 VectorOf(OrganizationName) v=getOrganizationNames();
347 for (vector<OrganizationName*>::const_iterator i=src.m_OrganizationNames.begin(); i!=src.m_OrganizationNames.end(); i++) {
349 v.push_back((*i)->cloneOrganizationName());
352 VectorOf(OrganizationDisplayName) w=getOrganizationDisplayNames();
353 for (vector<OrganizationDisplayName*>::const_iterator j=src.m_OrganizationDisplayNames.begin(); j!=src.m_OrganizationDisplayNames.end(); j++) {
355 w.push_back((*j)->cloneOrganizationDisplayName());
358 VectorOf(OrganizationURL) x=getOrganizationURLs();
359 for (vector<OrganizationURL*>::const_iterator k=src.m_OrganizationURLs.begin(); k!=src.m_OrganizationURLs.end(); k++) {
361 x.push_back((*k)->cloneOrganizationURL());
366 IMPL_XMLOBJECT_CLONE(Organization);
367 IMPL_TYPED_CHILD(Extensions);
368 IMPL_TYPED_CHILDREN(OrganizationName,m_pos_OrganizationDisplayName);
369 IMPL_TYPED_CHILDREN(OrganizationDisplayName,m_pos_OrganizationURL);
370 IMPL_TYPED_CHILDREN(OrganizationURL,m_children.end());
373 void marshallAttributes(DOMElement* domElement) const {
374 marshallExtensionAttributes(domElement);
377 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
378 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
379 PROC_TYPED_CHILDREN(OrganizationName,SAML20MD_NS,false);
380 PROC_TYPED_CHILDREN(OrganizationDisplayName,SAML20MD_NS,false);
381 PROC_TYPED_CHILDREN(OrganizationURL,SAML20MD_NS,false);
382 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
385 void processAttribute(const DOMAttr* attribute) {
386 unmarshallExtensionAttribute(attribute);
390 class SAML_DLLLOCAL ContactPersonImpl : public virtual ContactPerson,
391 public AbstractComplexElement,
392 public AbstractAttributeExtensibleXMLObject,
393 public AbstractDOMCachingXMLObject,
394 public AbstractXMLObjectMarshaller,
395 public AbstractXMLObjectUnmarshaller
397 list<XMLObject*>::iterator m_pos_TelephoneNumber;
400 m_ContactType=nullptr;
401 m_children.push_back(nullptr);
402 m_children.push_back(nullptr);
403 m_children.push_back(nullptr);
404 m_children.push_back(nullptr);
405 m_children.push_back(nullptr);
406 m_Extensions=nullptr;
410 m_pos_Extensions=m_children.begin();
411 m_pos_Company=m_pos_Extensions;
413 m_pos_GivenName=m_pos_Company;
415 m_pos_SurName=m_pos_GivenName;
417 m_pos_TelephoneNumber=m_pos_SurName;
418 ++m_pos_TelephoneNumber;
421 virtual ~ContactPersonImpl() {
422 XMLString::release(&m_ContactType);
425 ContactPersonImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
426 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
430 ContactPersonImpl(const ContactPersonImpl& src)
431 : AbstractXMLObject(src), AbstractComplexElement(src),
432 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
434 if (src.getExtensions())
435 setExtensions(src.getExtensions()->cloneExtensions());
436 if (src.getCompany())
437 setCompany(src.getCompany()->cloneCompany());
438 if (src.getGivenName())
439 setGivenName(src.getGivenName()->cloneGivenName());
440 if (src.getSurName())
441 setSurName(src.getSurName()->cloneSurName());
443 VectorOf(EmailAddress) v=getEmailAddresss();
444 for (vector<EmailAddress*>::const_iterator i=src.m_EmailAddresss.begin(); i!=src.m_EmailAddresss.end(); i++) {
446 v.push_back((*i)->cloneEmailAddress());
449 VectorOf(TelephoneNumber) w=getTelephoneNumbers();
450 for (vector<TelephoneNumber*>::const_iterator j=src.m_TelephoneNumbers.begin(); j!=src.m_TelephoneNumbers.end(); j++) {
452 w.push_back((*j)->cloneTelephoneNumber());
457 IMPL_XMLOBJECT_CLONE(ContactPerson);
458 IMPL_STRING_ATTRIB(ContactType);
459 IMPL_TYPED_CHILD(Extensions);
460 IMPL_TYPED_CHILD(Company);
461 IMPL_TYPED_CHILD(GivenName);
462 IMPL_TYPED_CHILD(SurName);
463 IMPL_TYPED_CHILDREN(EmailAddress,m_pos_TelephoneNumber);
464 IMPL_TYPED_CHILDREN(TelephoneNumber,m_children.end());
466 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
467 if (!qualifiedName.hasNamespaceURI()) {
468 if (XMLString::equals(qualifiedName.getLocalPart(),CONTACTTYPE_ATTRIB_NAME)) {
469 setContactType(value);
473 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
477 void marshallAttributes(DOMElement* domElement) const {
478 MARSHALL_STRING_ATTRIB(ContactType,CONTACTTYPE,nullptr);
479 marshallExtensionAttributes(domElement);
482 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
483 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
484 PROC_TYPED_CHILD(Company,SAML20MD_NS,false);
485 PROC_TYPED_CHILD(GivenName,SAML20MD_NS,false);
486 PROC_TYPED_CHILD(SurName,SAML20MD_NS,false);
487 PROC_TYPED_CHILDREN(EmailAddress,SAML20MD_NS,false);
488 PROC_TYPED_CHILDREN(TelephoneNumber,SAML20MD_NS,false);
489 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
492 void processAttribute(const DOMAttr* attribute) {
493 unmarshallExtensionAttribute(attribute);
497 class SAML_DLLLOCAL AdditionalMetadataLocationImpl : public virtual AdditionalMetadataLocation,
498 public AbstractSimpleElement,
499 public AbstractDOMCachingXMLObject,
500 public AbstractXMLObjectMarshaller,
501 public AbstractXMLObjectUnmarshaller
508 virtual ~AdditionalMetadataLocationImpl() {
509 XMLString::release(&m_Namespace);
512 AdditionalMetadataLocationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
513 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
517 AdditionalMetadataLocationImpl(const AdditionalMetadataLocationImpl& src)
518 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
522 IMPL_XMLOBJECT_CLONE(AdditionalMetadataLocation);
523 IMPL_STRING_ATTRIB(Namespace);
526 void marshallAttributes(DOMElement* domElement) const {
527 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,nullptr);
530 void processAttribute(const DOMAttr* attribute) {
531 PROC_STRING_ATTRIB(Namespace,NAMESPACE,nullptr);
532 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
536 class SAML_DLLLOCAL KeyDescriptorImpl : public virtual KeyDescriptor,
537 public AbstractComplexElement,
538 public AbstractDOMCachingXMLObject,
539 public AbstractXMLObjectMarshaller,
540 public AbstractXMLObjectUnmarshaller
545 m_children.push_back(nullptr);
546 m_pos_KeyInfo=m_children.begin();
549 virtual ~KeyDescriptorImpl() {
550 XMLString::release(&m_Use);
553 KeyDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
554 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
558 KeyDescriptorImpl(const KeyDescriptorImpl& src)
559 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
561 setUse(src.getUse());
562 if (src.getKeyInfo())
563 setKeyInfo(src.getKeyInfo()->cloneKeyInfo());
564 VectorOf(EncryptionMethod) v=getEncryptionMethods();
565 for (vector<EncryptionMethod*>::const_iterator i=src.m_EncryptionMethods.begin(); i!=src.m_EncryptionMethods.end(); i++) {
567 v.push_back((*i)->cloneEncryptionMethod());
572 IMPL_XMLOBJECT_CLONE(KeyDescriptor);
573 IMPL_STRING_ATTRIB(Use);
574 IMPL_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature);
575 IMPL_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,m_children.end());
578 void marshallAttributes(DOMElement* domElement) const {
579 MARSHALL_STRING_ATTRIB(Use,USE,nullptr);
582 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
583 PROC_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature,XMLSIG_NS,false);
584 PROC_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,SAML20MD_NS,false);
585 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
588 void processAttribute(const DOMAttr* attribute) {
589 PROC_STRING_ATTRIB(Use,USE,nullptr);
590 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
594 class SAML_DLLLOCAL EndpointTypeImpl : public virtual EndpointType,
595 public AbstractAttributeExtensibleXMLObject,
596 public AbstractComplexElement,
597 public AbstractDOMCachingXMLObject,
598 public AbstractXMLObjectMarshaller,
599 public AbstractXMLObjectUnmarshaller
602 m_Binding=m_Location=m_ResponseLocation=nullptr;
611 virtual ~EndpointTypeImpl() {
612 XMLString::release(&m_Binding);
613 XMLString::release(&m_Location);
614 XMLString::release(&m_ResponseLocation);
617 EndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
618 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
621 EndpointTypeImpl(const EndpointTypeImpl& src)
622 : AbstractXMLObject(src),
623 AbstractAttributeExtensibleXMLObject(src),
624 AbstractComplexElement(src),
625 AbstractDOMCachingXMLObject(src) {
626 setBinding(src.getBinding());
627 setLocation(src.getLocation());
628 setResponseLocation(src.getResponseLocation());
629 VectorOf(XMLObject) v=getUnknownXMLObjects();
630 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
631 v.push_back((*i)->clone());
634 IMPL_XMLOBJECT_CLONE(EndpointType);
635 IMPL_STRING_ATTRIB(Binding);
636 IMPL_STRING_ATTRIB(Location);
637 IMPL_STRING_ATTRIB(ResponseLocation);
638 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
640 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
641 if (!qualifiedName.hasNamespaceURI()) {
642 if (XMLString::equals(qualifiedName.getLocalPart(),BINDING_ATTRIB_NAME)) {
646 else if (XMLString::equals(qualifiedName.getLocalPart(),LOCATION_ATTRIB_NAME)) {
650 else if (XMLString::equals(qualifiedName.getLocalPart(),RESPONSELOCATION_ATTRIB_NAME)) {
651 setResponseLocation(value);
655 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
658 void marshallAttributes(DOMElement* domElement) const {
659 MARSHALL_STRING_ATTRIB(Binding,BINDING,nullptr);
660 MARSHALL_STRING_ATTRIB(Location,LOCATION,nullptr);
661 MARSHALL_STRING_ATTRIB(ResponseLocation,RESPONSELOCATION,nullptr);
662 marshallExtensionAttributes(domElement);
665 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
667 const XMLCh* nsURI=root->getNamespaceURI();
668 if (!XMLString::equals(nsURI,SAML20MD_NS) && nsURI && *nsURI) {
669 getUnknownXMLObjects().push_back(childXMLObject);
672 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
675 void processAttribute(const DOMAttr* attribute) {
676 unmarshallExtensionAttribute(attribute);
680 class SAML_DLLLOCAL IndexedEndpointTypeImpl : public virtual IndexedEndpointType, public EndpointTypeImpl
684 m_isDefault=XML_BOOL_NULL;
688 IndexedEndpointTypeImpl() {
692 virtual ~IndexedEndpointTypeImpl() {
693 XMLString::release(&m_Index);
696 IndexedEndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
697 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
699 IndexedEndpointTypeImpl(const IndexedEndpointTypeImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {
700 setIndex(src.m_Index);
701 isDefault(src.m_isDefault);
704 IMPL_XMLOBJECT_CLONE(IndexedEndpointType);
705 EndpointType* cloneEndpointType() const {
706 return new IndexedEndpointTypeImpl(*this);
709 IMPL_INTEGER_ATTRIB(Index);
710 IMPL_BOOLEAN_ATTRIB(isDefault);
712 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
713 if (!qualifiedName.hasNamespaceURI()) {
714 if (XMLString::equals(qualifiedName.getLocalPart(),INDEX_ATTRIB_NAME)) {
718 else if (XMLString::equals(qualifiedName.getLocalPart(),ISDEFAULT_ATTRIB_NAME)) {
723 EndpointTypeImpl::setAttribute(qualifiedName, value, ID);
727 void marshallAttributes(DOMElement* domElement) const {
728 MARSHALL_INTEGER_ATTRIB(Index,INDEX,nullptr);
729 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,nullptr);
730 EndpointTypeImpl::marshallAttributes(domElement);
734 class SAML_DLLLOCAL ArtifactResolutionServiceImpl : public virtual ArtifactResolutionService, public IndexedEndpointTypeImpl
737 virtual ~ArtifactResolutionServiceImpl() {}
739 ArtifactResolutionServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
740 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
742 ArtifactResolutionServiceImpl(const ArtifactResolutionServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
744 IMPL_XMLOBJECT_CLONE(ArtifactResolutionService);
745 IndexedEndpointType* cloneIndexedEndpointType() const {
746 return new ArtifactResolutionServiceImpl(*this);
748 EndpointType* cloneEndpointType() const {
749 return new ArtifactResolutionServiceImpl(*this);
753 class SAML_DLLLOCAL SingleLogoutServiceImpl : public virtual SingleLogoutService, public EndpointTypeImpl
756 virtual ~SingleLogoutServiceImpl() {}
758 SingleLogoutServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
759 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
761 SingleLogoutServiceImpl(const SingleLogoutServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
763 IMPL_XMLOBJECT_CLONE(SingleLogoutService);
764 EndpointType* cloneEndpointType() const {
765 return new SingleLogoutServiceImpl(*this);
769 class SAML_DLLLOCAL ManageNameIDServiceImpl : public virtual ManageNameIDService, public EndpointTypeImpl
772 virtual ~ManageNameIDServiceImpl() {}
774 ManageNameIDServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
775 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
777 ManageNameIDServiceImpl(const ManageNameIDServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
779 IMPL_XMLOBJECT_CLONE(ManageNameIDService);
780 EndpointType* cloneEndpointType() const {
781 return new ManageNameIDServiceImpl(*this);
785 class SAML_DLLLOCAL SingleSignOnServiceImpl : public virtual SingleSignOnService, public EndpointTypeImpl
788 virtual ~SingleSignOnServiceImpl() {}
790 SingleSignOnServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
791 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
793 SingleSignOnServiceImpl(const SingleSignOnServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
795 IMPL_XMLOBJECT_CLONE(SingleSignOnService);
796 EndpointType* cloneEndpointType() const {
797 return new SingleSignOnServiceImpl(*this);
801 class SAML_DLLLOCAL NameIDMappingServiceImpl : public virtual NameIDMappingService, public EndpointTypeImpl
804 virtual ~NameIDMappingServiceImpl() {}
806 NameIDMappingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
807 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
809 NameIDMappingServiceImpl(const NameIDMappingServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
811 IMPL_XMLOBJECT_CLONE(NameIDMappingService);
812 EndpointType* cloneEndpointType() const {
813 return new NameIDMappingServiceImpl(*this);
817 class SAML_DLLLOCAL AssertionIDRequestServiceImpl : public virtual AssertionIDRequestService, public EndpointTypeImpl
820 virtual ~AssertionIDRequestServiceImpl() {}
822 AssertionIDRequestServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
823 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
825 AssertionIDRequestServiceImpl(const AssertionIDRequestServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
827 IMPL_XMLOBJECT_CLONE(AssertionIDRequestService);
828 EndpointType* cloneEndpointType() const {
829 return new AssertionIDRequestServiceImpl(*this);
833 class SAML_DLLLOCAL AssertionConsumerServiceImpl : public virtual AssertionConsumerService, public IndexedEndpointTypeImpl
836 virtual ~AssertionConsumerServiceImpl() {}
838 AssertionConsumerServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
839 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
841 AssertionConsumerServiceImpl(const AssertionConsumerServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
843 IMPL_XMLOBJECT_CLONE(AssertionConsumerService);
844 EndpointType* cloneEndpointType() const {
845 return new AssertionConsumerServiceImpl(*this);
847 IndexedEndpointType* cloneIndexedEndpointType() const {
848 return new AssertionConsumerServiceImpl(*this);
852 class SAML_DLLLOCAL AuthnQueryServiceImpl : public virtual AuthnQueryService, public EndpointTypeImpl
855 virtual ~AuthnQueryServiceImpl() {}
857 AuthnQueryServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
858 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
860 AuthnQueryServiceImpl(const AuthnQueryServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
862 IMPL_XMLOBJECT_CLONE(AuthnQueryService);
863 EndpointType* cloneEndpointType() const {
864 return new AuthnQueryServiceImpl(*this);
868 class SAML_DLLLOCAL AuthzServiceImpl : public virtual AuthzService, public EndpointTypeImpl
871 virtual ~AuthzServiceImpl() {}
873 AuthzServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
874 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
876 AuthzServiceImpl(const AuthzServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
878 IMPL_XMLOBJECT_CLONE(AuthzService);
879 EndpointType* cloneEndpointType() const {
880 return new AuthzServiceImpl(*this);
884 class SAML_DLLLOCAL AttributeServiceImpl : public virtual AttributeService, public EndpointTypeImpl
887 virtual ~AttributeServiceImpl() {}
889 AttributeServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
890 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
892 AttributeServiceImpl(const AttributeServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
894 IMPL_XMLOBJECT_CLONE(AttributeService);
895 EndpointType* cloneEndpointType() const {
896 return new AttributeServiceImpl(*this);
900 class SAML_DLLLOCAL RoleDescriptorImpl : public virtual RoleDescriptor,
901 public virtual SignableObject,
902 public AbstractComplexElement,
903 public AbstractAttributeExtensibleXMLObject,
904 public AbstractDOMCachingXMLObject,
905 public AbstractXMLObjectMarshaller,
906 public AbstractXMLObjectUnmarshaller
909 m_ID=m_ProtocolSupportEnumeration=m_ErrorURL=nullptr;
910 m_ValidUntil=m_CacheDuration=nullptr;
911 m_children.push_back(nullptr);
912 m_children.push_back(nullptr);
913 m_children.push_back(nullptr);
914 m_children.push_back(nullptr);
916 m_Extensions=nullptr;
917 m_Organization=nullptr;
918 m_pos_Signature=m_children.begin();
919 m_pos_Extensions=m_pos_Signature;
921 m_pos_Organization=m_pos_Extensions;
922 ++m_pos_Organization;
923 m_pos_ContactPerson=m_pos_Organization;
924 ++m_pos_ContactPerson;
928 list<XMLObject*>::iterator m_pos_ContactPerson;
930 RoleDescriptorImpl() {
935 virtual ~RoleDescriptorImpl() {
936 XMLString::release(&m_ID);
937 XMLString::release(&m_ProtocolSupportEnumeration);
938 XMLString::release(&m_ErrorURL);
940 delete m_CacheDuration;
943 RoleDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
944 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
948 RoleDescriptorImpl(const RoleDescriptorImpl& src)
949 : AbstractXMLObject(src), AbstractComplexElement(src),
950 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
953 setProtocolSupportEnumeration(src.getProtocolSupportEnumeration());
954 setErrorURL(src.getErrorURL());
955 setValidUntil(src.getValidUntil());
956 setCacheDuration(src.getCacheDuration());
957 if (src.getSignature())
958 setSignature(src.getSignature()->cloneSignature());
959 if (src.getExtensions())
960 setExtensions(src.getExtensions()->cloneExtensions());
961 if (src.getOrganization())
962 setOrganization(src.getOrganization()->cloneOrganization());
964 VectorOf(KeyDescriptor) v=getKeyDescriptors();
965 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
967 v.push_back((*i)->cloneKeyDescriptor());
970 VectorOf(ContactPerson) w=getContactPersons();
971 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
973 w.push_back((*j)->cloneContactPerson());
978 //IMPL_TYPED_CHILD(Signature);
979 // Need customized setter.
981 Signature* m_Signature;
982 list<XMLObject*>::iterator m_pos_Signature;
984 Signature* getSignature() const {
988 void setSignature(Signature* sig) {
989 prepareForAssignment(m_Signature,sig);
990 *m_pos_Signature=m_Signature=sig;
991 // Sync content reference back up.
993 m_Signature->setContentReference(new opensaml::ContentReference(*this));
996 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
997 IMPL_STRING_ATTRIB(ProtocolSupportEnumeration);
998 IMPL_STRING_ATTRIB(ErrorURL);
999 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
1000 IMPL_DURATION_ATTRIB(CacheDuration,0);
1001 IMPL_TYPED_CHILD(Extensions);
1002 IMPL_TYPED_CHILDREN(KeyDescriptor,m_pos_Organization);
1003 IMPL_TYPED_CHILD(Organization);
1004 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
1006 bool hasSupport(const XMLCh* protocol) const {
1007 if (!protocol || !*protocol)
1009 if (m_ProtocolSupportEnumeration) {
1010 // Look for first character.
1011 xsecsize_t len=XMLString::stringLen(protocol);
1013 int index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
1015 // Only possible match is if it's the first character or a space comes before it.
1016 if (index==0 || m_ProtocolSupportEnumeration[index-1]==chSpace) {
1017 // See if rest of protocol string is present.
1018 if (0==XMLString::compareNString(m_ProtocolSupportEnumeration+index+1,protocol+1,len-1)) {
1019 // Only possible match is if it's the last character or a space comes after it.
1020 if (m_ProtocolSupportEnumeration[index+len]==chNull || m_ProtocolSupportEnumeration[index+len]==chSpace)
1026 // Move past last search and start again.
1031 // Move past last search and start again.
1034 index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
1040 void addSupport(const XMLCh* protocol) {
1041 if (hasSupport(protocol))
1043 if (m_ProtocolSupportEnumeration && *m_ProtocolSupportEnumeration) {
1044 #ifdef HAVE_GOOD_STL
1045 xstring pse(m_ProtocolSupportEnumeration);
1046 pse = pse + chSpace + protocol;
1047 setProtocolSupportEnumeration(pse.c_str());
1049 auto_ptr_char temp(m_ProtocolSupportEnumeration);
1050 auto_ptr_char temp2(protocol);
1051 string pse(temp.get());
1052 pse = pse + ' ' + temp2.get();
1053 auto_ptr_XMLCh temp3(pse.c_str());
1054 setProtocolSupportEnumeration(temp3.get());
1058 setProtocolSupportEnumeration(protocol);
1062 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1063 if (!qualifiedName.hasNamespaceURI()) {
1064 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
1068 else if (XMLString::equals(qualifiedName.getLocalPart(),PROTOCOLSUPPORTENUMERATION_ATTRIB_NAME)) {
1069 setProtocolSupportEnumeration(value);
1072 else if (XMLString::equals(qualifiedName.getLocalPart(),ERRORURL_ATTRIB_NAME)) {
1076 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
1077 setValidUntil(value);
1080 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
1081 setCacheDuration(value);
1085 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1089 void marshallAttributes(DOMElement* domElement) const {
1090 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
1091 MARSHALL_STRING_ATTRIB(ProtocolSupportEnumeration,PROTOCOLSUPPORTENUMERATION,nullptr);
1092 MARSHALL_STRING_ATTRIB(ErrorURL,ERRORURL,nullptr);
1093 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
1094 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
1095 marshallExtensionAttributes(domElement);
1098 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1099 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
1100 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
1101 PROC_TYPED_CHILDREN(KeyDescriptor,SAML20MD_NS,false);
1102 PROC_TYPED_CHILD(Organization,SAML20MD_NS,false);
1103 PROC_TYPED_CHILDREN(ContactPerson,SAML20MD_NS,false);
1104 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1107 void processAttribute(const DOMAttr* attribute) {
1108 PROC_ID_ATTRIB(ID,ID,nullptr);
1109 unmarshallExtensionAttribute(attribute);
1113 class SAML_DLLLOCAL RoleDescriptorTypeImpl : public virtual RoleDescriptorType, public RoleDescriptorImpl
1116 virtual ~RoleDescriptorTypeImpl() {}
1118 RoleDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1119 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1122 RoleDescriptorTypeImpl(const RoleDescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1123 VectorOf(XMLObject) v=getUnknownXMLObjects();
1124 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
1125 v.push_back((*i)->clone());
1128 IMPL_XMLOBJECT_CLONE(RoleDescriptorType);
1129 RoleDescriptor* cloneRoleDescriptor() const {
1130 return new RoleDescriptorTypeImpl(*this);
1133 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
1136 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1137 getUnknownXMLObjects().push_back(childXMLObject);
1141 class SAML_DLLLOCAL SSODescriptorTypeImpl : public virtual SSODescriptorType, public RoleDescriptorImpl
1144 m_children.push_back(nullptr);
1145 m_children.push_back(nullptr);
1146 m_children.push_back(nullptr);
1147 m_children.push_back(nullptr);
1148 m_pos_ArtifactResolutionService=m_pos_ContactPerson;
1149 ++m_pos_ArtifactResolutionService;
1150 m_pos_SingleLogoutService=m_pos_ArtifactResolutionService;
1151 ++m_pos_SingleLogoutService;
1152 m_pos_ManageNameIDService=m_pos_SingleLogoutService;
1153 ++m_pos_ManageNameIDService;
1154 m_pos_NameIDFormat=m_pos_ManageNameIDService;
1155 ++m_pos_NameIDFormat;
1159 list<XMLObject*>::iterator m_pos_ArtifactResolutionService;
1160 list<XMLObject*>::iterator m_pos_SingleLogoutService;
1161 list<XMLObject*>::iterator m_pos_ManageNameIDService;
1162 list<XMLObject*>::iterator m_pos_NameIDFormat;
1164 SSODescriptorTypeImpl() {
1169 virtual ~SSODescriptorTypeImpl() {}
1171 SSODescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1172 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1176 SSODescriptorTypeImpl(const SSODescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1178 VectorOf(ArtifactResolutionService) v=getArtifactResolutionServices();
1179 for (vector<ArtifactResolutionService*>::const_iterator i=src.m_ArtifactResolutionServices.begin(); i!=src.m_ArtifactResolutionServices.end(); i++) {
1181 v.push_back((*i)->cloneArtifactResolutionService());
1184 VectorOf(SingleLogoutService) w=getSingleLogoutServices();
1185 for (vector<SingleLogoutService*>::const_iterator j=src.m_SingleLogoutServices.begin(); j!=src.m_SingleLogoutServices.end(); j++) {
1187 w.push_back((*j)->cloneSingleLogoutService());
1190 VectorOf(ManageNameIDService) x=getManageNameIDServices();
1191 for (vector<ManageNameIDService*>::const_iterator k=src.m_ManageNameIDServices.begin(); k!=src.m_ManageNameIDServices.end(); k++) {
1193 x.push_back((*k)->cloneManageNameIDService());
1196 VectorOf(NameIDFormat) y=getNameIDFormats();
1197 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1199 y.push_back((*m)->cloneNameIDFormat());
1204 IMPL_TYPED_CHILDREN(ArtifactResolutionService,m_pos_ArtifactResolutionService);
1205 IMPL_TYPED_CHILDREN(SingleLogoutService,m_pos_SingleLogoutService);
1206 IMPL_TYPED_CHILDREN(ManageNameIDService,m_pos_ManageNameIDService);
1207 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1210 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1211 PROC_TYPED_CHILDREN(ArtifactResolutionService,SAML20MD_NS,false);
1212 PROC_TYPED_CHILDREN(SingleLogoutService,SAML20MD_NS,false);
1213 PROC_TYPED_CHILDREN(ManageNameIDService,SAML20MD_NS,false);
1214 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1215 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1219 class SAML_DLLLOCAL IDPSSODescriptorImpl : public virtual IDPSSODescriptor, public SSODescriptorTypeImpl
1221 list<XMLObject*>::iterator m_pos_SingleSignOnService;
1222 list<XMLObject*>::iterator m_pos_NameIDMappingService;
1223 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1224 list<XMLObject*>::iterator m_pos_AttributeProfile;
1227 m_WantAuthnRequestsSigned=XML_BOOL_NULL;
1228 m_children.push_back(nullptr);
1229 m_children.push_back(nullptr);
1230 m_children.push_back(nullptr);
1231 m_children.push_back(nullptr);
1232 m_pos_SingleSignOnService=m_pos_NameIDFormat;
1233 ++m_pos_SingleSignOnService;
1234 m_pos_NameIDMappingService=m_pos_SingleSignOnService;
1235 ++m_pos_NameIDMappingService;
1236 m_pos_AssertionIDRequestService=m_pos_NameIDMappingService;
1237 ++m_pos_AssertionIDRequestService;
1238 m_pos_AttributeProfile=m_pos_AssertionIDRequestService;
1239 ++m_pos_AttributeProfile;
1243 virtual ~IDPSSODescriptorImpl() {}
1245 IDPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1246 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1250 IDPSSODescriptorImpl(const IDPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1252 WantAuthnRequestsSigned(src.m_WantAuthnRequestsSigned);
1253 VectorOf(SingleSignOnService) v=getSingleSignOnServices();
1254 for (vector<SingleSignOnService*>::const_iterator i=src.m_SingleSignOnServices.begin(); i!=src.m_SingleSignOnServices.end(); i++) {
1256 v.push_back((*i)->cloneSingleSignOnService());
1259 VectorOf(NameIDMappingService) w=getNameIDMappingServices();
1260 for (vector<NameIDMappingService*>::const_iterator j=src.m_NameIDMappingServices.begin(); j!=src.m_NameIDMappingServices.end(); j++) {
1262 w.push_back((*j)->cloneNameIDMappingService());
1265 VectorOf(AssertionIDRequestService) x=getAssertionIDRequestServices();
1266 for (vector<AssertionIDRequestService*>::const_iterator k=src.m_AssertionIDRequestServices.begin(); k!=src.m_AssertionIDRequestServices.end(); k++) {
1268 x.push_back((*k)->cloneAssertionIDRequestService());
1271 VectorOf(AttributeProfile) y=getAttributeProfiles();
1272 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1274 y.push_back((*m)->cloneAttributeProfile());
1277 VectorOf(Attribute) z=getAttributes();
1278 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1280 z.push_back((*n)->cloneAttribute());
1285 IMPL_XMLOBJECT_CLONE(IDPSSODescriptor);
1286 SSODescriptorType* cloneSSODescriptorType() const {
1287 return new IDPSSODescriptorImpl(*this);
1289 RoleDescriptor* cloneRoleDescriptor() const {
1290 return new IDPSSODescriptorImpl(*this);
1293 IMPL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned);
1294 IMPL_TYPED_CHILDREN(SingleSignOnService,m_pos_SingleSignOnService);
1295 IMPL_TYPED_CHILDREN(NameIDMappingService,m_pos_NameIDMappingService);
1296 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1297 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1298 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1300 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1301 if (!qualifiedName.hasNamespaceURI()) {
1302 if (XMLString::equals(qualifiedName.getLocalPart(),WANTAUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1303 setWantAuthnRequestsSigned(value);
1307 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1311 void marshallAttributes(DOMElement* domElement) const {
1312 MARSHALL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned,WANTAUTHNREQUESTSSIGNED,nullptr);
1313 RoleDescriptorImpl::marshallAttributes(domElement);
1316 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1317 PROC_TYPED_CHILDREN(SingleSignOnService,SAML20MD_NS,false);
1318 PROC_TYPED_CHILDREN(NameIDMappingService,SAML20MD_NS,false);
1319 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1320 PROC_TYPED_CHILDREN(AttributeProfile,SAML20MD_NS,false);
1321 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
1322 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1326 class SAML_DLLLOCAL RequestedAttributeImpl : public virtual RequestedAttribute,
1327 public AbstractComplexElement,
1328 public AbstractAttributeExtensibleXMLObject,
1329 public AbstractDOMCachingXMLObject,
1330 public AbstractXMLObjectMarshaller,
1331 public AbstractXMLObjectUnmarshaller
1334 m_Name=m_NameFormat=m_FriendlyName=nullptr;
1335 m_isRequired=XML_BOOL_NULL;
1338 virtual ~RequestedAttributeImpl() {
1339 XMLString::release(&m_Name);
1340 XMLString::release(&m_NameFormat);
1341 XMLString::release(&m_FriendlyName);
1344 RequestedAttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1345 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1349 RequestedAttributeImpl(const RequestedAttributeImpl& src)
1350 : AbstractXMLObject(src), AbstractComplexElement(src),
1351 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1353 setName(src.getName());
1354 setNameFormat(src.getNameFormat());
1355 setFriendlyName(src.getFriendlyName());
1356 isRequired(src.m_isRequired);
1357 VectorOf(XMLObject) v=getAttributeValues();
1358 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
1360 v.push_back((*i)->clone());
1365 IMPL_XMLOBJECT_CLONE(RequestedAttribute);
1366 Attribute* cloneAttribute() const {
1367 return new RequestedAttributeImpl(*this);
1370 IMPL_STRING_ATTRIB(Name);
1371 IMPL_STRING_ATTRIB(NameFormat);
1372 IMPL_STRING_ATTRIB(FriendlyName);
1373 IMPL_BOOLEAN_ATTRIB(isRequired);
1374 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
1376 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1377 if (!qualifiedName.hasNamespaceURI()) {
1378 if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) {
1382 else if (XMLString::equals(qualifiedName.getLocalPart(),NAMEFORMAT_ATTRIB_NAME)) {
1383 setNameFormat(value);
1386 else if (XMLString::equals(qualifiedName.getLocalPart(),FRIENDLYNAME_ATTRIB_NAME)) {
1387 setFriendlyName(value);
1390 else if (XMLString::equals(qualifiedName.getLocalPart(),ISREQUIRED_ATTRIB_NAME)) {
1391 setisRequired(value);
1395 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1399 void marshallAttributes(DOMElement* domElement) const {
1400 MARSHALL_STRING_ATTRIB(Name,NAME,nullptr);
1401 MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,nullptr);
1402 MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,nullptr);
1403 MARSHALL_BOOLEAN_ATTRIB(isRequired,ISREQUIRED,nullptr);
1404 marshallExtensionAttributes(domElement);
1407 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1408 getAttributeValues().push_back(childXMLObject);
1411 void processAttribute(const DOMAttr* attribute) {
1412 unmarshallExtensionAttribute(attribute);
1416 class SAML_DLLLOCAL AttributeConsumingServiceImpl : public virtual AttributeConsumingService,
1417 public AbstractComplexElement,
1418 public AbstractDOMCachingXMLObject,
1419 public AbstractXMLObjectMarshaller,
1420 public AbstractXMLObjectUnmarshaller
1422 list<XMLObject*>::iterator m_pos_ServiceDescription;
1423 list<XMLObject*>::iterator m_pos_RequestedAttribute;
1427 m_isDefault=XML_BOOL_NULL;
1428 m_children.push_back(nullptr);
1429 m_children.push_back(nullptr);
1430 m_pos_ServiceDescription=m_children.begin();
1431 m_pos_RequestedAttribute=m_pos_ServiceDescription;
1432 ++m_pos_RequestedAttribute;
1436 virtual ~AttributeConsumingServiceImpl() {
1437 XMLString::release(&m_Index);
1440 AttributeConsumingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1441 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1445 AttributeConsumingServiceImpl(const AttributeConsumingServiceImpl& src)
1446 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1448 setIndex(src.m_Index);
1449 isDefault(src.m_isDefault);
1450 VectorOf(ServiceName) v=getServiceNames();
1451 for (vector<ServiceName*>::const_iterator i=src.m_ServiceNames.begin(); i!=src.m_ServiceNames.end(); i++) {
1453 v.push_back((*i)->cloneServiceName());
1456 VectorOf(ServiceDescription) w=getServiceDescriptions();
1457 for (vector<ServiceDescription*>::const_iterator j=src.m_ServiceDescriptions.begin(); j!=src.m_ServiceDescriptions.end(); j++) {
1459 w.push_back((*j)->cloneServiceDescription());
1462 VectorOf(RequestedAttribute) x=getRequestedAttributes();
1463 for (vector<RequestedAttribute*>::const_iterator k=src.m_RequestedAttributes.begin(); k!=src.m_RequestedAttributes.end(); k++) {
1465 x.push_back((*k)->cloneRequestedAttribute());
1470 IMPL_XMLOBJECT_CLONE(AttributeConsumingService);
1471 IMPL_INTEGER_ATTRIB(Index);
1472 IMPL_BOOLEAN_ATTRIB(isDefault);
1473 IMPL_TYPED_CHILDREN(ServiceName,m_pos_ServiceDescription);
1474 IMPL_TYPED_CHILDREN(ServiceDescription,m_pos_RequestedAttribute);
1475 IMPL_TYPED_CHILDREN(RequestedAttribute,m_children.end());
1478 void marshallAttributes(DOMElement* domElement) const {
1479 MARSHALL_INTEGER_ATTRIB(Index,INDEX,nullptr);
1480 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,nullptr);
1483 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1484 PROC_TYPED_CHILDREN(ServiceName,SAML20MD_NS,false);
1485 PROC_TYPED_CHILDREN(ServiceDescription,SAML20MD_NS,false);
1486 PROC_TYPED_CHILDREN(RequestedAttribute,SAML20MD_NS,false);
1487 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1490 void processAttribute(const DOMAttr* attribute) {
1491 PROC_INTEGER_ATTRIB(Index,INDEX,nullptr);
1492 PROC_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,nullptr);
1493 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1497 class SAML_DLLLOCAL SPSSODescriptorImpl : public virtual SPSSODescriptor, public SSODescriptorTypeImpl
1499 list<XMLObject*>::iterator m_pos_AssertionConsumerService;
1502 m_AuthnRequestsSigned=XML_BOOL_NULL;
1503 m_WantAssertionsSigned=XML_BOOL_NULL;
1504 m_children.push_back(nullptr);
1505 m_pos_AssertionConsumerService=m_pos_NameIDFormat;
1506 ++m_pos_AssertionConsumerService;
1510 virtual ~SPSSODescriptorImpl() {}
1512 SPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1513 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1517 SPSSODescriptorImpl(const SPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1519 AuthnRequestsSigned(src.m_AuthnRequestsSigned);
1520 WantAssertionsSigned(src.m_WantAssertionsSigned);
1521 VectorOf(AssertionConsumerService) v=getAssertionConsumerServices();
1522 for (vector<AssertionConsumerService*>::const_iterator i=src.m_AssertionConsumerServices.begin(); i!=src.m_AssertionConsumerServices.end(); i++) {
1524 v.push_back((*i)->cloneAssertionConsumerService());
1527 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1528 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1530 w.push_back((*j)->cloneAttributeConsumingService());
1535 IMPL_XMLOBJECT_CLONE(SPSSODescriptor);
1536 SSODescriptorType* cloneSSODescriptorType() const {
1537 return cloneSPSSODescriptor();
1539 RoleDescriptor* cloneRoleDescriptor() const {
1540 return cloneSPSSODescriptor();
1543 IMPL_BOOLEAN_ATTRIB(AuthnRequestsSigned);
1544 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1545 IMPL_TYPED_CHILDREN(AssertionConsumerService,m_pos_AssertionConsumerService);
1546 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1548 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1549 if (!qualifiedName.hasNamespaceURI()) {
1550 if (XMLString::equals(qualifiedName.getLocalPart(),AUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1551 setAuthnRequestsSigned(value);
1554 else if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1555 setWantAssertionsSigned(value);
1559 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1563 void marshallAttributes(DOMElement* domElement) const {
1564 MARSHALL_BOOLEAN_ATTRIB(AuthnRequestsSigned,AUTHNREQUESTSSIGNED,nullptr);
1565 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,nullptr);
1566 RoleDescriptorImpl::marshallAttributes(domElement);
1569 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1570 PROC_TYPED_CHILDREN(AssertionConsumerService,SAML20MD_NS,false);
1571 PROC_TYPED_CHILDREN(AttributeConsumingService,SAML20MD_NS,false);
1572 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1576 class SAML_DLLLOCAL AuthnAuthorityDescriptorImpl : public virtual AuthnAuthorityDescriptor, public RoleDescriptorImpl
1578 list<XMLObject*>::iterator m_pos_AuthnQueryService;
1579 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1582 m_children.push_back(nullptr);
1583 m_children.push_back(nullptr);
1584 m_pos_AuthnQueryService=m_pos_ContactPerson;
1585 ++m_pos_AuthnQueryService;
1586 m_pos_AssertionIDRequestService=m_pos_AuthnQueryService;
1587 ++m_pos_AssertionIDRequestService;
1591 virtual ~AuthnAuthorityDescriptorImpl() {}
1593 AuthnAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1594 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1598 AuthnAuthorityDescriptorImpl(const AuthnAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1600 VectorOf(AuthnQueryService) v=getAuthnQueryServices();
1601 for (vector<AuthnQueryService*>::const_iterator i=src.m_AuthnQueryServices.begin(); i!=src.m_AuthnQueryServices.end(); i++) {
1603 v.push_back((*i)->cloneAuthnQueryService());
1606 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1607 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1609 w.push_back((*j)->cloneAssertionIDRequestService());
1612 VectorOf(NameIDFormat) x=getNameIDFormats();
1613 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1615 x.push_back((*k)->cloneNameIDFormat());
1620 IMPL_XMLOBJECT_CLONE(AuthnAuthorityDescriptor);
1621 RoleDescriptor* cloneRoleDescriptor() const {
1622 return cloneAuthnAuthorityDescriptor();
1625 IMPL_TYPED_CHILDREN(AuthnQueryService,m_pos_AuthnQueryService);
1626 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1627 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1630 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1631 PROC_TYPED_CHILDREN(AuthnQueryService,SAML20MD_NS,false);
1632 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1633 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1634 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1638 class SAML_DLLLOCAL PDPDescriptorImpl : public virtual PDPDescriptor, public RoleDescriptorImpl
1640 list<XMLObject*>::iterator m_pos_AuthzService;
1641 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1644 m_children.push_back(nullptr);
1645 m_children.push_back(nullptr);
1646 m_pos_AuthzService=m_pos_ContactPerson;
1647 ++m_pos_AuthzService;
1648 m_pos_AssertionIDRequestService=m_pos_AuthzService;
1649 ++m_pos_AssertionIDRequestService;
1653 virtual ~PDPDescriptorImpl() {}
1655 PDPDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1656 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1660 PDPDescriptorImpl(const PDPDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1662 VectorOf(AuthzService) v=getAuthzServices();
1663 for (vector<AuthzService*>::const_iterator i=src.m_AuthzServices.begin(); i!=src.m_AuthzServices.end(); i++) {
1665 v.push_back((*i)->cloneAuthzService());
1668 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1669 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1671 w.push_back((*j)->cloneAssertionIDRequestService());
1674 VectorOf(NameIDFormat) x=getNameIDFormats();
1675 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1677 x.push_back((*k)->cloneNameIDFormat());
1682 IMPL_XMLOBJECT_CLONE(PDPDescriptor);
1683 RoleDescriptor* cloneRoleDescriptor() const {
1684 return clonePDPDescriptor();
1687 IMPL_TYPED_CHILDREN(AuthzService,m_pos_AuthzService);
1688 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1689 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1692 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1693 PROC_TYPED_CHILDREN(AuthzService,SAML20MD_NS,false);
1694 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1695 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1696 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1700 class SAML_DLLLOCAL AttributeAuthorityDescriptorImpl : public virtual AttributeAuthorityDescriptor, public RoleDescriptorImpl
1702 list<XMLObject*>::iterator m_pos_AttributeService;
1703 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1704 list<XMLObject*>::iterator m_pos_NameIDFormat;
1705 list<XMLObject*>::iterator m_pos_AttributeProfile;
1708 m_children.push_back(nullptr);
1709 m_children.push_back(nullptr);
1710 m_children.push_back(nullptr);
1711 m_children.push_back(nullptr);
1712 m_pos_AttributeService=m_pos_ContactPerson;
1713 ++m_pos_AttributeService;
1714 m_pos_AssertionIDRequestService=m_pos_AttributeService;
1715 ++m_pos_AssertionIDRequestService;
1716 m_pos_NameIDFormat=m_pos_AssertionIDRequestService;
1717 ++m_pos_NameIDFormat;
1718 m_pos_AttributeProfile=m_pos_NameIDFormat;
1719 ++m_pos_AttributeProfile;
1723 virtual ~AttributeAuthorityDescriptorImpl() {}
1725 AttributeAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1726 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1730 AttributeAuthorityDescriptorImpl(const AttributeAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1732 VectorOf(AttributeService) v=getAttributeServices();
1733 for (vector<AttributeService*>::const_iterator i=src.m_AttributeServices.begin(); i!=src.m_AttributeServices.end(); i++) {
1735 v.push_back((*i)->cloneAttributeService());
1738 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1739 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1741 w.push_back((*j)->cloneAssertionIDRequestService());
1744 VectorOf(NameIDFormat) x=getNameIDFormats();
1745 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1747 x.push_back((*k)->cloneNameIDFormat());
1750 VectorOf(AttributeProfile) y=getAttributeProfiles();
1751 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1753 y.push_back((*m)->cloneAttributeProfile());
1756 VectorOf(Attribute) z=getAttributes();
1757 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1759 z.push_back((*n)->cloneAttribute());
1764 IMPL_XMLOBJECT_CLONE(AttributeAuthorityDescriptor);
1765 RoleDescriptor* cloneRoleDescriptor() const {
1766 return cloneAttributeAuthorityDescriptor();
1769 IMPL_TYPED_CHILDREN(AttributeService,m_pos_AttributeService);
1770 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1771 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1772 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1773 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1776 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1777 PROC_TYPED_CHILDREN(AttributeService,SAML20MD_NS,false);
1778 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1779 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1780 PROC_TYPED_CHILDREN(AttributeProfile,SAML20MD_NS,false);
1781 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
1782 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1786 class SAML_DLLLOCAL QueryDescriptorTypeImpl : public virtual QueryDescriptorType, public RoleDescriptorImpl
1789 m_WantAssertionsSigned=XML_BOOL_NULL;
1790 m_children.push_back(nullptr);
1791 m_pos_NameIDFormat=m_pos_ContactPerson;
1792 ++m_pos_NameIDFormat;
1796 list<XMLObject*>::iterator m_pos_NameIDFormat;
1798 QueryDescriptorTypeImpl() {
1803 virtual ~QueryDescriptorTypeImpl() {}
1805 QueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1806 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1810 QueryDescriptorTypeImpl(const QueryDescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1812 WantAssertionsSigned(src.m_WantAssertionsSigned);
1813 VectorOf(NameIDFormat) y=getNameIDFormats();
1814 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1816 y.push_back((*m)->cloneNameIDFormat());
1821 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1822 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1824 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1825 if (!qualifiedName.hasNamespaceURI()) {
1826 if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1827 setWantAssertionsSigned(value);
1831 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1835 void marshallAttributes(DOMElement* domElement) const {
1836 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,nullptr);
1837 RoleDescriptorImpl::marshallAttributes(domElement);
1840 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1841 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1842 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1846 class SAML_DLLLOCAL AuthnQueryDescriptorTypeImpl : public virtual AuthnQueryDescriptorType, public QueryDescriptorTypeImpl
1849 virtual ~AuthnQueryDescriptorTypeImpl() {}
1851 AuthnQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1852 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1854 AuthnQueryDescriptorTypeImpl(const AuthnQueryDescriptorTypeImpl& src) : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {}
1856 IMPL_XMLOBJECT_CLONE(AuthnQueryDescriptorType);
1857 QueryDescriptorType* cloneQueryDescriptorType() const {
1858 return new AuthnQueryDescriptorTypeImpl(*this);
1860 RoleDescriptor* cloneRoleDescriptor() const {
1861 return new AuthnQueryDescriptorTypeImpl(*this);
1865 class SAML_DLLLOCAL AttributeQueryDescriptorTypeImpl : public virtual AttributeQueryDescriptorType, public QueryDescriptorTypeImpl
1868 virtual ~AttributeQueryDescriptorTypeImpl() {}
1870 AttributeQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1871 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1873 AttributeQueryDescriptorTypeImpl(const AttributeQueryDescriptorTypeImpl& src)
1874 : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1875 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1876 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1878 w.push_back((*j)->cloneAttributeConsumingService());
1883 IMPL_XMLOBJECT_CLONE(AttributeQueryDescriptorType);
1884 QueryDescriptorType* cloneQueryDescriptorType() const {
1885 return new AttributeQueryDescriptorTypeImpl(*this);
1887 RoleDescriptor* cloneRoleDescriptor() const {
1888 return new AttributeQueryDescriptorTypeImpl(*this);
1891 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1894 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1895 PROC_TYPED_CHILDREN(AttributeConsumingService,SAML20MD_NS,false);
1896 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1900 class SAML_DLLLOCAL AuthzDecisionQueryDescriptorTypeImpl : public virtual AuthzDecisionQueryDescriptorType, public QueryDescriptorTypeImpl
1903 virtual ~AuthzDecisionQueryDescriptorTypeImpl() {}
1905 AuthzDecisionQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1906 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1908 AuthzDecisionQueryDescriptorTypeImpl(const AuthzDecisionQueryDescriptorTypeImpl& src)
1909 : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1910 VectorOf(ActionNamespace) w=getActionNamespaces();
1911 for (vector<ActionNamespace*>::const_iterator j=src.m_ActionNamespaces.begin(); j!=src.m_ActionNamespaces.end(); j++) {
1913 w.push_back((*j)->cloneActionNamespace());
1918 IMPL_XMLOBJECT_CLONE(AuthzDecisionQueryDescriptorType);
1919 QueryDescriptorType* cloneQueryDescriptorType() const {
1920 return new AuthzDecisionQueryDescriptorTypeImpl(*this);
1922 RoleDescriptor* cloneRoleDescriptor() const {
1923 return new AuthzDecisionQueryDescriptorTypeImpl(*this);
1926 IMPL_TYPED_CHILDREN(ActionNamespace,m_children.end());
1929 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1930 PROC_TYPED_CHILDREN(ActionNamespace,samlconstants::SAML20MD_QUERY_EXT_NS,false);
1931 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1935 class SAML_DLLLOCAL AffiliationDescriptorImpl : public virtual AffiliationDescriptor,
1936 public virtual SignableObject,
1937 public AbstractComplexElement,
1938 public AbstractAttributeExtensibleXMLObject,
1939 public AbstractDOMCachingXMLObject,
1940 public AbstractXMLObjectMarshaller,
1941 public AbstractXMLObjectUnmarshaller
1943 list<XMLObject*>::iterator m_pos_AffiliateMember;
1946 m_ID=m_AffiliationOwnerID=nullptr;
1947 m_ValidUntil=m_CacheDuration=nullptr;
1948 m_children.push_back(nullptr);
1949 m_children.push_back(nullptr);
1950 m_children.push_back(nullptr);
1951 m_Signature=nullptr;
1952 m_Extensions=nullptr;
1953 m_pos_Signature=m_children.begin();
1954 m_pos_Extensions=m_pos_Signature;
1956 m_pos_AffiliateMember=m_pos_Extensions;
1957 ++m_pos_AffiliateMember;
1961 virtual ~AffiliationDescriptorImpl() {
1962 XMLString::release(&m_ID);
1963 XMLString::release(&m_AffiliationOwnerID);
1964 delete m_ValidUntil;
1965 delete m_CacheDuration;
1968 AffiliationDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1969 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1973 AffiliationDescriptorImpl(const AffiliationDescriptorImpl& src)
1974 : AbstractXMLObject(src), AbstractComplexElement(src),
1975 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1978 setAffiliationOwnerID(src.getAffiliationOwnerID());
1979 setValidUntil(src.getValidUntil());
1980 setCacheDuration(src.getCacheDuration());
1981 if (src.getSignature())
1982 setSignature(src.getSignature()->cloneSignature());
1983 if (src.getExtensions())
1984 setExtensions(src.getExtensions()->cloneExtensions());
1986 VectorOf(KeyDescriptor) v=getKeyDescriptors();
1987 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
1989 v.push_back((*i)->cloneKeyDescriptor());
1992 VectorOf(AffiliateMember) w=getAffiliateMembers();
1993 for (vector<AffiliateMember*>::const_iterator j=src.m_AffiliateMembers.begin(); j!=src.m_AffiliateMembers.end(); j++) {
1995 w.push_back((*j)->cloneAffiliateMember());
2000 IMPL_XMLOBJECT_CLONE(AffiliationDescriptor);
2002 //IMPL_TYPED_CHILD(Signature);
2003 // Need customized setter.
2005 Signature* m_Signature;
2006 list<XMLObject*>::iterator m_pos_Signature;
2008 Signature* getSignature() const {
2012 void setSignature(Signature* sig) {
2013 prepareForAssignment(m_Signature,sig);
2014 *m_pos_Signature=m_Signature=sig;
2015 // Sync content reference back up.
2017 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2020 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
2021 IMPL_STRING_ATTRIB(AffiliationOwnerID);
2022 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2023 IMPL_DURATION_ATTRIB(CacheDuration,0);
2024 IMPL_TYPED_CHILD(Extensions);
2025 IMPL_TYPED_CHILDREN(AffiliateMember,m_pos_AffiliateMember);
2026 IMPL_TYPED_CHILDREN(KeyDescriptor,m_children.end());
2028 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
2029 if (!qualifiedName.hasNamespaceURI()) {
2030 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
2034 else if (XMLString::equals(qualifiedName.getLocalPart(),AFFILIATIONOWNERID_ATTRIB_NAME)) {
2035 setAffiliationOwnerID(value);
2038 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
2039 setValidUntil(value);
2042 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
2043 setCacheDuration(value);
2047 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
2051 void marshallAttributes(DOMElement* domElement) const {
2052 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
2053 MARSHALL_STRING_ATTRIB(AffiliationOwnerID,AFFILIATIONOWNERID,nullptr);
2054 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2055 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2056 marshallExtensionAttributes(domElement);
2059 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2060 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2061 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2062 PROC_TYPED_CHILDREN(AffiliateMember,SAML20MD_NS,false);
2063 PROC_TYPED_CHILDREN(KeyDescriptor,SAML20MD_NS,false);
2064 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2067 void processAttribute(const DOMAttr* attribute) {
2068 PROC_ID_ATTRIB(ID,ID,nullptr);
2069 unmarshallExtensionAttribute(attribute);
2073 class SAML_DLLLOCAL EntityDescriptorImpl : public virtual EntityDescriptor,
2074 public virtual SignableObject,
2075 public AbstractComplexElement,
2076 public AbstractAttributeExtensibleXMLObject,
2077 public AbstractDOMCachingXMLObject,
2078 public AbstractXMLObjectMarshaller,
2079 public AbstractXMLObjectUnmarshaller
2081 list<XMLObject*>::iterator m_pos_ContactPerson;
2084 m_ID=m_EntityID=nullptr;
2085 m_ValidUntil=m_CacheDuration=nullptr;
2086 m_children.push_back(nullptr);
2087 m_children.push_back(nullptr);
2088 m_children.push_back(nullptr);
2089 m_children.push_back(nullptr);
2090 m_children.push_back(nullptr);
2091 m_Signature=nullptr;
2092 m_Extensions=nullptr;
2093 m_AffiliationDescriptor=nullptr;
2094 m_Organization=nullptr;
2095 m_pos_Signature=m_children.begin();
2096 m_pos_Extensions=m_pos_Signature;
2098 m_pos_AffiliationDescriptor=m_pos_Extensions;
2099 ++m_pos_AffiliationDescriptor;
2100 m_pos_Organization=m_pos_AffiliationDescriptor;
2101 ++m_pos_Organization;
2102 m_pos_ContactPerson=m_pos_Organization;
2103 ++m_pos_ContactPerson;
2107 virtual ~EntityDescriptorImpl() {
2108 XMLString::release(&m_ID);
2109 XMLString::release(&m_EntityID);
2110 delete m_ValidUntil;
2111 delete m_CacheDuration;
2114 EntityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2115 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2119 EntityDescriptorImpl(const EntityDescriptorImpl& src)
2120 : AbstractXMLObject(src), AbstractComplexElement(src),
2121 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
2124 setEntityID(src.getEntityID());
2125 setValidUntil(src.getValidUntil());
2126 setCacheDuration(src.getCacheDuration());
2127 if (src.getSignature())
2128 setSignature(src.getSignature()->cloneSignature());
2129 if (src.getExtensions())
2130 setExtensions(src.getExtensions()->cloneExtensions());
2131 if (src.getAffiliationDescriptor())
2132 setAffiliationDescriptor(src.getAffiliationDescriptor()->cloneAffiliationDescriptor());
2133 if (src.getOrganization())
2134 setOrganization(src.getOrganization()->cloneOrganization());
2136 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2138 IDPSSODescriptor* idp=dynamic_cast<IDPSSODescriptor*>(*i);
2140 getIDPSSODescriptors().push_back(idp->cloneIDPSSODescriptor());
2144 SPSSODescriptor* sp=dynamic_cast<SPSSODescriptor*>(*i);
2146 getSPSSODescriptors().push_back(sp->cloneSPSSODescriptor());
2150 AuthnAuthorityDescriptor* authn=dynamic_cast<AuthnAuthorityDescriptor*>(*i);
2152 getAuthnAuthorityDescriptors().push_back(authn->cloneAuthnAuthorityDescriptor());
2156 AttributeAuthorityDescriptor* attr=dynamic_cast<AttributeAuthorityDescriptor*>(*i);
2158 getAttributeAuthorityDescriptors().push_back(attr->cloneAttributeAuthorityDescriptor());
2162 PDPDescriptor* pdp=dynamic_cast<PDPDescriptor*>(*i);
2164 getPDPDescriptors().push_back(pdp->clonePDPDescriptor());
2168 AuthnQueryDescriptorType* authnq=dynamic_cast<AuthnQueryDescriptorType*>(*i);
2170 getAuthnQueryDescriptorTypes().push_back(authnq->cloneAuthnQueryDescriptorType());
2174 AttributeQueryDescriptorType* attrq=dynamic_cast<AttributeQueryDescriptorType*>(*i);
2176 getAttributeQueryDescriptorTypes().push_back(attrq->cloneAttributeQueryDescriptorType());
2180 AuthzDecisionQueryDescriptorType* authzq=dynamic_cast<AuthzDecisionQueryDescriptorType*>(*i);
2182 getAuthzDecisionQueryDescriptorTypes().push_back(authzq->cloneAuthzDecisionQueryDescriptorType());
2186 RoleDescriptor* role=dynamic_cast<RoleDescriptor*>(*i);
2188 getRoleDescriptors().push_back(role->cloneRoleDescriptor());
2194 VectorOf(ContactPerson) v=getContactPersons();
2195 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
2197 v.push_back((*j)->cloneContactPerson());
2200 VectorOf(AdditionalMetadataLocation) w=getAdditionalMetadataLocations();
2201 for (vector<AdditionalMetadataLocation*>::const_iterator k=src.m_AdditionalMetadataLocations.begin(); k!=src.m_AdditionalMetadataLocations.end(); k++) {
2203 w.push_back((*k)->cloneAdditionalMetadataLocation());
2208 IMPL_XMLOBJECT_CLONE(EntityDescriptor);
2210 //IMPL_TYPED_CHILD(Signature);
2211 // Need customized setter.
2213 Signature* m_Signature;
2214 list<XMLObject*>::iterator m_pos_Signature;
2216 Signature* getSignature() const {
2220 void setSignature(Signature* sig) {
2221 prepareForAssignment(m_Signature,sig);
2222 *m_pos_Signature=m_Signature=sig;
2223 // Sync content reference back up.
2225 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2228 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
2229 IMPL_STRING_ATTRIB(EntityID);
2230 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2231 IMPL_DURATION_ATTRIB(CacheDuration,0);
2232 IMPL_TYPED_CHILD(Extensions);
2233 IMPL_TYPED_CHILDREN(RoleDescriptor,m_pos_AffiliationDescriptor);
2234 IMPL_TYPED_CHILDREN(IDPSSODescriptor,m_pos_AffiliationDescriptor);
2235 IMPL_TYPED_CHILDREN(SPSSODescriptor,m_pos_AffiliationDescriptor);
2236 IMPL_TYPED_CHILDREN(AuthnAuthorityDescriptor,m_pos_AffiliationDescriptor);
2237 IMPL_TYPED_CHILDREN(AttributeAuthorityDescriptor,m_pos_AffiliationDescriptor);
2238 IMPL_TYPED_CHILDREN(PDPDescriptor,m_pos_AffiliationDescriptor);
2239 IMPL_TYPED_CHILDREN(AuthnQueryDescriptorType,m_pos_AffiliationDescriptor);
2240 IMPL_TYPED_CHILDREN(AttributeQueryDescriptorType,m_pos_AffiliationDescriptor);
2241 IMPL_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,m_pos_AffiliationDescriptor);
2242 IMPL_TYPED_CHILD(AffiliationDescriptor);
2243 IMPL_TYPED_CHILD(Organization);
2244 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
2245 IMPL_TYPED_CHILDREN(AdditionalMetadataLocation,m_children.end());
2247 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
2248 if (!qualifiedName.hasNamespaceURI()) {
2249 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
2253 else if (XMLString::equals(qualifiedName.getLocalPart(),ENTITYID_ATTRIB_NAME)) {
2257 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
2258 setValidUntil(value);
2261 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
2262 setCacheDuration(value);
2266 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
2269 const RoleDescriptor* getRoleDescriptor(const xmltooling::QName& qname, const XMLCh* protocol) const {
2270 // Check for "known" elements/types.
2271 if (qname == IDPSSODescriptor::ELEMENT_QNAME)
2272 return find_if(m_IDPSSODescriptors, isValidForProtocol(protocol));
2273 if (qname == SPSSODescriptor::ELEMENT_QNAME)
2274 return find_if(m_SPSSODescriptors, isValidForProtocol(protocol));
2275 if (qname == AuthnAuthorityDescriptor::ELEMENT_QNAME)
2276 return find_if(m_AuthnAuthorityDescriptors, isValidForProtocol(protocol));
2277 if (qname == AttributeAuthorityDescriptor::ELEMENT_QNAME)
2278 return find_if(m_AttributeAuthorityDescriptors, isValidForProtocol(protocol));
2279 if (qname == PDPDescriptor::ELEMENT_QNAME)
2280 return find_if(m_PDPDescriptors, isValidForProtocol(protocol));
2281 if (qname == AuthnQueryDescriptorType::TYPE_QNAME)
2282 return find_if(m_AuthnQueryDescriptorTypes, isValidForProtocol(protocol));
2283 if (qname == AttributeQueryDescriptorType::TYPE_QNAME)
2284 return find_if(m_AttributeQueryDescriptorTypes, isValidForProtocol(protocol));
2285 if (qname == AuthzDecisionQueryDescriptorType::TYPE_QNAME)
2286 return find_if(m_AuthzDecisionQueryDescriptorTypes, isValidForProtocol(protocol));
2288 vector<RoleDescriptor*>::const_iterator i =
2289 find_if(m_RoleDescriptors.begin(), m_RoleDescriptors.end(), ofTypeValidForProtocol(qname,protocol));
2290 return (i!=m_RoleDescriptors.end()) ? *i : nullptr;
2294 void marshallAttributes(DOMElement* domElement) const {
2295 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
2296 MARSHALL_STRING_ATTRIB(EntityID,ENTITYID,nullptr);
2297 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2298 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2299 marshallExtensionAttributes(domElement);
2302 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2303 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2304 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2305 PROC_TYPED_CHILDREN(IDPSSODescriptor,SAML20MD_NS,false);
2306 PROC_TYPED_CHILDREN(SPSSODescriptor,SAML20MD_NS,false);
2307 PROC_TYPED_CHILDREN(AuthnAuthorityDescriptor,SAML20MD_NS,false);
2308 PROC_TYPED_CHILDREN(AttributeAuthorityDescriptor,SAML20MD_NS,false);
2309 PROC_TYPED_CHILDREN(PDPDescriptor,SAML20MD_NS,false);
2310 PROC_TYPED_CHILDREN(AuthnQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2311 PROC_TYPED_CHILDREN(AttributeQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2312 PROC_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2313 PROC_TYPED_CHILDREN(RoleDescriptor,SAML20MD_NS,false);
2314 PROC_TYPED_CHILD(AffiliationDescriptor,SAML20MD_NS,false);
2315 PROC_TYPED_CHILD(Organization,SAML20MD_NS,false);
2316 PROC_TYPED_CHILDREN(ContactPerson,SAML20MD_NS,false);
2317 PROC_TYPED_CHILDREN(AdditionalMetadataLocation,SAML20MD_NS,false);
2318 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2321 void processAttribute(const DOMAttr* attribute) {
2322 PROC_ID_ATTRIB(ID,ID,nullptr);
2323 unmarshallExtensionAttribute(attribute);
2327 class SAML_DLLLOCAL EntitiesDescriptorImpl : public virtual EntitiesDescriptor,
2328 public virtual SignableObject,
2329 public AbstractComplexElement,
2330 public AbstractDOMCachingXMLObject,
2331 public AbstractXMLObjectMarshaller,
2332 public AbstractXMLObjectUnmarshaller
2335 m_ID=m_Name=nullptr;
2336 m_ValidUntil=m_CacheDuration=nullptr;
2337 m_children.push_back(nullptr);
2338 m_children.push_back(nullptr);
2339 m_Signature=nullptr;
2340 m_Extensions=nullptr;
2341 m_pos_Signature=m_children.begin();
2342 m_pos_Extensions=m_pos_Signature;
2347 virtual ~EntitiesDescriptorImpl() {
2348 XMLString::release(&m_ID);
2349 XMLString::release(&m_Name);
2350 delete m_ValidUntil;
2351 delete m_CacheDuration;
2354 EntitiesDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2355 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2359 EntitiesDescriptorImpl(const EntitiesDescriptorImpl& src)
2360 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2363 setName(src.getName());
2364 setValidUntil(src.getValidUntil());
2365 setCacheDuration(src.getCacheDuration());
2366 if (src.getSignature())
2367 setSignature(src.getSignature()->cloneSignature());
2368 if (src.getExtensions())
2369 setExtensions(src.getExtensions()->cloneExtensions());
2371 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2373 EntityDescriptor* e=dynamic_cast<EntityDescriptor*>(*i);
2375 getEntityDescriptors().push_back(e->cloneEntityDescriptor());
2379 EntitiesDescriptor* es=dynamic_cast<EntitiesDescriptor*>(*i);
2381 getEntitiesDescriptors().push_back(es->cloneEntitiesDescriptor());
2388 IMPL_XMLOBJECT_CLONE(EntitiesDescriptor);
2390 //IMPL_TYPED_CHILD(Signature);
2391 // Need customized setter.
2393 Signature* m_Signature;
2394 list<XMLObject*>::iterator m_pos_Signature;
2396 Signature* getSignature() const {
2400 void setSignature(Signature* sig) {
2401 prepareForAssignment(m_Signature,sig);
2402 *m_pos_Signature=m_Signature=sig;
2403 // Sync content reference back up.
2405 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2408 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
2409 IMPL_STRING_ATTRIB(Name);
2410 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2411 IMPL_DURATION_ATTRIB(CacheDuration,0);
2412 IMPL_TYPED_CHILD(Extensions);
2413 IMPL_TYPED_CHILDREN(EntityDescriptor,m_children.end());
2414 IMPL_TYPED_CHILDREN(EntitiesDescriptor,m_children.end());
2417 void marshallAttributes(DOMElement* domElement) const {
2418 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
2419 MARSHALL_STRING_ATTRIB(Name,NAME,nullptr);
2420 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2421 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2424 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2425 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2426 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2427 PROC_TYPED_CHILDREN(EntityDescriptor,SAML20MD_NS,false);
2428 PROC_TYPED_CHILDREN(EntitiesDescriptor,SAML20MD_NS,false);
2429 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2432 void processAttribute(const DOMAttr* attribute) {
2433 PROC_ID_ATTRIB(ID,ID,nullptr);
2434 PROC_STRING_ATTRIB(Name,NAME,nullptr);
2435 PROC_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2436 PROC_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2440 class SAML_DLLLOCAL EntityAttributesImpl : public virtual EntityAttributes,
2441 public AbstractComplexElement,
2442 public AbstractDOMCachingXMLObject,
2443 public AbstractXMLObjectMarshaller,
2444 public AbstractXMLObjectUnmarshaller
2447 virtual ~EntityAttributesImpl() {}
2449 EntityAttributesImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2450 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2453 EntityAttributesImpl(const EntityAttributesImpl& src)
2454 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2455 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2457 Attribute* a=dynamic_cast<Attribute*>(*i);
2459 getAttributes().push_back(a->cloneAttribute());
2463 saml2::Assertion* as=dynamic_cast<saml2::Assertion*>(*i);
2465 getAssertions().push_back(as->cloneAssertion());
2472 IMPL_XMLOBJECT_CLONE(EntityAttributes);
2474 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
2475 IMPL_TYPED_FOREIGN_CHILDREN(Assertion,saml2,m_children.end());
2478 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2479 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
2480 PROC_TYPED_FOREIGN_CHILDREN(Assertion,saml2,SAML20_NS,false);
2481 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2487 #if defined (_MSC_VER)
2488 #pragma warning( pop )
2491 IMPL_ELEMENT_QNAME(IDPSSODescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2492 IMPL_ELEMENT_QNAME(SPSSODescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2493 IMPL_ELEMENT_QNAME(AuthnAuthorityDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2494 IMPL_ELEMENT_QNAME(AttributeAuthorityDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2495 IMPL_ELEMENT_QNAME(PDPDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2496 IMPL_TYPE_QNAME(AuthnQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2497 IMPL_TYPE_QNAME(AttributeQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2498 IMPL_TYPE_QNAME(AuthzDecisionQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2500 // Builder Implementations
2502 IMPL_XMLOBJECTBUILDER(AdditionalMetadataLocation);
2503 IMPL_XMLOBJECTBUILDER(AffiliateMember);
2504 IMPL_XMLOBJECTBUILDER(AffiliationDescriptor);
2505 IMPL_XMLOBJECTBUILDER(ArtifactResolutionService);
2506 IMPL_XMLOBJECTBUILDER(AssertionConsumerService);
2507 IMPL_XMLOBJECTBUILDER(AssertionIDRequestService);
2508 IMPL_XMLOBJECTBUILDER(AttributeAuthorityDescriptor);
2509 IMPL_XMLOBJECTBUILDER(AttributeConsumingService);
2510 IMPL_XMLOBJECTBUILDER(AttributeProfile);
2511 IMPL_XMLOBJECTBUILDER(AttributeQueryDescriptorType);
2512 IMPL_XMLOBJECTBUILDER(AttributeService);
2513 IMPL_XMLOBJECTBUILDER(AuthnAuthorityDescriptor);
2514 IMPL_XMLOBJECTBUILDER(AuthnQueryDescriptorType);
2515 IMPL_XMLOBJECTBUILDER(AuthnQueryService);
2516 IMPL_XMLOBJECTBUILDER(AuthzDecisionQueryDescriptorType);
2517 IMPL_XMLOBJECTBUILDER(AuthzService);
2518 IMPL_XMLOBJECTBUILDER(Company);
2519 IMPL_XMLOBJECTBUILDER(ContactPerson);
2520 IMPL_XMLOBJECTBUILDER(EmailAddress);
2521 IMPL_XMLOBJECTBUILDER(EndpointType);
2522 IMPL_XMLOBJECTBUILDER(EntitiesDescriptor);
2523 IMPL_XMLOBJECTBUILDER(EntityDescriptor);
2524 IMPL_XMLOBJECTBUILDER(Extensions);
2525 IMPL_XMLOBJECTBUILDER(GivenName);
2526 IMPL_XMLOBJECTBUILDER(IDPSSODescriptor);
2527 IMPL_XMLOBJECTBUILDER(IndexedEndpointType);
2528 IMPL_XMLOBJECTBUILDER(KeyDescriptor);
2529 IMPL_XMLOBJECTBUILDER(localizedNameType);
2530 IMPL_XMLOBJECTBUILDER(localizedURIType);
2531 IMPL_XMLOBJECTBUILDER(ManageNameIDService);
2532 IMPL_XMLOBJECTBUILDER(NameIDFormat);
2533 IMPL_XMLOBJECTBUILDER(NameIDMappingService);
2534 IMPL_XMLOBJECTBUILDER(Organization);
2535 IMPL_XMLOBJECTBUILDER(OrganizationName);
2536 IMPL_XMLOBJECTBUILDER(OrganizationDisplayName);
2537 IMPL_XMLOBJECTBUILDER(OrganizationURL);
2538 IMPL_XMLOBJECTBUILDER(PDPDescriptor);
2539 IMPL_XMLOBJECTBUILDER(RequestedAttribute);
2540 IMPL_XMLOBJECTBUILDER(ServiceDescription);
2541 IMPL_XMLOBJECTBUILDER(ServiceName);
2542 IMPL_XMLOBJECTBUILDER(SingleLogoutService);
2543 IMPL_XMLOBJECTBUILDER(SingleSignOnService);
2544 IMPL_XMLOBJECTBUILDER(SPSSODescriptor);
2545 IMPL_XMLOBJECTBUILDER(SurName);
2546 IMPL_XMLOBJECTBUILDER(TelephoneNumber);
2548 IMPL_XMLOBJECTBUILDER(ActionNamespace);
2549 IMPL_XMLOBJECTBUILDER(SourceID);
2550 IMPL_XMLOBJECTBUILDER(EntityAttributes);
2552 #ifdef HAVE_COVARIANT_RETURNS
2553 RoleDescriptor* RoleDescriptorBuilder::buildObject(
2555 xmltooling::XMLObject* RoleDescriptorBuilder::buildObject(
2557 const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType
2560 return new RoleDescriptorTypeImpl(nsURI,localName,prefix,schemaType);
2563 const XMLCh ActionNamespace::LOCAL_NAME[] = UNICODE_LITERAL_15(A,c,t,i,o,n,N,a,m,e,s,p,a,c,e);
2564 const XMLCh AdditionalMetadataLocation::LOCAL_NAME[] = UNICODE_LITERAL_26(A,d,d,i,t,i,o,n,a,l,M,e,t,a,d,a,t,a,L,o,c,a,t,i,o,n);
2565 const XMLCh AdditionalMetadataLocation::TYPE_NAME[] = UNICODE_LITERAL_30(A,d,d,i,t,i,o,n,a,l,M,e,t,a,d,a,t,a,L,o,c,a,t,i,o,n,T,y,p,e);
2566 const XMLCh AdditionalMetadataLocation::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(n,a,m,e,s,p,a,c,e);
2567 const XMLCh AffiliateMember::LOCAL_NAME[] = UNICODE_LITERAL_15(A,f,f,i,l,i,a,t,e,M,e,m,b,e,r);
2568 const XMLCh AffiliationDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_21(A,f,f,i,l,i,a,t,i,o,n,D,e,s,c,r,i,p,t,o,r);
2569 const XMLCh AffiliationDescriptor::TYPE_NAME[] = UNICODE_LITERAL_25(A,f,f,i,l,i,a,t,i,o,n,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
2570 const XMLCh AffiliationDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2571 const XMLCh AffiliationDescriptor::AFFILIATIONOWNERID_ATTRIB_NAME[] = UNICODE_LITERAL_18(a,f,f,i,l,i,a,t,i,o,n,O,w,n,e,r,I,D);
2572 const XMLCh ArtifactResolutionService::LOCAL_NAME[] = UNICODE_LITERAL_25(A,r,t,i,f,a,c,t,R,e,s,o,l,u,t,i,o,n,S,e,r,v,i,c,e);
2573 const XMLCh AssertionConsumerService::LOCAL_NAME[] = UNICODE_LITERAL_24(A,s,s,e,r,t,i,o,n,C,o,n,s,u,m,e,r,S,e,r,v,i,c,e);
2574 const XMLCh AssertionIDRequestService::LOCAL_NAME[] = UNICODE_LITERAL_25(A,s,s,e,r,t,i,o,n,I,D,R,e,q,u,e,s,t,S,e,r,v,i,c,e);
2575 const XMLCh AttributeAuthorityDescriptor::LOCAL_NAME[] =UNICODE_LITERAL_28(A,t,t,r,i,b,u,t,e,A,u,t,h,o,r,i,t,y,D,e,s,c,r,i,p,t,o,r);
2576 const XMLCh AttributeAuthorityDescriptor::TYPE_NAME[] = UNICODE_LITERAL_32(A,t,t,r,i,b,u,t,e,A,u,t,h,o,r,i,t,y,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
2577 const XMLCh AttributeConsumingService::LOCAL_NAME[] = UNICODE_LITERAL_25(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);
2578 const XMLCh AttributeConsumingService::TYPE_NAME[] = UNICODE_LITERAL_29(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,T,y,p,e);
2579 const XMLCh AttributeConsumingService::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
2580 const XMLCh AttributeConsumingService::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
2581 const XMLCh AttributeProfile::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,P,r,o,f,i,l,e);
2582 const XMLCh AttributeQueryDescriptorType::LOCAL_NAME[] =UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2583 const XMLCh AttributeQueryDescriptorType::TYPE_NAME[] = UNICODE_LITERAL_28(A,t,t,r,i,b,u,t,e,Q,u,e,r,y,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
2584 const XMLCh AttributeService::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,S,e,r,v,i,c,e);
2585 const XMLCh AuthnAuthorityDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_24(A,u,t,h,n,A,u,t,h,o,r,i,t,y,D,e,s,c,r,i,p,t,o,r);
2586 const XMLCh AuthnAuthorityDescriptor::TYPE_NAME[] = UNICODE_LITERAL_28(A,u,t,h,n,A,u,t,h,o,r,i,t,y,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
2587 const XMLCh AuthnQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2588 const XMLCh AuthnQueryDescriptorType::TYPE_NAME[] = UNICODE_LITERAL_24(A,u,t,h,n,Q,u,e,r,y,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
2589 const XMLCh AuthnQueryService::LOCAL_NAME[] = UNICODE_LITERAL_17(A,u,t,h,n,Q,u,e,r,y,S,e,r,v,i,c,e);
2590 const XMLCh AuthzDecisionQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2591 const XMLCh AuthzDecisionQueryDescriptorType::TYPE_NAME[] = UNICODE_LITERAL_32(A,u,t,h,z,D,e,c,i,s,i,o,n,Q,u,e,r,y,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
2592 const XMLCh AuthzService::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,z,S,e,r,v,i,c,e);
2593 const XMLCh CacheableSAMLObject::CACHEDURATION_ATTRIB_NAME[] = UNICODE_LITERAL_13(c,a,c,h,e,D,u,r,a,t,i,o,n);
2594 const XMLCh Company::LOCAL_NAME[] = UNICODE_LITERAL_7(C,o,m,p,a,n,y);
2595 const XMLCh ContactPerson::LOCAL_NAME[] = UNICODE_LITERAL_13(C,o,n,t,a,c,t,P,e,r,s,o,n);
2596 const XMLCh ContactPerson::TYPE_NAME[] = UNICODE_LITERAL_11(C,o,n,t,a,c,t,T,y,p,e);
2597 const XMLCh ContactPerson::CONTACTTYPE_ATTRIB_NAME[] = UNICODE_LITERAL_11(c,o,n,t,a,c,t,T,y,p,e);
2598 const XMLCh ContactPerson::CONTACT_TECHNICAL[] = UNICODE_LITERAL_9(t,e,c,h,n,i,c,a,l);
2599 const XMLCh ContactPerson::CONTACT_SUPPORT[] = UNICODE_LITERAL_7(s,u,p,p,o,r,t);
2600 const XMLCh ContactPerson::CONTACT_ADMINISTRATIVE[] = UNICODE_LITERAL_14(a,d,m,i,n,i,s,t,r,a,t,i,v,e);
2601 const XMLCh ContactPerson::CONTACT_BILLING[] = UNICODE_LITERAL_7(b,i,l,l,i,n,g);
2602 const XMLCh ContactPerson::CONTACT_OTHER[] = UNICODE_LITERAL_5(o,t,h,e,r);
2603 const XMLCh EmailAddress::LOCAL_NAME[] = UNICODE_LITERAL_12(E,m,a,i,l,A,d,d,r,e,s,s);
2604 const XMLCh EndpointType::LOCAL_NAME[] = {chNull};
2605 const XMLCh EndpointType::TYPE_NAME[] = UNICODE_LITERAL_12(E,n,d,p,o,i,n,t,T,y,p,e);
2606 const XMLCh EndpointType::BINDING_ATTRIB_NAME[] = UNICODE_LITERAL_7(B,i,n,d,i,n,g);
2607 const XMLCh EndpointType::LOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_8(L,o,c,a,t,i,o,n);
2608 const XMLCh EndpointType::RESPONSELOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_16(R,e,s,p,o,n,s,e,L,o,c,a,t,i,o,n);
2609 const XMLCh EntitiesDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_18(E,n,t,i,t,i,e,s,D,e,s,c,r,i,p,t,o,r);
2610 const XMLCh EntitiesDescriptor::TYPE_NAME[] = UNICODE_LITERAL_22(E,n,t,i,t,i,e,s,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
2611 const XMLCh EntitiesDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2612 const XMLCh EntitiesDescriptor::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e);
2613 const XMLCh EntityDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,D,e,s,c,r,i,p,t,o,r);
2614 const XMLCh EntityDescriptor::TYPE_NAME[] = UNICODE_LITERAL_20(E,n,t,i,t,y,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
2615 const XMLCh EntityDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2616 const XMLCh EntityDescriptor::ENTITYID_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,n,t,i,t,y,I,D);
2617 const XMLCh EntityAttributes::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,A,t,t,r,i,b,u,t,e,s);
2618 const XMLCh EntityAttributes::TYPE_NAME[] = UNICODE_LITERAL_20(E,n,t,i,t,y,A,t,t,r,i,b,u,t,e,s,T,y,p,e);
2619 const XMLCh Extensions::LOCAL_NAME[] = UNICODE_LITERAL_10(E,x,t,e,n,s,i,o,n,s);
2620 const XMLCh Extensions::TYPE_NAME[] = UNICODE_LITERAL_14(E,x,t,e,n,s,i,o,n,s,T,y,p,e);
2621 const XMLCh GivenName::LOCAL_NAME[] = UNICODE_LITERAL_9(G,i,v,e,n,N,a,m,e);
2622 const XMLCh IDPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(I,D,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
2623 const XMLCh IDPSSODescriptor::TYPE_NAME[] = UNICODE_LITERAL_20(I,D,P,S,S,O,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
2624 const XMLCh IDPSSODescriptor::WANTAUTHNREQUESTSSIGNED_ATTRIB_NAME[] = UNICODE_LITERAL_23(W,a,n,t,A,u,t,h,n,R,e,q,u,e,s,t,s,S,i,g,n,e,d);
2625 const XMLCh IndexedEndpointType::LOCAL_NAME[] = {chNull};
2626 const XMLCh IndexedEndpointType::TYPE_NAME[] = UNICODE_LITERAL_19(I,n,d,e,x,e,d,E,n,d,p,o,i,n,t,T,y,p,e);
2627 const XMLCh IndexedEndpointType::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
2628 const XMLCh IndexedEndpointType::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
2629 const XMLCh KeyDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(K,e,y,D,e,s,c,r,i,p,t,o,r);
2630 const XMLCh KeyDescriptor::TYPE_NAME[] = UNICODE_LITERAL_17(K,e,y,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
2631 const XMLCh KeyDescriptor::USE_ATTRIB_NAME[] = UNICODE_LITERAL_3(u,s,e);
2632 const XMLCh KeyDescriptor::KEYTYPE_ENCRYPTION[] = UNICODE_LITERAL_10(e,n,c,r,y,p,t,i,o,n);
2633 const XMLCh KeyDescriptor::KEYTYPE_SIGNING[] = UNICODE_LITERAL_7(s,i,g,n,i,n,g);
2634 const XMLCh localizedNameType::LOCAL_NAME[] = {chNull};
2635 const XMLCh localizedNameType::TYPE_NAME[] = UNICODE_LITERAL_17(l,o,c,a,l,i,z,e,d,N,a,m,e,T,y,p,e);
2636 const XMLCh localizedNameType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2637 const XMLCh localizedURIType::LOCAL_NAME[] = {chNull};
2638 const XMLCh localizedURIType::TYPE_NAME[] = UNICODE_LITERAL_16(l,o,c,a,l,i,z,e,d,U,R,I,T,y,p,e);
2639 const XMLCh localizedURIType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2640 const XMLCh ManageNameIDService::LOCAL_NAME[] = UNICODE_LITERAL_19(M,a,n,a,g,e,N,a,m,e,I,D,S,e,r,v,i,c,e);
2641 const XMLCh NameIDFormat::LOCAL_NAME[] = UNICODE_LITERAL_12(N,a,m,e,I,D,F,o,r,m,a,t);
2642 const XMLCh NameIDMappingService::LOCAL_NAME[] = UNICODE_LITERAL_20(N,a,m,e,I,D,M,a,p,p,i,n,g,S,e,r,v,i,c,e);
2643 const XMLCh Organization::LOCAL_NAME[] = UNICODE_LITERAL_12(O,r,g,a,n,i,z,a,t,i,o,n);
2644 const XMLCh Organization::TYPE_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,T,y,p,e);
2645 const XMLCh OrganizationName::LOCAL_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,N,a,m,e);
2646 const XMLCh OrganizationDisplayName::LOCAL_NAME[] = UNICODE_LITERAL_23(O,r,g,a,n,i,z,a,t,i,o,n,D,i,s,p,l,a,y,N,a,m,e);
2647 const XMLCh OrganizationURL::LOCAL_NAME[] = UNICODE_LITERAL_15(O,r,g,a,n,i,z,a,t,i,o,n,U,R,L);
2648 const XMLCh PDPDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(P,D,P,D,e,s,c,r,i,p,t,o,r);
2649 const XMLCh PDPDescriptor::TYPE_NAME[] = UNICODE_LITERAL_17(P,D,P,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
2650 const XMLCh QueryDescriptorType::LOCAL_NAME[] = {chNull};
2651 const XMLCh QueryDescriptorType::TYPE_NAME[] = UNICODE_LITERAL_19(Q,u,e,r,y,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
2652 const XMLCh QueryDescriptorType::WANTASSERTIONSSIGNED_ATTRIB_NAME[] = UNICODE_LITERAL_20(W,a,n,t,A,s,s,e,r,t,i,o,n,s,S,i,g,n,e,d);
2653 const XMLCh RequestedAttribute::LOCAL_NAME[] = UNICODE_LITERAL_18(R,e,q,u,e,s,t,e,d,A,t,t,r,i,b,u,t,e);
2654 const XMLCh RequestedAttribute::TYPE_NAME[] = UNICODE_LITERAL_22(R,e,q,u,e,s,t,e,d,A,t,t,r,i,b,u,t,e,T,y,p,e);
2655 const XMLCh RequestedAttribute::ISREQUIRED_ATTRIB_NAME[] = UNICODE_LITERAL_10(i,s,R,e,q,u,i,r,e,d);
2656 const XMLCh RoleDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2657 const XMLCh RoleDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2658 const XMLCh RoleDescriptor::PROTOCOLSUPPORTENUMERATION_ATTRIB_NAME[] = UNICODE_LITERAL_26(p,r,o,t,o,c,o,l,S,u,p,p,o,r,t,E,n,u,m,e,r,a,t,i,o,n);
2659 const XMLCh RoleDescriptor::ERRORURL_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,r,r,o,r,U,R,L);
2660 const XMLCh ServiceDescription::LOCAL_NAME[] = UNICODE_LITERAL_18(S,e,r,v,i,c,e,D,e,s,c,r,i,p,t,i,o,n);
2661 const XMLCh ServiceName::LOCAL_NAME[] = UNICODE_LITERAL_11(S,e,r,v,i,c,e,N,a,m,e);
2662 const XMLCh SingleLogoutService::LOCAL_NAME[] = UNICODE_LITERAL_19(S,i,n,g,l,e,L,o,g,o,u,t,S,e,r,v,i,c,e);
2663 const XMLCh SingleSignOnService::LOCAL_NAME[] = UNICODE_LITERAL_19(S,i,n,g,l,e,S,i,g,n,O,n,S,e,r,v,i,c,e);
2664 const XMLCh SourceID::LOCAL_NAME[] = UNICODE_LITERAL_8(S,o,u,r,c,e,I,D);
2665 const XMLCh SPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_15(S,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
2666 const XMLCh SPSSODescriptor::TYPE_NAME[] = UNICODE_LITERAL_19(S,P,S,S,O,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
2667 const XMLCh SPSSODescriptor::AUTHNREQUESTSSIGNED_ATTRIB_NAME[] = UNICODE_LITERAL_19(A,u,t,h,n,R,e,q,u,e,s,t,s,S,i,g,n,e,d);
2668 const XMLCh SPSSODescriptor::WANTASSERTIONSSIGNED_ATTRIB_NAME[] = UNICODE_LITERAL_20(W,a,n,t,A,s,s,e,r,t,i,o,n,s,S,i,g,n,e,d);
2669 const XMLCh SSODescriptorType::LOCAL_NAME[] = {chNull};
2670 const XMLCh SSODescriptorType::TYPE_NAME[] = UNICODE_LITERAL_17(S,S,O,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
2671 const XMLCh SurName::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,r,N,a,m,e);
2672 const XMLCh TelephoneNumber::LOCAL_NAME[] = UNICODE_LITERAL_15(T,e,l,e,p,h,o,n,e,N,u,m,b,e,r);
2673 const XMLCh TimeBoundSAMLObject::VALIDUNTIL_ATTRIB_NAME[] = UNICODE_LITERAL_10(v,a,l,i,d,U,n,t,i,l);