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 prepareForMarshalling() const {
1091 declareNonVisibleNamespaces();
1094 void marshallAttributes(DOMElement* domElement) const {
1095 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
1096 MARSHALL_STRING_ATTRIB(ProtocolSupportEnumeration,PROTOCOLSUPPORTENUMERATION,nullptr);
1097 MARSHALL_STRING_ATTRIB(ErrorURL,ERRORURL,nullptr);
1098 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
1099 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
1100 marshallExtensionAttributes(domElement);
1103 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1104 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
1105 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
1106 PROC_TYPED_CHILDREN(KeyDescriptor,SAML20MD_NS,false);
1107 PROC_TYPED_CHILD(Organization,SAML20MD_NS,false);
1108 PROC_TYPED_CHILDREN(ContactPerson,SAML20MD_NS,false);
1109 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1112 void processAttribute(const DOMAttr* attribute) {
1113 PROC_ID_ATTRIB(ID,ID,nullptr);
1114 unmarshallExtensionAttribute(attribute);
1118 class SAML_DLLLOCAL RoleDescriptorTypeImpl : public virtual RoleDescriptorType, public RoleDescriptorImpl
1121 virtual ~RoleDescriptorTypeImpl() {}
1123 RoleDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1124 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1127 RoleDescriptorTypeImpl(const RoleDescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1128 VectorOf(XMLObject) v=getUnknownXMLObjects();
1129 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
1130 v.push_back((*i)->clone());
1133 IMPL_XMLOBJECT_CLONE(RoleDescriptorType);
1134 RoleDescriptor* cloneRoleDescriptor() const {
1135 return new RoleDescriptorTypeImpl(*this);
1138 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
1141 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1142 getUnknownXMLObjects().push_back(childXMLObject);
1146 class SAML_DLLLOCAL SSODescriptorTypeImpl : public virtual SSODescriptorType, public RoleDescriptorImpl
1149 m_children.push_back(nullptr);
1150 m_children.push_back(nullptr);
1151 m_children.push_back(nullptr);
1152 m_children.push_back(nullptr);
1153 m_pos_ArtifactResolutionService=m_pos_ContactPerson;
1154 ++m_pos_ArtifactResolutionService;
1155 m_pos_SingleLogoutService=m_pos_ArtifactResolutionService;
1156 ++m_pos_SingleLogoutService;
1157 m_pos_ManageNameIDService=m_pos_SingleLogoutService;
1158 ++m_pos_ManageNameIDService;
1159 m_pos_NameIDFormat=m_pos_ManageNameIDService;
1160 ++m_pos_NameIDFormat;
1164 list<XMLObject*>::iterator m_pos_ArtifactResolutionService;
1165 list<XMLObject*>::iterator m_pos_SingleLogoutService;
1166 list<XMLObject*>::iterator m_pos_ManageNameIDService;
1167 list<XMLObject*>::iterator m_pos_NameIDFormat;
1169 SSODescriptorTypeImpl() {
1174 virtual ~SSODescriptorTypeImpl() {}
1176 SSODescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1177 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1181 SSODescriptorTypeImpl(const SSODescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1183 VectorOf(ArtifactResolutionService) v=getArtifactResolutionServices();
1184 for (vector<ArtifactResolutionService*>::const_iterator i=src.m_ArtifactResolutionServices.begin(); i!=src.m_ArtifactResolutionServices.end(); i++) {
1186 v.push_back((*i)->cloneArtifactResolutionService());
1189 VectorOf(SingleLogoutService) w=getSingleLogoutServices();
1190 for (vector<SingleLogoutService*>::const_iterator j=src.m_SingleLogoutServices.begin(); j!=src.m_SingleLogoutServices.end(); j++) {
1192 w.push_back((*j)->cloneSingleLogoutService());
1195 VectorOf(ManageNameIDService) x=getManageNameIDServices();
1196 for (vector<ManageNameIDService*>::const_iterator k=src.m_ManageNameIDServices.begin(); k!=src.m_ManageNameIDServices.end(); k++) {
1198 x.push_back((*k)->cloneManageNameIDService());
1201 VectorOf(NameIDFormat) y=getNameIDFormats();
1202 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1204 y.push_back((*m)->cloneNameIDFormat());
1209 IMPL_TYPED_CHILDREN(ArtifactResolutionService,m_pos_ArtifactResolutionService);
1210 IMPL_TYPED_CHILDREN(SingleLogoutService,m_pos_SingleLogoutService);
1211 IMPL_TYPED_CHILDREN(ManageNameIDService,m_pos_ManageNameIDService);
1212 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1215 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1216 PROC_TYPED_CHILDREN(ArtifactResolutionService,SAML20MD_NS,false);
1217 PROC_TYPED_CHILDREN(SingleLogoutService,SAML20MD_NS,false);
1218 PROC_TYPED_CHILDREN(ManageNameIDService,SAML20MD_NS,false);
1219 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1220 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1224 class SAML_DLLLOCAL IDPSSODescriptorImpl : public virtual IDPSSODescriptor, public SSODescriptorTypeImpl
1226 list<XMLObject*>::iterator m_pos_SingleSignOnService;
1227 list<XMLObject*>::iterator m_pos_NameIDMappingService;
1228 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1229 list<XMLObject*>::iterator m_pos_AttributeProfile;
1232 m_WantAuthnRequestsSigned=XML_BOOL_NULL;
1233 m_children.push_back(nullptr);
1234 m_children.push_back(nullptr);
1235 m_children.push_back(nullptr);
1236 m_children.push_back(nullptr);
1237 m_pos_SingleSignOnService=m_pos_NameIDFormat;
1238 ++m_pos_SingleSignOnService;
1239 m_pos_NameIDMappingService=m_pos_SingleSignOnService;
1240 ++m_pos_NameIDMappingService;
1241 m_pos_AssertionIDRequestService=m_pos_NameIDMappingService;
1242 ++m_pos_AssertionIDRequestService;
1243 m_pos_AttributeProfile=m_pos_AssertionIDRequestService;
1244 ++m_pos_AttributeProfile;
1248 virtual ~IDPSSODescriptorImpl() {}
1250 IDPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1251 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1255 IDPSSODescriptorImpl(const IDPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1257 WantAuthnRequestsSigned(src.m_WantAuthnRequestsSigned);
1258 VectorOf(SingleSignOnService) v=getSingleSignOnServices();
1259 for (vector<SingleSignOnService*>::const_iterator i=src.m_SingleSignOnServices.begin(); i!=src.m_SingleSignOnServices.end(); i++) {
1261 v.push_back((*i)->cloneSingleSignOnService());
1264 VectorOf(NameIDMappingService) w=getNameIDMappingServices();
1265 for (vector<NameIDMappingService*>::const_iterator j=src.m_NameIDMappingServices.begin(); j!=src.m_NameIDMappingServices.end(); j++) {
1267 w.push_back((*j)->cloneNameIDMappingService());
1270 VectorOf(AssertionIDRequestService) x=getAssertionIDRequestServices();
1271 for (vector<AssertionIDRequestService*>::const_iterator k=src.m_AssertionIDRequestServices.begin(); k!=src.m_AssertionIDRequestServices.end(); k++) {
1273 x.push_back((*k)->cloneAssertionIDRequestService());
1276 VectorOf(AttributeProfile) y=getAttributeProfiles();
1277 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1279 y.push_back((*m)->cloneAttributeProfile());
1282 VectorOf(Attribute) z=getAttributes();
1283 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1285 z.push_back((*n)->cloneAttribute());
1290 IMPL_XMLOBJECT_CLONE(IDPSSODescriptor);
1291 SSODescriptorType* cloneSSODescriptorType() const {
1292 return new IDPSSODescriptorImpl(*this);
1294 RoleDescriptor* cloneRoleDescriptor() const {
1295 return new IDPSSODescriptorImpl(*this);
1298 IMPL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned);
1299 IMPL_TYPED_CHILDREN(SingleSignOnService,m_pos_SingleSignOnService);
1300 IMPL_TYPED_CHILDREN(NameIDMappingService,m_pos_NameIDMappingService);
1301 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1302 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1303 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1305 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1306 if (!qualifiedName.hasNamespaceURI()) {
1307 if (XMLString::equals(qualifiedName.getLocalPart(),WANTAUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1308 setWantAuthnRequestsSigned(value);
1312 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1316 void marshallAttributes(DOMElement* domElement) const {
1317 MARSHALL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned,WANTAUTHNREQUESTSSIGNED,nullptr);
1318 RoleDescriptorImpl::marshallAttributes(domElement);
1321 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1322 PROC_TYPED_CHILDREN(SingleSignOnService,SAML20MD_NS,false);
1323 PROC_TYPED_CHILDREN(NameIDMappingService,SAML20MD_NS,false);
1324 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1325 PROC_TYPED_CHILDREN(AttributeProfile,SAML20MD_NS,false);
1326 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
1327 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1331 class SAML_DLLLOCAL RequestedAttributeImpl : public virtual RequestedAttribute,
1332 public AbstractComplexElement,
1333 public AbstractAttributeExtensibleXMLObject,
1334 public AbstractDOMCachingXMLObject,
1335 public AbstractXMLObjectMarshaller,
1336 public AbstractXMLObjectUnmarshaller
1339 m_Name=m_NameFormat=m_FriendlyName=nullptr;
1340 m_isRequired=XML_BOOL_NULL;
1343 virtual ~RequestedAttributeImpl() {
1344 XMLString::release(&m_Name);
1345 XMLString::release(&m_NameFormat);
1346 XMLString::release(&m_FriendlyName);
1349 RequestedAttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1350 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1354 RequestedAttributeImpl(const RequestedAttributeImpl& src)
1355 : AbstractXMLObject(src), AbstractComplexElement(src),
1356 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1358 setName(src.getName());
1359 setNameFormat(src.getNameFormat());
1360 setFriendlyName(src.getFriendlyName());
1361 isRequired(src.m_isRequired);
1362 VectorOf(XMLObject) v=getAttributeValues();
1363 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
1365 v.push_back((*i)->clone());
1370 IMPL_XMLOBJECT_CLONE(RequestedAttribute);
1371 Attribute* cloneAttribute() const {
1372 return new RequestedAttributeImpl(*this);
1375 IMPL_STRING_ATTRIB(Name);
1376 IMPL_STRING_ATTRIB(NameFormat);
1377 IMPL_STRING_ATTRIB(FriendlyName);
1378 IMPL_BOOLEAN_ATTRIB(isRequired);
1379 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
1381 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1382 if (!qualifiedName.hasNamespaceURI()) {
1383 if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) {
1387 else if (XMLString::equals(qualifiedName.getLocalPart(),NAMEFORMAT_ATTRIB_NAME)) {
1388 setNameFormat(value);
1391 else if (XMLString::equals(qualifiedName.getLocalPart(),FRIENDLYNAME_ATTRIB_NAME)) {
1392 setFriendlyName(value);
1395 else if (XMLString::equals(qualifiedName.getLocalPart(),ISREQUIRED_ATTRIB_NAME)) {
1396 setisRequired(value);
1400 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1404 void marshallAttributes(DOMElement* domElement) const {
1405 MARSHALL_STRING_ATTRIB(Name,NAME,nullptr);
1406 MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,nullptr);
1407 MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,nullptr);
1408 MARSHALL_BOOLEAN_ATTRIB(isRequired,ISREQUIRED,nullptr);
1409 marshallExtensionAttributes(domElement);
1412 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1413 getAttributeValues().push_back(childXMLObject);
1416 void processAttribute(const DOMAttr* attribute) {
1417 unmarshallExtensionAttribute(attribute);
1421 class SAML_DLLLOCAL AttributeConsumingServiceImpl : public virtual AttributeConsumingService,
1422 public AbstractComplexElement,
1423 public AbstractDOMCachingXMLObject,
1424 public AbstractXMLObjectMarshaller,
1425 public AbstractXMLObjectUnmarshaller
1427 list<XMLObject*>::iterator m_pos_ServiceDescription;
1428 list<XMLObject*>::iterator m_pos_RequestedAttribute;
1432 m_isDefault=XML_BOOL_NULL;
1433 m_children.push_back(nullptr);
1434 m_children.push_back(nullptr);
1435 m_pos_ServiceDescription=m_children.begin();
1436 m_pos_RequestedAttribute=m_pos_ServiceDescription;
1437 ++m_pos_RequestedAttribute;
1441 virtual ~AttributeConsumingServiceImpl() {
1442 XMLString::release(&m_Index);
1445 AttributeConsumingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1446 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1450 AttributeConsumingServiceImpl(const AttributeConsumingServiceImpl& src)
1451 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1453 setIndex(src.m_Index);
1454 isDefault(src.m_isDefault);
1455 VectorOf(ServiceName) v=getServiceNames();
1456 for (vector<ServiceName*>::const_iterator i=src.m_ServiceNames.begin(); i!=src.m_ServiceNames.end(); i++) {
1458 v.push_back((*i)->cloneServiceName());
1461 VectorOf(ServiceDescription) w=getServiceDescriptions();
1462 for (vector<ServiceDescription*>::const_iterator j=src.m_ServiceDescriptions.begin(); j!=src.m_ServiceDescriptions.end(); j++) {
1464 w.push_back((*j)->cloneServiceDescription());
1467 VectorOf(RequestedAttribute) x=getRequestedAttributes();
1468 for (vector<RequestedAttribute*>::const_iterator k=src.m_RequestedAttributes.begin(); k!=src.m_RequestedAttributes.end(); k++) {
1470 x.push_back((*k)->cloneRequestedAttribute());
1475 IMPL_XMLOBJECT_CLONE(AttributeConsumingService);
1476 IMPL_INTEGER_ATTRIB(Index);
1477 IMPL_BOOLEAN_ATTRIB(isDefault);
1478 IMPL_TYPED_CHILDREN(ServiceName,m_pos_ServiceDescription);
1479 IMPL_TYPED_CHILDREN(ServiceDescription,m_pos_RequestedAttribute);
1480 IMPL_TYPED_CHILDREN(RequestedAttribute,m_children.end());
1483 void marshallAttributes(DOMElement* domElement) const {
1484 MARSHALL_INTEGER_ATTRIB(Index,INDEX,nullptr);
1485 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,nullptr);
1488 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1489 PROC_TYPED_CHILDREN(ServiceName,SAML20MD_NS,false);
1490 PROC_TYPED_CHILDREN(ServiceDescription,SAML20MD_NS,false);
1491 PROC_TYPED_CHILDREN(RequestedAttribute,SAML20MD_NS,false);
1492 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1495 void processAttribute(const DOMAttr* attribute) {
1496 PROC_INTEGER_ATTRIB(Index,INDEX,nullptr);
1497 PROC_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,nullptr);
1498 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1502 class SAML_DLLLOCAL SPSSODescriptorImpl : public virtual SPSSODescriptor, public SSODescriptorTypeImpl
1504 list<XMLObject*>::iterator m_pos_AssertionConsumerService;
1507 m_AuthnRequestsSigned=XML_BOOL_NULL;
1508 m_WantAssertionsSigned=XML_BOOL_NULL;
1509 m_children.push_back(nullptr);
1510 m_pos_AssertionConsumerService=m_pos_NameIDFormat;
1511 ++m_pos_AssertionConsumerService;
1515 virtual ~SPSSODescriptorImpl() {}
1517 SPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1518 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1522 SPSSODescriptorImpl(const SPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1524 AuthnRequestsSigned(src.m_AuthnRequestsSigned);
1525 WantAssertionsSigned(src.m_WantAssertionsSigned);
1526 VectorOf(AssertionConsumerService) v=getAssertionConsumerServices();
1527 for (vector<AssertionConsumerService*>::const_iterator i=src.m_AssertionConsumerServices.begin(); i!=src.m_AssertionConsumerServices.end(); i++) {
1529 v.push_back((*i)->cloneAssertionConsumerService());
1532 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1533 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1535 w.push_back((*j)->cloneAttributeConsumingService());
1540 IMPL_XMLOBJECT_CLONE(SPSSODescriptor);
1541 SSODescriptorType* cloneSSODescriptorType() const {
1542 return cloneSPSSODescriptor();
1544 RoleDescriptor* cloneRoleDescriptor() const {
1545 return cloneSPSSODescriptor();
1548 IMPL_BOOLEAN_ATTRIB(AuthnRequestsSigned);
1549 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1550 IMPL_TYPED_CHILDREN(AssertionConsumerService,m_pos_AssertionConsumerService);
1551 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1553 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1554 if (!qualifiedName.hasNamespaceURI()) {
1555 if (XMLString::equals(qualifiedName.getLocalPart(),AUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1556 setAuthnRequestsSigned(value);
1559 else if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1560 setWantAssertionsSigned(value);
1564 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1568 void marshallAttributes(DOMElement* domElement) const {
1569 MARSHALL_BOOLEAN_ATTRIB(AuthnRequestsSigned,AUTHNREQUESTSSIGNED,nullptr);
1570 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,nullptr);
1571 RoleDescriptorImpl::marshallAttributes(domElement);
1574 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1575 PROC_TYPED_CHILDREN(AssertionConsumerService,SAML20MD_NS,false);
1576 PROC_TYPED_CHILDREN(AttributeConsumingService,SAML20MD_NS,false);
1577 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1581 class SAML_DLLLOCAL AuthnAuthorityDescriptorImpl : public virtual AuthnAuthorityDescriptor, public RoleDescriptorImpl
1583 list<XMLObject*>::iterator m_pos_AuthnQueryService;
1584 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1587 m_children.push_back(nullptr);
1588 m_children.push_back(nullptr);
1589 m_pos_AuthnQueryService=m_pos_ContactPerson;
1590 ++m_pos_AuthnQueryService;
1591 m_pos_AssertionIDRequestService=m_pos_AuthnQueryService;
1592 ++m_pos_AssertionIDRequestService;
1596 virtual ~AuthnAuthorityDescriptorImpl() {}
1598 AuthnAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1599 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1603 AuthnAuthorityDescriptorImpl(const AuthnAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1605 VectorOf(AuthnQueryService) v=getAuthnQueryServices();
1606 for (vector<AuthnQueryService*>::const_iterator i=src.m_AuthnQueryServices.begin(); i!=src.m_AuthnQueryServices.end(); i++) {
1608 v.push_back((*i)->cloneAuthnQueryService());
1611 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1612 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1614 w.push_back((*j)->cloneAssertionIDRequestService());
1617 VectorOf(NameIDFormat) x=getNameIDFormats();
1618 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1620 x.push_back((*k)->cloneNameIDFormat());
1625 IMPL_XMLOBJECT_CLONE(AuthnAuthorityDescriptor);
1626 RoleDescriptor* cloneRoleDescriptor() const {
1627 return cloneAuthnAuthorityDescriptor();
1630 IMPL_TYPED_CHILDREN(AuthnQueryService,m_pos_AuthnQueryService);
1631 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1632 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1635 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1636 PROC_TYPED_CHILDREN(AuthnQueryService,SAML20MD_NS,false);
1637 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1638 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1639 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1643 class SAML_DLLLOCAL PDPDescriptorImpl : public virtual PDPDescriptor, public RoleDescriptorImpl
1645 list<XMLObject*>::iterator m_pos_AuthzService;
1646 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1649 m_children.push_back(nullptr);
1650 m_children.push_back(nullptr);
1651 m_pos_AuthzService=m_pos_ContactPerson;
1652 ++m_pos_AuthzService;
1653 m_pos_AssertionIDRequestService=m_pos_AuthzService;
1654 ++m_pos_AssertionIDRequestService;
1658 virtual ~PDPDescriptorImpl() {}
1660 PDPDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1661 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1665 PDPDescriptorImpl(const PDPDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1667 VectorOf(AuthzService) v=getAuthzServices();
1668 for (vector<AuthzService*>::const_iterator i=src.m_AuthzServices.begin(); i!=src.m_AuthzServices.end(); i++) {
1670 v.push_back((*i)->cloneAuthzService());
1673 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1674 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1676 w.push_back((*j)->cloneAssertionIDRequestService());
1679 VectorOf(NameIDFormat) x=getNameIDFormats();
1680 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1682 x.push_back((*k)->cloneNameIDFormat());
1687 IMPL_XMLOBJECT_CLONE(PDPDescriptor);
1688 RoleDescriptor* cloneRoleDescriptor() const {
1689 return clonePDPDescriptor();
1692 IMPL_TYPED_CHILDREN(AuthzService,m_pos_AuthzService);
1693 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1694 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1697 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1698 PROC_TYPED_CHILDREN(AuthzService,SAML20MD_NS,false);
1699 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1700 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1701 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1705 class SAML_DLLLOCAL AttributeAuthorityDescriptorImpl : public virtual AttributeAuthorityDescriptor, public RoleDescriptorImpl
1707 list<XMLObject*>::iterator m_pos_AttributeService;
1708 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1709 list<XMLObject*>::iterator m_pos_NameIDFormat;
1710 list<XMLObject*>::iterator m_pos_AttributeProfile;
1713 m_children.push_back(nullptr);
1714 m_children.push_back(nullptr);
1715 m_children.push_back(nullptr);
1716 m_children.push_back(nullptr);
1717 m_pos_AttributeService=m_pos_ContactPerson;
1718 ++m_pos_AttributeService;
1719 m_pos_AssertionIDRequestService=m_pos_AttributeService;
1720 ++m_pos_AssertionIDRequestService;
1721 m_pos_NameIDFormat=m_pos_AssertionIDRequestService;
1722 ++m_pos_NameIDFormat;
1723 m_pos_AttributeProfile=m_pos_NameIDFormat;
1724 ++m_pos_AttributeProfile;
1728 virtual ~AttributeAuthorityDescriptorImpl() {}
1730 AttributeAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1731 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1735 AttributeAuthorityDescriptorImpl(const AttributeAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1737 VectorOf(AttributeService) v=getAttributeServices();
1738 for (vector<AttributeService*>::const_iterator i=src.m_AttributeServices.begin(); i!=src.m_AttributeServices.end(); i++) {
1740 v.push_back((*i)->cloneAttributeService());
1743 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1744 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1746 w.push_back((*j)->cloneAssertionIDRequestService());
1749 VectorOf(NameIDFormat) x=getNameIDFormats();
1750 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1752 x.push_back((*k)->cloneNameIDFormat());
1755 VectorOf(AttributeProfile) y=getAttributeProfiles();
1756 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1758 y.push_back((*m)->cloneAttributeProfile());
1761 VectorOf(Attribute) z=getAttributes();
1762 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1764 z.push_back((*n)->cloneAttribute());
1769 IMPL_XMLOBJECT_CLONE(AttributeAuthorityDescriptor);
1770 RoleDescriptor* cloneRoleDescriptor() const {
1771 return cloneAttributeAuthorityDescriptor();
1774 IMPL_TYPED_CHILDREN(AttributeService,m_pos_AttributeService);
1775 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1776 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1777 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1778 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1781 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1782 PROC_TYPED_CHILDREN(AttributeService,SAML20MD_NS,false);
1783 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1784 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1785 PROC_TYPED_CHILDREN(AttributeProfile,SAML20MD_NS,false);
1786 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
1787 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1791 class SAML_DLLLOCAL QueryDescriptorTypeImpl : public virtual QueryDescriptorType, public RoleDescriptorImpl
1794 m_WantAssertionsSigned=XML_BOOL_NULL;
1795 m_children.push_back(nullptr);
1796 m_pos_NameIDFormat=m_pos_ContactPerson;
1797 ++m_pos_NameIDFormat;
1801 list<XMLObject*>::iterator m_pos_NameIDFormat;
1803 QueryDescriptorTypeImpl() {
1808 virtual ~QueryDescriptorTypeImpl() {}
1810 QueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1811 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1815 QueryDescriptorTypeImpl(const QueryDescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1817 WantAssertionsSigned(src.m_WantAssertionsSigned);
1818 VectorOf(NameIDFormat) y=getNameIDFormats();
1819 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1821 y.push_back((*m)->cloneNameIDFormat());
1826 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1827 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1829 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1830 if (!qualifiedName.hasNamespaceURI()) {
1831 if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1832 setWantAssertionsSigned(value);
1836 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1840 void marshallAttributes(DOMElement* domElement) const {
1841 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,nullptr);
1842 RoleDescriptorImpl::marshallAttributes(domElement);
1845 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1846 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1847 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1851 class SAML_DLLLOCAL AuthnQueryDescriptorTypeImpl : public virtual AuthnQueryDescriptorType, public QueryDescriptorTypeImpl
1854 virtual ~AuthnQueryDescriptorTypeImpl() {}
1856 AuthnQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1857 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1859 AuthnQueryDescriptorTypeImpl(const AuthnQueryDescriptorTypeImpl& src) : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {}
1861 IMPL_XMLOBJECT_CLONE(AuthnQueryDescriptorType);
1862 QueryDescriptorType* cloneQueryDescriptorType() const {
1863 return new AuthnQueryDescriptorTypeImpl(*this);
1865 RoleDescriptor* cloneRoleDescriptor() const {
1866 return new AuthnQueryDescriptorTypeImpl(*this);
1870 class SAML_DLLLOCAL AttributeQueryDescriptorTypeImpl : public virtual AttributeQueryDescriptorType, public QueryDescriptorTypeImpl
1873 virtual ~AttributeQueryDescriptorTypeImpl() {}
1875 AttributeQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1876 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1878 AttributeQueryDescriptorTypeImpl(const AttributeQueryDescriptorTypeImpl& src)
1879 : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1880 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1881 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1883 w.push_back((*j)->cloneAttributeConsumingService());
1888 IMPL_XMLOBJECT_CLONE(AttributeQueryDescriptorType);
1889 QueryDescriptorType* cloneQueryDescriptorType() const {
1890 return new AttributeQueryDescriptorTypeImpl(*this);
1892 RoleDescriptor* cloneRoleDescriptor() const {
1893 return new AttributeQueryDescriptorTypeImpl(*this);
1896 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1899 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1900 PROC_TYPED_CHILDREN(AttributeConsumingService,SAML20MD_NS,false);
1901 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1905 class SAML_DLLLOCAL AuthzDecisionQueryDescriptorTypeImpl : public virtual AuthzDecisionQueryDescriptorType, public QueryDescriptorTypeImpl
1908 virtual ~AuthzDecisionQueryDescriptorTypeImpl() {}
1910 AuthzDecisionQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1911 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1913 AuthzDecisionQueryDescriptorTypeImpl(const AuthzDecisionQueryDescriptorTypeImpl& src)
1914 : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1915 VectorOf(ActionNamespace) w=getActionNamespaces();
1916 for (vector<ActionNamespace*>::const_iterator j=src.m_ActionNamespaces.begin(); j!=src.m_ActionNamespaces.end(); j++) {
1918 w.push_back((*j)->cloneActionNamespace());
1923 IMPL_XMLOBJECT_CLONE(AuthzDecisionQueryDescriptorType);
1924 QueryDescriptorType* cloneQueryDescriptorType() const {
1925 return new AuthzDecisionQueryDescriptorTypeImpl(*this);
1927 RoleDescriptor* cloneRoleDescriptor() const {
1928 return new AuthzDecisionQueryDescriptorTypeImpl(*this);
1931 IMPL_TYPED_CHILDREN(ActionNamespace,m_children.end());
1934 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1935 PROC_TYPED_CHILDREN(ActionNamespace,samlconstants::SAML20MD_QUERY_EXT_NS,false);
1936 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1940 class SAML_DLLLOCAL AffiliationDescriptorImpl : public virtual AffiliationDescriptor,
1941 public virtual SignableObject,
1942 public AbstractComplexElement,
1943 public AbstractAttributeExtensibleXMLObject,
1944 public AbstractDOMCachingXMLObject,
1945 public AbstractXMLObjectMarshaller,
1946 public AbstractXMLObjectUnmarshaller
1948 list<XMLObject*>::iterator m_pos_AffiliateMember;
1951 m_ID=m_AffiliationOwnerID=nullptr;
1952 m_ValidUntil=m_CacheDuration=nullptr;
1953 m_children.push_back(nullptr);
1954 m_children.push_back(nullptr);
1955 m_children.push_back(nullptr);
1956 m_Signature=nullptr;
1957 m_Extensions=nullptr;
1958 m_pos_Signature=m_children.begin();
1959 m_pos_Extensions=m_pos_Signature;
1961 m_pos_AffiliateMember=m_pos_Extensions;
1962 ++m_pos_AffiliateMember;
1966 virtual ~AffiliationDescriptorImpl() {
1967 XMLString::release(&m_ID);
1968 XMLString::release(&m_AffiliationOwnerID);
1969 delete m_ValidUntil;
1970 delete m_CacheDuration;
1973 AffiliationDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1974 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1978 AffiliationDescriptorImpl(const AffiliationDescriptorImpl& src)
1979 : AbstractXMLObject(src), AbstractComplexElement(src),
1980 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1983 setAffiliationOwnerID(src.getAffiliationOwnerID());
1984 setValidUntil(src.getValidUntil());
1985 setCacheDuration(src.getCacheDuration());
1986 if (src.getSignature())
1987 setSignature(src.getSignature()->cloneSignature());
1988 if (src.getExtensions())
1989 setExtensions(src.getExtensions()->cloneExtensions());
1991 VectorOf(KeyDescriptor) v=getKeyDescriptors();
1992 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
1994 v.push_back((*i)->cloneKeyDescriptor());
1997 VectorOf(AffiliateMember) w=getAffiliateMembers();
1998 for (vector<AffiliateMember*>::const_iterator j=src.m_AffiliateMembers.begin(); j!=src.m_AffiliateMembers.end(); j++) {
2000 w.push_back((*j)->cloneAffiliateMember());
2005 IMPL_XMLOBJECT_CLONE(AffiliationDescriptor);
2007 //IMPL_TYPED_CHILD(Signature);
2008 // Need customized setter.
2010 Signature* m_Signature;
2011 list<XMLObject*>::iterator m_pos_Signature;
2013 Signature* getSignature() const {
2017 void setSignature(Signature* sig) {
2018 prepareForAssignment(m_Signature,sig);
2019 *m_pos_Signature=m_Signature=sig;
2020 // Sync content reference back up.
2022 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2025 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
2026 IMPL_STRING_ATTRIB(AffiliationOwnerID);
2027 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2028 IMPL_DURATION_ATTRIB(CacheDuration,0);
2029 IMPL_TYPED_CHILD(Extensions);
2030 IMPL_TYPED_CHILDREN(AffiliateMember,m_pos_AffiliateMember);
2031 IMPL_TYPED_CHILDREN(KeyDescriptor,m_children.end());
2033 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
2034 if (!qualifiedName.hasNamespaceURI()) {
2035 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
2039 else if (XMLString::equals(qualifiedName.getLocalPart(),AFFILIATIONOWNERID_ATTRIB_NAME)) {
2040 setAffiliationOwnerID(value);
2043 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
2044 setValidUntil(value);
2047 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
2048 setCacheDuration(value);
2052 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
2056 void prepareForMarshalling() const {
2058 declareNonVisibleNamespaces();
2061 void marshallAttributes(DOMElement* domElement) const {
2062 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
2063 MARSHALL_STRING_ATTRIB(AffiliationOwnerID,AFFILIATIONOWNERID,nullptr);
2064 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2065 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2066 marshallExtensionAttributes(domElement);
2069 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2070 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2071 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2072 PROC_TYPED_CHILDREN(AffiliateMember,SAML20MD_NS,false);
2073 PROC_TYPED_CHILDREN(KeyDescriptor,SAML20MD_NS,false);
2074 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2077 void processAttribute(const DOMAttr* attribute) {
2078 PROC_ID_ATTRIB(ID,ID,nullptr);
2079 unmarshallExtensionAttribute(attribute);
2083 class SAML_DLLLOCAL EntityDescriptorImpl : public virtual EntityDescriptor,
2084 public virtual SignableObject,
2085 public AbstractComplexElement,
2086 public AbstractAttributeExtensibleXMLObject,
2087 public AbstractDOMCachingXMLObject,
2088 public AbstractXMLObjectMarshaller,
2089 public AbstractXMLObjectUnmarshaller
2091 list<XMLObject*>::iterator m_pos_ContactPerson;
2094 m_ID=m_EntityID=nullptr;
2095 m_ValidUntil=m_CacheDuration=nullptr;
2096 m_children.push_back(nullptr);
2097 m_children.push_back(nullptr);
2098 m_children.push_back(nullptr);
2099 m_children.push_back(nullptr);
2100 m_children.push_back(nullptr);
2101 m_Signature=nullptr;
2102 m_Extensions=nullptr;
2103 m_AffiliationDescriptor=nullptr;
2104 m_Organization=nullptr;
2105 m_pos_Signature=m_children.begin();
2106 m_pos_Extensions=m_pos_Signature;
2108 m_pos_AffiliationDescriptor=m_pos_Extensions;
2109 ++m_pos_AffiliationDescriptor;
2110 m_pos_Organization=m_pos_AffiliationDescriptor;
2111 ++m_pos_Organization;
2112 m_pos_ContactPerson=m_pos_Organization;
2113 ++m_pos_ContactPerson;
2117 virtual ~EntityDescriptorImpl() {
2118 XMLString::release(&m_ID);
2119 XMLString::release(&m_EntityID);
2120 delete m_ValidUntil;
2121 delete m_CacheDuration;
2124 EntityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2125 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2129 EntityDescriptorImpl(const EntityDescriptorImpl& src)
2130 : AbstractXMLObject(src), AbstractComplexElement(src),
2131 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
2134 setEntityID(src.getEntityID());
2135 setValidUntil(src.getValidUntil());
2136 setCacheDuration(src.getCacheDuration());
2137 if (src.getSignature())
2138 setSignature(src.getSignature()->cloneSignature());
2139 if (src.getExtensions())
2140 setExtensions(src.getExtensions()->cloneExtensions());
2141 if (src.getAffiliationDescriptor())
2142 setAffiliationDescriptor(src.getAffiliationDescriptor()->cloneAffiliationDescriptor());
2143 if (src.getOrganization())
2144 setOrganization(src.getOrganization()->cloneOrganization());
2146 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2148 IDPSSODescriptor* idp=dynamic_cast<IDPSSODescriptor*>(*i);
2150 getIDPSSODescriptors().push_back(idp->cloneIDPSSODescriptor());
2154 SPSSODescriptor* sp=dynamic_cast<SPSSODescriptor*>(*i);
2156 getSPSSODescriptors().push_back(sp->cloneSPSSODescriptor());
2160 AuthnAuthorityDescriptor* authn=dynamic_cast<AuthnAuthorityDescriptor*>(*i);
2162 getAuthnAuthorityDescriptors().push_back(authn->cloneAuthnAuthorityDescriptor());
2166 AttributeAuthorityDescriptor* attr=dynamic_cast<AttributeAuthorityDescriptor*>(*i);
2168 getAttributeAuthorityDescriptors().push_back(attr->cloneAttributeAuthorityDescriptor());
2172 PDPDescriptor* pdp=dynamic_cast<PDPDescriptor*>(*i);
2174 getPDPDescriptors().push_back(pdp->clonePDPDescriptor());
2178 AuthnQueryDescriptorType* authnq=dynamic_cast<AuthnQueryDescriptorType*>(*i);
2180 getAuthnQueryDescriptorTypes().push_back(authnq->cloneAuthnQueryDescriptorType());
2184 AttributeQueryDescriptorType* attrq=dynamic_cast<AttributeQueryDescriptorType*>(*i);
2186 getAttributeQueryDescriptorTypes().push_back(attrq->cloneAttributeQueryDescriptorType());
2190 AuthzDecisionQueryDescriptorType* authzq=dynamic_cast<AuthzDecisionQueryDescriptorType*>(*i);
2192 getAuthzDecisionQueryDescriptorTypes().push_back(authzq->cloneAuthzDecisionQueryDescriptorType());
2196 RoleDescriptor* role=dynamic_cast<RoleDescriptor*>(*i);
2198 getRoleDescriptors().push_back(role->cloneRoleDescriptor());
2204 VectorOf(ContactPerson) v=getContactPersons();
2205 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
2207 v.push_back((*j)->cloneContactPerson());
2210 VectorOf(AdditionalMetadataLocation) w=getAdditionalMetadataLocations();
2211 for (vector<AdditionalMetadataLocation*>::const_iterator k=src.m_AdditionalMetadataLocations.begin(); k!=src.m_AdditionalMetadataLocations.end(); k++) {
2213 w.push_back((*k)->cloneAdditionalMetadataLocation());
2218 IMPL_XMLOBJECT_CLONE(EntityDescriptor);
2220 //IMPL_TYPED_CHILD(Signature);
2221 // Need customized setter.
2223 Signature* m_Signature;
2224 list<XMLObject*>::iterator m_pos_Signature;
2226 Signature* getSignature() const {
2230 void setSignature(Signature* sig) {
2231 prepareForAssignment(m_Signature,sig);
2232 *m_pos_Signature=m_Signature=sig;
2233 // Sync content reference back up.
2235 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2238 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
2239 IMPL_STRING_ATTRIB(EntityID);
2240 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2241 IMPL_DURATION_ATTRIB(CacheDuration,0);
2242 IMPL_TYPED_CHILD(Extensions);
2243 IMPL_TYPED_CHILDREN(RoleDescriptor,m_pos_AffiliationDescriptor);
2244 IMPL_TYPED_CHILDREN(IDPSSODescriptor,m_pos_AffiliationDescriptor);
2245 IMPL_TYPED_CHILDREN(SPSSODescriptor,m_pos_AffiliationDescriptor);
2246 IMPL_TYPED_CHILDREN(AuthnAuthorityDescriptor,m_pos_AffiliationDescriptor);
2247 IMPL_TYPED_CHILDREN(AttributeAuthorityDescriptor,m_pos_AffiliationDescriptor);
2248 IMPL_TYPED_CHILDREN(PDPDescriptor,m_pos_AffiliationDescriptor);
2249 IMPL_TYPED_CHILDREN(AuthnQueryDescriptorType,m_pos_AffiliationDescriptor);
2250 IMPL_TYPED_CHILDREN(AttributeQueryDescriptorType,m_pos_AffiliationDescriptor);
2251 IMPL_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,m_pos_AffiliationDescriptor);
2252 IMPL_TYPED_CHILD(AffiliationDescriptor);
2253 IMPL_TYPED_CHILD(Organization);
2254 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
2255 IMPL_TYPED_CHILDREN(AdditionalMetadataLocation,m_children.end());
2257 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
2258 if (!qualifiedName.hasNamespaceURI()) {
2259 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
2263 else if (XMLString::equals(qualifiedName.getLocalPart(),ENTITYID_ATTRIB_NAME)) {
2267 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
2268 setValidUntil(value);
2271 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
2272 setCacheDuration(value);
2276 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
2279 const RoleDescriptor* getRoleDescriptor(const xmltooling::QName& qname, const XMLCh* protocol) const {
2280 // Check for "known" elements/types.
2281 if (qname == IDPSSODescriptor::ELEMENT_QNAME)
2282 return find_if(m_IDPSSODescriptors, isValidForProtocol(protocol));
2283 if (qname == SPSSODescriptor::ELEMENT_QNAME)
2284 return find_if(m_SPSSODescriptors, isValidForProtocol(protocol));
2285 if (qname == AuthnAuthorityDescriptor::ELEMENT_QNAME)
2286 return find_if(m_AuthnAuthorityDescriptors, isValidForProtocol(protocol));
2287 if (qname == AttributeAuthorityDescriptor::ELEMENT_QNAME)
2288 return find_if(m_AttributeAuthorityDescriptors, isValidForProtocol(protocol));
2289 if (qname == PDPDescriptor::ELEMENT_QNAME)
2290 return find_if(m_PDPDescriptors, isValidForProtocol(protocol));
2291 if (qname == AuthnQueryDescriptorType::TYPE_QNAME)
2292 return find_if(m_AuthnQueryDescriptorTypes, isValidForProtocol(protocol));
2293 if (qname == AttributeQueryDescriptorType::TYPE_QNAME)
2294 return find_if(m_AttributeQueryDescriptorTypes, isValidForProtocol(protocol));
2295 if (qname == AuthzDecisionQueryDescriptorType::TYPE_QNAME)
2296 return find_if(m_AuthzDecisionQueryDescriptorTypes, isValidForProtocol(protocol));
2298 vector<RoleDescriptor*>::const_iterator i =
2299 find_if(m_RoleDescriptors.begin(), m_RoleDescriptors.end(), ofTypeValidForProtocol(qname,protocol));
2300 return (i!=m_RoleDescriptors.end()) ? *i : nullptr;
2304 void prepareForMarshalling() const {
2306 declareNonVisibleNamespaces();
2309 void marshallAttributes(DOMElement* domElement) const {
2310 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
2311 MARSHALL_STRING_ATTRIB(EntityID,ENTITYID,nullptr);
2312 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2313 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2314 marshallExtensionAttributes(domElement);
2317 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2318 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2319 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2320 PROC_TYPED_CHILDREN(IDPSSODescriptor,SAML20MD_NS,false);
2321 PROC_TYPED_CHILDREN(SPSSODescriptor,SAML20MD_NS,false);
2322 PROC_TYPED_CHILDREN(AuthnAuthorityDescriptor,SAML20MD_NS,false);
2323 PROC_TYPED_CHILDREN(AttributeAuthorityDescriptor,SAML20MD_NS,false);
2324 PROC_TYPED_CHILDREN(PDPDescriptor,SAML20MD_NS,false);
2325 PROC_TYPED_CHILDREN(AuthnQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2326 PROC_TYPED_CHILDREN(AttributeQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2327 PROC_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2328 PROC_TYPED_CHILDREN(RoleDescriptor,SAML20MD_NS,false);
2329 PROC_TYPED_CHILD(AffiliationDescriptor,SAML20MD_NS,false);
2330 PROC_TYPED_CHILD(Organization,SAML20MD_NS,false);
2331 PROC_TYPED_CHILDREN(ContactPerson,SAML20MD_NS,false);
2332 PROC_TYPED_CHILDREN(AdditionalMetadataLocation,SAML20MD_NS,false);
2333 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2336 void processAttribute(const DOMAttr* attribute) {
2337 PROC_ID_ATTRIB(ID,ID,nullptr);
2338 unmarshallExtensionAttribute(attribute);
2342 class SAML_DLLLOCAL EntitiesDescriptorImpl : public virtual EntitiesDescriptor,
2343 public virtual SignableObject,
2344 public AbstractComplexElement,
2345 public AbstractDOMCachingXMLObject,
2346 public AbstractXMLObjectMarshaller,
2347 public AbstractXMLObjectUnmarshaller
2350 m_ID=m_Name=nullptr;
2351 m_ValidUntil=m_CacheDuration=nullptr;
2352 m_children.push_back(nullptr);
2353 m_children.push_back(nullptr);
2354 m_Signature=nullptr;
2355 m_Extensions=nullptr;
2356 m_pos_Signature=m_children.begin();
2357 m_pos_Extensions=m_pos_Signature;
2362 virtual ~EntitiesDescriptorImpl() {
2363 XMLString::release(&m_ID);
2364 XMLString::release(&m_Name);
2365 delete m_ValidUntil;
2366 delete m_CacheDuration;
2369 EntitiesDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2370 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2374 EntitiesDescriptorImpl(const EntitiesDescriptorImpl& src)
2375 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2378 setName(src.getName());
2379 setValidUntil(src.getValidUntil());
2380 setCacheDuration(src.getCacheDuration());
2381 if (src.getSignature())
2382 setSignature(src.getSignature()->cloneSignature());
2383 if (src.getExtensions())
2384 setExtensions(src.getExtensions()->cloneExtensions());
2386 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2388 EntityDescriptor* e=dynamic_cast<EntityDescriptor*>(*i);
2390 getEntityDescriptors().push_back(e->cloneEntityDescriptor());
2394 EntitiesDescriptor* es=dynamic_cast<EntitiesDescriptor*>(*i);
2396 getEntitiesDescriptors().push_back(es->cloneEntitiesDescriptor());
2403 IMPL_XMLOBJECT_CLONE(EntitiesDescriptor);
2405 //IMPL_TYPED_CHILD(Signature);
2406 // Need customized setter.
2408 Signature* m_Signature;
2409 list<XMLObject*>::iterator m_pos_Signature;
2411 Signature* getSignature() const {
2415 void setSignature(Signature* sig) {
2416 prepareForAssignment(m_Signature,sig);
2417 *m_pos_Signature=m_Signature=sig;
2418 // Sync content reference back up.
2420 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2423 IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
2424 IMPL_STRING_ATTRIB(Name);
2425 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2426 IMPL_DURATION_ATTRIB(CacheDuration,0);
2427 IMPL_TYPED_CHILD(Extensions);
2428 IMPL_TYPED_CHILDREN(EntityDescriptor,m_children.end());
2429 IMPL_TYPED_CHILDREN(EntitiesDescriptor,m_children.end());
2432 void prepareForMarshalling() const {
2434 declareNonVisibleNamespaces();
2437 void marshallAttributes(DOMElement* domElement) const {
2438 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
2439 MARSHALL_STRING_ATTRIB(Name,NAME,nullptr);
2440 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2441 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2444 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2445 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2446 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2447 PROC_TYPED_CHILDREN(EntityDescriptor,SAML20MD_NS,false);
2448 PROC_TYPED_CHILDREN(EntitiesDescriptor,SAML20MD_NS,false);
2449 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2452 void processAttribute(const DOMAttr* attribute) {
2453 PROC_ID_ATTRIB(ID,ID,nullptr);
2454 PROC_STRING_ATTRIB(Name,NAME,nullptr);
2455 PROC_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
2456 PROC_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
2460 class SAML_DLLLOCAL EntityAttributesImpl : public virtual EntityAttributes,
2461 public AbstractComplexElement,
2462 public AbstractDOMCachingXMLObject,
2463 public AbstractXMLObjectMarshaller,
2464 public AbstractXMLObjectUnmarshaller
2467 virtual ~EntityAttributesImpl() {}
2469 EntityAttributesImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2470 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2473 EntityAttributesImpl(const EntityAttributesImpl& src)
2474 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2475 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2477 Attribute* a=dynamic_cast<Attribute*>(*i);
2479 getAttributes().push_back(a->cloneAttribute());
2483 saml2::Assertion* as=dynamic_cast<saml2::Assertion*>(*i);
2485 getAssertions().push_back(as->cloneAssertion());
2492 IMPL_XMLOBJECT_CLONE(EntityAttributes);
2494 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
2495 IMPL_TYPED_FOREIGN_CHILDREN(Assertion,saml2,m_children.end());
2498 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2499 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
2500 PROC_TYPED_FOREIGN_CHILDREN(Assertion,saml2,SAML20_NS,false);
2501 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2507 #if defined (_MSC_VER)
2508 #pragma warning( pop )
2511 IMPL_ELEMENT_QNAME(IDPSSODescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2512 IMPL_ELEMENT_QNAME(SPSSODescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2513 IMPL_ELEMENT_QNAME(AuthnAuthorityDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2514 IMPL_ELEMENT_QNAME(AttributeAuthorityDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2515 IMPL_ELEMENT_QNAME(PDPDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2516 IMPL_TYPE_QNAME(AuthnQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2517 IMPL_TYPE_QNAME(AttributeQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2518 IMPL_TYPE_QNAME(AuthzDecisionQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2520 // Builder Implementations
2522 IMPL_XMLOBJECTBUILDER(AdditionalMetadataLocation);
2523 IMPL_XMLOBJECTBUILDER(AffiliateMember);
2524 IMPL_XMLOBJECTBUILDER(AffiliationDescriptor);
2525 IMPL_XMLOBJECTBUILDER(ArtifactResolutionService);
2526 IMPL_XMLOBJECTBUILDER(AssertionConsumerService);
2527 IMPL_XMLOBJECTBUILDER(AssertionIDRequestService);
2528 IMPL_XMLOBJECTBUILDER(AttributeAuthorityDescriptor);
2529 IMPL_XMLOBJECTBUILDER(AttributeConsumingService);
2530 IMPL_XMLOBJECTBUILDER(AttributeProfile);
2531 IMPL_XMLOBJECTBUILDER(AttributeQueryDescriptorType);
2532 IMPL_XMLOBJECTBUILDER(AttributeService);
2533 IMPL_XMLOBJECTBUILDER(AuthnAuthorityDescriptor);
2534 IMPL_XMLOBJECTBUILDER(AuthnQueryDescriptorType);
2535 IMPL_XMLOBJECTBUILDER(AuthnQueryService);
2536 IMPL_XMLOBJECTBUILDER(AuthzDecisionQueryDescriptorType);
2537 IMPL_XMLOBJECTBUILDER(AuthzService);
2538 IMPL_XMLOBJECTBUILDER(Company);
2539 IMPL_XMLOBJECTBUILDER(ContactPerson);
2540 IMPL_XMLOBJECTBUILDER(EmailAddress);
2541 IMPL_XMLOBJECTBUILDER(EndpointType);
2542 IMPL_XMLOBJECTBUILDER(EntitiesDescriptor);
2543 IMPL_XMLOBJECTBUILDER(EntityDescriptor);
2544 IMPL_XMLOBJECTBUILDER(Extensions);
2545 IMPL_XMLOBJECTBUILDER(GivenName);
2546 IMPL_XMLOBJECTBUILDER(IDPSSODescriptor);
2547 IMPL_XMLOBJECTBUILDER(IndexedEndpointType);
2548 IMPL_XMLOBJECTBUILDER(KeyDescriptor);
2549 IMPL_XMLOBJECTBUILDER(localizedNameType);
2550 IMPL_XMLOBJECTBUILDER(localizedURIType);
2551 IMPL_XMLOBJECTBUILDER(ManageNameIDService);
2552 IMPL_XMLOBJECTBUILDER(NameIDFormat);
2553 IMPL_XMLOBJECTBUILDER(NameIDMappingService);
2554 IMPL_XMLOBJECTBUILDER(Organization);
2555 IMPL_XMLOBJECTBUILDER(OrganizationName);
2556 IMPL_XMLOBJECTBUILDER(OrganizationDisplayName);
2557 IMPL_XMLOBJECTBUILDER(OrganizationURL);
2558 IMPL_XMLOBJECTBUILDER(PDPDescriptor);
2559 IMPL_XMLOBJECTBUILDER(RequestedAttribute);
2560 IMPL_XMLOBJECTBUILDER(ServiceDescription);
2561 IMPL_XMLOBJECTBUILDER(ServiceName);
2562 IMPL_XMLOBJECTBUILDER(SingleLogoutService);
2563 IMPL_XMLOBJECTBUILDER(SingleSignOnService);
2564 IMPL_XMLOBJECTBUILDER(SPSSODescriptor);
2565 IMPL_XMLOBJECTBUILDER(SurName);
2566 IMPL_XMLOBJECTBUILDER(TelephoneNumber);
2568 IMPL_XMLOBJECTBUILDER(ActionNamespace);
2569 IMPL_XMLOBJECTBUILDER(SourceID);
2570 IMPL_XMLOBJECTBUILDER(EntityAttributes);
2572 #ifdef HAVE_COVARIANT_RETURNS
2573 RoleDescriptor* RoleDescriptorBuilder::buildObject(
2575 xmltooling::XMLObject* RoleDescriptorBuilder::buildObject(
2577 const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType
2580 return new RoleDescriptorTypeImpl(nsURI,localName,prefix,schemaType);
2583 const XMLCh ActionNamespace::LOCAL_NAME[] = UNICODE_LITERAL_15(A,c,t,i,o,n,N,a,m,e,s,p,a,c,e);
2584 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);
2585 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);
2586 const XMLCh AdditionalMetadataLocation::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(n,a,m,e,s,p,a,c,e);
2587 const XMLCh AffiliateMember::LOCAL_NAME[] = UNICODE_LITERAL_15(A,f,f,i,l,i,a,t,e,M,e,m,b,e,r);
2588 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);
2589 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);
2590 const XMLCh AffiliationDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2591 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);
2592 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);
2593 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);
2594 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);
2595 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);
2596 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);
2597 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);
2598 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);
2599 const XMLCh AttributeConsumingService::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
2600 const XMLCh AttributeConsumingService::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
2601 const XMLCh AttributeProfile::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,P,r,o,f,i,l,e);
2602 const XMLCh AttributeQueryDescriptorType::LOCAL_NAME[] =UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2603 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);
2604 const XMLCh AttributeService::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,S,e,r,v,i,c,e);
2605 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);
2606 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);
2607 const XMLCh AuthnQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2608 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);
2609 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);
2610 const XMLCh AuthzDecisionQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2611 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);
2612 const XMLCh AuthzService::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,z,S,e,r,v,i,c,e);
2613 const XMLCh CacheableSAMLObject::CACHEDURATION_ATTRIB_NAME[] = UNICODE_LITERAL_13(c,a,c,h,e,D,u,r,a,t,i,o,n);
2614 const XMLCh Company::LOCAL_NAME[] = UNICODE_LITERAL_7(C,o,m,p,a,n,y);
2615 const XMLCh ContactPerson::LOCAL_NAME[] = UNICODE_LITERAL_13(C,o,n,t,a,c,t,P,e,r,s,o,n);
2616 const XMLCh ContactPerson::TYPE_NAME[] = UNICODE_LITERAL_11(C,o,n,t,a,c,t,T,y,p,e);
2617 const XMLCh ContactPerson::CONTACTTYPE_ATTRIB_NAME[] = UNICODE_LITERAL_11(c,o,n,t,a,c,t,T,y,p,e);
2618 const XMLCh ContactPerson::CONTACT_TECHNICAL[] = UNICODE_LITERAL_9(t,e,c,h,n,i,c,a,l);
2619 const XMLCh ContactPerson::CONTACT_SUPPORT[] = UNICODE_LITERAL_7(s,u,p,p,o,r,t);
2620 const XMLCh ContactPerson::CONTACT_ADMINISTRATIVE[] = UNICODE_LITERAL_14(a,d,m,i,n,i,s,t,r,a,t,i,v,e);
2621 const XMLCh ContactPerson::CONTACT_BILLING[] = UNICODE_LITERAL_7(b,i,l,l,i,n,g);
2622 const XMLCh ContactPerson::CONTACT_OTHER[] = UNICODE_LITERAL_5(o,t,h,e,r);
2623 const XMLCh EmailAddress::LOCAL_NAME[] = UNICODE_LITERAL_12(E,m,a,i,l,A,d,d,r,e,s,s);
2624 const XMLCh EndpointType::LOCAL_NAME[] = {chNull};
2625 const XMLCh EndpointType::TYPE_NAME[] = UNICODE_LITERAL_12(E,n,d,p,o,i,n,t,T,y,p,e);
2626 const XMLCh EndpointType::BINDING_ATTRIB_NAME[] = UNICODE_LITERAL_7(B,i,n,d,i,n,g);
2627 const XMLCh EndpointType::LOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_8(L,o,c,a,t,i,o,n);
2628 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);
2629 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);
2630 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);
2631 const XMLCh EntitiesDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2632 const XMLCh EntitiesDescriptor::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e);
2633 const XMLCh EntityDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,D,e,s,c,r,i,p,t,o,r);
2634 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);
2635 const XMLCh EntityDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2636 const XMLCh EntityDescriptor::ENTITYID_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,n,t,i,t,y,I,D);
2637 const XMLCh EntityAttributes::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,A,t,t,r,i,b,u,t,e,s);
2638 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);
2639 const XMLCh Extensions::LOCAL_NAME[] = UNICODE_LITERAL_10(E,x,t,e,n,s,i,o,n,s);
2640 const XMLCh Extensions::TYPE_NAME[] = UNICODE_LITERAL_14(E,x,t,e,n,s,i,o,n,s,T,y,p,e);
2641 const XMLCh GivenName::LOCAL_NAME[] = UNICODE_LITERAL_9(G,i,v,e,n,N,a,m,e);
2642 const XMLCh IDPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(I,D,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
2643 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);
2644 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);
2645 const XMLCh IndexedEndpointType::LOCAL_NAME[] = {chNull};
2646 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);
2647 const XMLCh IndexedEndpointType::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
2648 const XMLCh IndexedEndpointType::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
2649 const XMLCh KeyDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(K,e,y,D,e,s,c,r,i,p,t,o,r);
2650 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);
2651 const XMLCh KeyDescriptor::USE_ATTRIB_NAME[] = UNICODE_LITERAL_3(u,s,e);
2652 const XMLCh KeyDescriptor::KEYTYPE_ENCRYPTION[] = UNICODE_LITERAL_10(e,n,c,r,y,p,t,i,o,n);
2653 const XMLCh KeyDescriptor::KEYTYPE_SIGNING[] = UNICODE_LITERAL_7(s,i,g,n,i,n,g);
2654 const XMLCh localizedNameType::LOCAL_NAME[] = {chNull};
2655 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);
2656 const XMLCh localizedNameType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2657 const XMLCh localizedURIType::LOCAL_NAME[] = {chNull};
2658 const XMLCh localizedURIType::TYPE_NAME[] = UNICODE_LITERAL_16(l,o,c,a,l,i,z,e,d,U,R,I,T,y,p,e);
2659 const XMLCh localizedURIType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2660 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);
2661 const XMLCh NameIDFormat::LOCAL_NAME[] = UNICODE_LITERAL_12(N,a,m,e,I,D,F,o,r,m,a,t);
2662 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);
2663 const XMLCh Organization::LOCAL_NAME[] = UNICODE_LITERAL_12(O,r,g,a,n,i,z,a,t,i,o,n);
2664 const XMLCh Organization::TYPE_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,T,y,p,e);
2665 const XMLCh OrganizationName::LOCAL_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,N,a,m,e);
2666 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);
2667 const XMLCh OrganizationURL::LOCAL_NAME[] = UNICODE_LITERAL_15(O,r,g,a,n,i,z,a,t,i,o,n,U,R,L);
2668 const XMLCh PDPDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(P,D,P,D,e,s,c,r,i,p,t,o,r);
2669 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);
2670 const XMLCh QueryDescriptorType::LOCAL_NAME[] = {chNull};
2671 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);
2672 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);
2673 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);
2674 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);
2675 const XMLCh RequestedAttribute::ISREQUIRED_ATTRIB_NAME[] = UNICODE_LITERAL_10(i,s,R,e,q,u,i,r,e,d);
2676 const XMLCh RoleDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2677 const XMLCh RoleDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2678 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);
2679 const XMLCh RoleDescriptor::ERRORURL_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,r,r,o,r,U,R,L);
2680 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);
2681 const XMLCh ServiceName::LOCAL_NAME[] = UNICODE_LITERAL_11(S,e,r,v,i,c,e,N,a,m,e);
2682 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);
2683 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);
2684 const XMLCh SourceID::LOCAL_NAME[] = UNICODE_LITERAL_8(S,o,u,r,c,e,I,D);
2685 const XMLCh SPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_15(S,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
2686 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);
2687 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);
2688 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);
2689 const XMLCh SSODescriptorType::LOCAL_NAME[] = {chNull};
2690 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);
2691 const XMLCh SurName::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,r,N,a,m,e);
2692 const XMLCh TelephoneNumber::LOCAL_NAME[] = UNICODE_LITERAL_15(T,e,l,e,p,h,o,n,e,N,u,m,b,e,r);
2693 const XMLCh TimeBoundSAMLObject::VALIDUNTIL_ATTRIB_NAME[] = UNICODE_LITERAL_10(v,a,l,i,d,U,n,t,i,l);