2 * Copyright 2001-2009 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/XMLHelper.h>
39 #include <xercesc/util/XMLUniDefs.hpp>
40 #include <xsec/framework/XSECDefs.hpp>
42 using namespace samlconstants;
43 using namespace opensaml::saml2md;
44 using namespace opensaml::saml2;
45 using namespace xmlencryption;
46 using namespace xmlsignature;
47 using namespace xmltooling;
49 using xmlconstants::XMLSIG_NS;
50 using xmlconstants::XML_BOOL_NULL;
52 #if defined (_MSC_VER)
53 #pragma warning( push )
54 #pragma warning( disable : 4250 4251 )
60 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AffiliateMember);
61 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AttributeProfile);
62 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Company);
63 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,EmailAddress);
64 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,GivenName);
65 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,NameIDFormat);
66 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,SurName);
67 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,TelephoneNumber);
69 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,ActionNamespace);
70 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,SourceID);
72 class SAML_DLLLOCAL localizedNameTypeImpl : public virtual localizedNameType,
73 public AbstractSimpleElement,
74 public AbstractDOMCachingXMLObject,
75 public AbstractXMLObjectMarshaller,
76 public AbstractXMLObjectUnmarshaller
84 localizedNameTypeImpl() {
89 virtual ~localizedNameTypeImpl() {
90 XMLString::release(&m_Lang);
91 XMLString::release(&m_LangPrefix);
94 localizedNameTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
95 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
99 localizedNameTypeImpl(const localizedNameTypeImpl& src)
100 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
102 setLang(src.getLang());
103 if (src.m_LangPrefix)
104 m_LangPrefix = XMLString::replicate(src.m_LangPrefix);
107 IMPL_XMLOBJECT_CLONE(localizedNameType);
108 IMPL_XMLOBJECT_FOREIGN_ATTRIB(Lang,XMLCh);
111 void marshallAttributes(DOMElement* domElement) const {
112 if (m_Lang && *m_Lang) {
113 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(xmlconstants::XML_NS,LANG_ATTRIB_NAME);
114 if (m_LangPrefix && *m_LangPrefix)
115 attr->setPrefix(m_LangPrefix);
116 attr->setNodeValue(m_Lang);
117 domElement->setAttributeNodeNS(attr);
121 void processAttribute(const DOMAttr* attribute) {
122 if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
123 setLang(attribute->getValue());
124 const XMLCh* temp = attribute->getPrefix();
125 if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
126 m_LangPrefix = XMLString::replicate(temp);
129 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
133 class SAML_DLLLOCAL localizedURITypeImpl : public virtual localizedURIType,
134 public AbstractSimpleElement,
135 public AbstractDOMCachingXMLObject,
136 public AbstractXMLObjectMarshaller,
137 public AbstractXMLObjectUnmarshaller
145 localizedURITypeImpl() {
150 virtual ~localizedURITypeImpl() {
151 XMLString::release(&m_Lang);
152 XMLString::release(&m_LangPrefix);
155 localizedURITypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
156 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
160 localizedURITypeImpl(const localizedURITypeImpl& src)
161 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
163 setLang(src.getLang());
164 if (src.m_LangPrefix)
165 m_LangPrefix = XMLString::replicate(src.m_LangPrefix);
168 IMPL_XMLOBJECT_CLONE(localizedURIType);
169 IMPL_XMLOBJECT_FOREIGN_ATTRIB(Lang,XMLCh);
172 void marshallAttributes(DOMElement* domElement) const {
173 if (m_Lang && *m_Lang) {
174 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(xmlconstants::XML_NS,LANG_ATTRIB_NAME);
175 if (m_LangPrefix && *m_LangPrefix)
176 attr->setPrefix(m_LangPrefix);
177 attr->setNodeValue(m_Lang);
178 domElement->setAttributeNodeNS(attr);
182 void processAttribute(const DOMAttr* attribute) {
183 if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
184 setLang(attribute->getValue());
185 const XMLCh* temp = attribute->getPrefix();
186 if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
187 m_LangPrefix = XMLString::replicate(temp);
190 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
194 class SAML_DLLLOCAL OrganizationNameImpl : public virtual OrganizationName, public localizedNameTypeImpl
197 virtual ~OrganizationNameImpl() {}
199 OrganizationNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
200 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
202 OrganizationNameImpl(const OrganizationNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
204 IMPL_XMLOBJECT_CLONE(OrganizationName);
205 localizedNameType* clonelocalizedNameType() const {
206 return new OrganizationNameImpl(*this);
210 class SAML_DLLLOCAL OrganizationDisplayNameImpl : public virtual OrganizationDisplayName, public localizedNameTypeImpl
213 virtual ~OrganizationDisplayNameImpl() {}
215 OrganizationDisplayNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
216 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
218 OrganizationDisplayNameImpl(const OrganizationDisplayNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
220 IMPL_XMLOBJECT_CLONE(OrganizationDisplayName);
221 localizedNameType* clonelocalizedNameType() const {
222 return new OrganizationDisplayNameImpl(*this);
226 class SAML_DLLLOCAL OrganizationURLImpl : public virtual OrganizationURL, public localizedURITypeImpl
229 virtual ~OrganizationURLImpl() {}
231 OrganizationURLImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
232 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
234 OrganizationURLImpl(const OrganizationURLImpl& src) : AbstractXMLObject(src), localizedURITypeImpl(src) {}
236 IMPL_XMLOBJECT_CLONE(OrganizationURL);
237 localizedURIType* clonelocalizedURIType() const {
238 return new OrganizationURLImpl(*this);
242 class SAML_DLLLOCAL ServiceNameImpl : public virtual ServiceName, public localizedNameTypeImpl
245 virtual ~ServiceNameImpl() {}
247 ServiceNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
248 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
250 ServiceNameImpl(const ServiceNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
252 IMPL_XMLOBJECT_CLONE(ServiceName);
253 localizedNameType* clonelocalizedNameType() const {
254 return new ServiceNameImpl(*this);
258 class SAML_DLLLOCAL ServiceDescriptionImpl : public virtual ServiceDescription, public localizedNameTypeImpl
261 virtual ~ServiceDescriptionImpl() {}
263 ServiceDescriptionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
264 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
266 ServiceDescriptionImpl(const ServiceDescriptionImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
268 IMPL_XMLOBJECT_CLONE(ServiceDescription);
269 localizedNameType* clonelocalizedNameType() const {
270 return new ServiceDescriptionImpl(*this);
274 class SAML_DLLLOCAL ExtensionsImpl : public virtual Extensions,
275 public AbstractComplexElement,
276 public AbstractDOMCachingXMLObject,
277 public AbstractXMLObjectMarshaller,
278 public AbstractXMLObjectUnmarshaller
281 virtual ~ExtensionsImpl() {}
283 ExtensionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
284 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
287 ExtensionsImpl(const ExtensionsImpl& src)
288 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
289 VectorOf(XMLObject) v=getUnknownXMLObjects();
290 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
291 v.push_back((*i)->clone());
294 IMPL_XMLOBJECT_CLONE(Extensions);
295 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
298 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
300 const XMLCh* nsURI=root->getNamespaceURI();
301 if (!XMLString::equals(nsURI,SAML20MD_NS) && nsURI && *nsURI) {
302 getUnknownXMLObjects().push_back(childXMLObject);
306 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
310 class SAML_DLLLOCAL OrganizationImpl : public virtual Organization,
311 public AbstractComplexElement,
312 public AbstractAttributeExtensibleXMLObject,
313 public AbstractDOMCachingXMLObject,
314 public AbstractXMLObjectMarshaller,
315 public AbstractXMLObjectUnmarshaller
317 list<XMLObject*>::iterator m_pos_OrganizationDisplayName;
318 list<XMLObject*>::iterator m_pos_OrganizationURL;
321 m_children.push_back(NULL);
322 m_children.push_back(NULL);
323 m_children.push_back(NULL);
325 m_pos_Extensions=m_children.begin();
326 m_pos_OrganizationDisplayName=m_pos_Extensions;
327 ++m_pos_OrganizationDisplayName;
328 m_pos_OrganizationURL=m_pos_OrganizationDisplayName;
329 ++m_pos_OrganizationURL;
332 virtual ~OrganizationImpl() {}
334 OrganizationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
335 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
339 OrganizationImpl(const OrganizationImpl& src)
340 : AbstractXMLObject(src), AbstractComplexElement(src),
341 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
343 if (src.getExtensions())
344 setExtensions(src.getExtensions()->cloneExtensions());
345 VectorOf(OrganizationName) v=getOrganizationNames();
346 for (vector<OrganizationName*>::const_iterator i=src.m_OrganizationNames.begin(); i!=src.m_OrganizationNames.end(); i++) {
348 v.push_back((*i)->cloneOrganizationName());
351 VectorOf(OrganizationDisplayName) w=getOrganizationDisplayNames();
352 for (vector<OrganizationDisplayName*>::const_iterator j=src.m_OrganizationDisplayNames.begin(); j!=src.m_OrganizationDisplayNames.end(); j++) {
354 w.push_back((*j)->cloneOrganizationDisplayName());
357 VectorOf(OrganizationURL) x=getOrganizationURLs();
358 for (vector<OrganizationURL*>::const_iterator k=src.m_OrganizationURLs.begin(); k!=src.m_OrganizationURLs.end(); k++) {
360 x.push_back((*k)->cloneOrganizationURL());
365 IMPL_XMLOBJECT_CLONE(Organization);
366 IMPL_TYPED_CHILD(Extensions);
367 IMPL_TYPED_CHILDREN(OrganizationName,m_pos_OrganizationDisplayName);
368 IMPL_TYPED_CHILDREN(OrganizationDisplayName,m_pos_OrganizationURL);
369 IMPL_TYPED_CHILDREN(OrganizationURL,m_children.end());
372 void marshallAttributes(DOMElement* domElement) const {
373 marshallExtensionAttributes(domElement);
376 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
377 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
378 PROC_TYPED_CHILDREN(OrganizationName,SAML20MD_NS,false);
379 PROC_TYPED_CHILDREN(OrganizationDisplayName,SAML20MD_NS,false);
380 PROC_TYPED_CHILDREN(OrganizationURL,SAML20MD_NS,false);
381 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
384 void processAttribute(const DOMAttr* attribute) {
385 unmarshallExtensionAttribute(attribute);
389 class SAML_DLLLOCAL ContactPersonImpl : public virtual ContactPerson,
390 public AbstractComplexElement,
391 public AbstractAttributeExtensibleXMLObject,
392 public AbstractDOMCachingXMLObject,
393 public AbstractXMLObjectMarshaller,
394 public AbstractXMLObjectUnmarshaller
396 list<XMLObject*>::iterator m_pos_TelephoneNumber;
400 m_children.push_back(NULL);
401 m_children.push_back(NULL);
402 m_children.push_back(NULL);
403 m_children.push_back(NULL);
404 m_children.push_back(NULL);
409 m_pos_Extensions=m_children.begin();
410 m_pos_Company=m_pos_Extensions;
412 m_pos_GivenName=m_pos_Company;
414 m_pos_SurName=m_pos_GivenName;
416 m_pos_TelephoneNumber=m_pos_SurName;
417 ++m_pos_TelephoneNumber;
420 virtual ~ContactPersonImpl() {
421 XMLString::release(&m_ContactType);
424 ContactPersonImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
425 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
429 ContactPersonImpl(const ContactPersonImpl& src)
430 : AbstractXMLObject(src), AbstractComplexElement(src),
431 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
433 if (src.getExtensions())
434 setExtensions(src.getExtensions()->cloneExtensions());
435 if (src.getCompany())
436 setCompany(src.getCompany()->cloneCompany());
437 if (src.getGivenName())
438 setGivenName(src.getGivenName()->cloneGivenName());
439 if (src.getSurName())
440 setSurName(src.getSurName()->cloneSurName());
442 VectorOf(EmailAddress) v=getEmailAddresss();
443 for (vector<EmailAddress*>::const_iterator i=src.m_EmailAddresss.begin(); i!=src.m_EmailAddresss.end(); i++) {
445 v.push_back((*i)->cloneEmailAddress());
448 VectorOf(TelephoneNumber) w=getTelephoneNumbers();
449 for (vector<TelephoneNumber*>::const_iterator j=src.m_TelephoneNumbers.begin(); j!=src.m_TelephoneNumbers.end(); j++) {
451 w.push_back((*j)->cloneTelephoneNumber());
456 IMPL_XMLOBJECT_CLONE(ContactPerson);
457 IMPL_STRING_ATTRIB(ContactType);
458 IMPL_TYPED_CHILD(Extensions);
459 IMPL_TYPED_CHILD(Company);
460 IMPL_TYPED_CHILD(GivenName);
461 IMPL_TYPED_CHILD(SurName);
462 IMPL_TYPED_CHILDREN(EmailAddress,m_pos_TelephoneNumber);
463 IMPL_TYPED_CHILDREN(TelephoneNumber,m_children.end());
465 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
466 if (!qualifiedName.hasNamespaceURI()) {
467 if (XMLString::equals(qualifiedName.getLocalPart(),CONTACTTYPE_ATTRIB_NAME)) {
468 setContactType(value);
472 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
476 void marshallAttributes(DOMElement* domElement) const {
477 MARSHALL_STRING_ATTRIB(ContactType,CONTACTTYPE,NULL);
478 marshallExtensionAttributes(domElement);
481 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
482 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
483 PROC_TYPED_CHILD(Company,SAML20MD_NS,false);
484 PROC_TYPED_CHILD(GivenName,SAML20MD_NS,false);
485 PROC_TYPED_CHILD(SurName,SAML20MD_NS,false);
486 PROC_TYPED_CHILDREN(EmailAddress,SAML20MD_NS,false);
487 PROC_TYPED_CHILDREN(TelephoneNumber,SAML20MD_NS,false);
488 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
491 void processAttribute(const DOMAttr* attribute) {
492 unmarshallExtensionAttribute(attribute);
496 class SAML_DLLLOCAL AdditionalMetadataLocationImpl : public virtual AdditionalMetadataLocation,
497 public AbstractSimpleElement,
498 public AbstractDOMCachingXMLObject,
499 public AbstractXMLObjectMarshaller,
500 public AbstractXMLObjectUnmarshaller
507 virtual ~AdditionalMetadataLocationImpl() {
508 XMLString::release(&m_Namespace);
511 AdditionalMetadataLocationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
512 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
516 AdditionalMetadataLocationImpl(const AdditionalMetadataLocationImpl& src)
517 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
521 IMPL_XMLOBJECT_CLONE(AdditionalMetadataLocation);
522 IMPL_STRING_ATTRIB(Namespace);
525 void marshallAttributes(DOMElement* domElement) const {
526 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
529 void processAttribute(const DOMAttr* attribute) {
530 PROC_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
531 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
535 class SAML_DLLLOCAL KeyDescriptorImpl : public virtual KeyDescriptor,
536 public AbstractComplexElement,
537 public AbstractDOMCachingXMLObject,
538 public AbstractXMLObjectMarshaller,
539 public AbstractXMLObjectUnmarshaller
544 m_children.push_back(NULL);
545 m_pos_KeyInfo=m_children.begin();
548 virtual ~KeyDescriptorImpl() {
549 XMLString::release(&m_Use);
552 KeyDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
553 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
557 KeyDescriptorImpl(const KeyDescriptorImpl& src)
558 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
560 setUse(src.getUse());
561 if (src.getKeyInfo())
562 setKeyInfo(src.getKeyInfo()->cloneKeyInfo());
563 VectorOf(EncryptionMethod) v=getEncryptionMethods();
564 for (vector<EncryptionMethod*>::const_iterator i=src.m_EncryptionMethods.begin(); i!=src.m_EncryptionMethods.end(); i++) {
566 v.push_back((*i)->cloneEncryptionMethod());
571 IMPL_XMLOBJECT_CLONE(KeyDescriptor);
572 IMPL_STRING_ATTRIB(Use);
573 IMPL_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature);
574 IMPL_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,m_children.end());
577 void marshallAttributes(DOMElement* domElement) const {
578 MARSHALL_STRING_ATTRIB(Use,USE,NULL);
581 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
582 PROC_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature,XMLSIG_NS,false);
583 PROC_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,SAML20MD_NS,false);
584 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
587 void processAttribute(const DOMAttr* attribute) {
588 PROC_STRING_ATTRIB(Use,USE,NULL);
589 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
593 class SAML_DLLLOCAL EndpointTypeImpl : public virtual EndpointType,
594 public AbstractAttributeExtensibleXMLObject,
595 public AbstractComplexElement,
596 public AbstractDOMCachingXMLObject,
597 public AbstractXMLObjectMarshaller,
598 public AbstractXMLObjectUnmarshaller
601 m_Binding=m_Location=m_ResponseLocation=NULL;
610 virtual ~EndpointTypeImpl() {
611 XMLString::release(&m_Binding);
612 XMLString::release(&m_Location);
613 XMLString::release(&m_ResponseLocation);
616 EndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
617 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
620 EndpointTypeImpl(const EndpointTypeImpl& src)
621 : AbstractXMLObject(src),
622 AbstractAttributeExtensibleXMLObject(src),
623 AbstractComplexElement(src),
624 AbstractDOMCachingXMLObject(src) {
625 setBinding(src.getBinding());
626 setLocation(src.getLocation());
627 setResponseLocation(src.getResponseLocation());
628 VectorOf(XMLObject) v=getUnknownXMLObjects();
629 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
630 v.push_back((*i)->clone());
633 IMPL_XMLOBJECT_CLONE(EndpointType);
634 IMPL_STRING_ATTRIB(Binding);
635 IMPL_STRING_ATTRIB(Location);
636 IMPL_STRING_ATTRIB(ResponseLocation);
637 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
639 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
640 if (!qualifiedName.hasNamespaceURI()) {
641 if (XMLString::equals(qualifiedName.getLocalPart(),BINDING_ATTRIB_NAME)) {
645 else if (XMLString::equals(qualifiedName.getLocalPart(),LOCATION_ATTRIB_NAME)) {
649 else if (XMLString::equals(qualifiedName.getLocalPart(),RESPONSELOCATION_ATTRIB_NAME)) {
650 setResponseLocation(value);
654 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
657 void marshallAttributes(DOMElement* domElement) const {
658 MARSHALL_STRING_ATTRIB(Binding,BINDING,NULL);
659 MARSHALL_STRING_ATTRIB(Location,LOCATION,NULL);
660 MARSHALL_STRING_ATTRIB(ResponseLocation,RESPONSELOCATION,NULL);
661 marshallExtensionAttributes(domElement);
664 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
666 const XMLCh* nsURI=root->getNamespaceURI();
667 if (!XMLString::equals(nsURI,SAML20MD_NS) && nsURI && *nsURI) {
668 getUnknownXMLObjects().push_back(childXMLObject);
671 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
674 void processAttribute(const DOMAttr* attribute) {
675 unmarshallExtensionAttribute(attribute);
679 class SAML_DLLLOCAL IndexedEndpointTypeImpl : public virtual IndexedEndpointType, public EndpointTypeImpl
683 m_isDefault=XML_BOOL_NULL;
687 IndexedEndpointTypeImpl() {
691 virtual ~IndexedEndpointTypeImpl() {
692 XMLString::release(&m_Index);
695 IndexedEndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
696 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
698 IndexedEndpointTypeImpl(const IndexedEndpointTypeImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {
699 setIndex(src.m_Index);
700 isDefault(src.m_isDefault);
703 IMPL_XMLOBJECT_CLONE(IndexedEndpointType);
704 EndpointType* cloneEndpointType() const {
705 return new IndexedEndpointTypeImpl(*this);
708 IMPL_INTEGER_ATTRIB(Index);
709 IMPL_BOOLEAN_ATTRIB(isDefault);
711 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
712 if (!qualifiedName.hasNamespaceURI()) {
713 if (XMLString::equals(qualifiedName.getLocalPart(),INDEX_ATTRIB_NAME)) {
717 else if (XMLString::equals(qualifiedName.getLocalPart(),ISDEFAULT_ATTRIB_NAME)) {
722 EndpointTypeImpl::setAttribute(qualifiedName, value, ID);
726 void marshallAttributes(DOMElement* domElement) const {
727 MARSHALL_INTEGER_ATTRIB(Index,INDEX,NULL);
728 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
729 EndpointTypeImpl::marshallAttributes(domElement);
733 class SAML_DLLLOCAL ArtifactResolutionServiceImpl : public virtual ArtifactResolutionService, public IndexedEndpointTypeImpl
736 virtual ~ArtifactResolutionServiceImpl() {}
738 ArtifactResolutionServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
739 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
741 ArtifactResolutionServiceImpl(const ArtifactResolutionServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
743 IMPL_XMLOBJECT_CLONE(ArtifactResolutionService);
744 IndexedEndpointType* cloneIndexedEndpointType() const {
745 return new ArtifactResolutionServiceImpl(*this);
747 EndpointType* cloneEndpointType() const {
748 return new ArtifactResolutionServiceImpl(*this);
752 class SAML_DLLLOCAL SingleLogoutServiceImpl : public virtual SingleLogoutService, public EndpointTypeImpl
755 virtual ~SingleLogoutServiceImpl() {}
757 SingleLogoutServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
758 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
760 SingleLogoutServiceImpl(const SingleLogoutServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
762 IMPL_XMLOBJECT_CLONE(SingleLogoutService);
763 EndpointType* cloneEndpointType() const {
764 return new SingleLogoutServiceImpl(*this);
768 class SAML_DLLLOCAL ManageNameIDServiceImpl : public virtual ManageNameIDService, public EndpointTypeImpl
771 virtual ~ManageNameIDServiceImpl() {}
773 ManageNameIDServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
774 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
776 ManageNameIDServiceImpl(const ManageNameIDServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
778 IMPL_XMLOBJECT_CLONE(ManageNameIDService);
779 EndpointType* cloneEndpointType() const {
780 return new ManageNameIDServiceImpl(*this);
784 class SAML_DLLLOCAL SingleSignOnServiceImpl : public virtual SingleSignOnService, public EndpointTypeImpl
787 virtual ~SingleSignOnServiceImpl() {}
789 SingleSignOnServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
790 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
792 SingleSignOnServiceImpl(const SingleSignOnServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
794 IMPL_XMLOBJECT_CLONE(SingleSignOnService);
795 EndpointType* cloneEndpointType() const {
796 return new SingleSignOnServiceImpl(*this);
800 class SAML_DLLLOCAL NameIDMappingServiceImpl : public virtual NameIDMappingService, public EndpointTypeImpl
803 virtual ~NameIDMappingServiceImpl() {}
805 NameIDMappingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
806 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
808 NameIDMappingServiceImpl(const NameIDMappingServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
810 IMPL_XMLOBJECT_CLONE(NameIDMappingService);
811 EndpointType* cloneEndpointType() const {
812 return new NameIDMappingServiceImpl(*this);
816 class SAML_DLLLOCAL AssertionIDRequestServiceImpl : public virtual AssertionIDRequestService, public EndpointTypeImpl
819 virtual ~AssertionIDRequestServiceImpl() {}
821 AssertionIDRequestServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
822 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
824 AssertionIDRequestServiceImpl(const AssertionIDRequestServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
826 IMPL_XMLOBJECT_CLONE(AssertionIDRequestService);
827 EndpointType* cloneEndpointType() const {
828 return new AssertionIDRequestServiceImpl(*this);
832 class SAML_DLLLOCAL AssertionConsumerServiceImpl : public virtual AssertionConsumerService, public IndexedEndpointTypeImpl
835 virtual ~AssertionConsumerServiceImpl() {}
837 AssertionConsumerServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
838 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
840 AssertionConsumerServiceImpl(const AssertionConsumerServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
842 IMPL_XMLOBJECT_CLONE(AssertionConsumerService);
843 EndpointType* cloneEndpointType() const {
844 return new AssertionConsumerServiceImpl(*this);
846 IndexedEndpointType* cloneIndexedEndpointType() const {
847 return new AssertionConsumerServiceImpl(*this);
851 class SAML_DLLLOCAL AuthnQueryServiceImpl : public virtual AuthnQueryService, public EndpointTypeImpl
854 virtual ~AuthnQueryServiceImpl() {}
856 AuthnQueryServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
857 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
859 AuthnQueryServiceImpl(const AuthnQueryServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
861 IMPL_XMLOBJECT_CLONE(AuthnQueryService);
862 EndpointType* cloneEndpointType() const {
863 return new AuthnQueryServiceImpl(*this);
867 class SAML_DLLLOCAL AuthzServiceImpl : public virtual AuthzService, public EndpointTypeImpl
870 virtual ~AuthzServiceImpl() {}
872 AuthzServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
873 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
875 AuthzServiceImpl(const AuthzServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
877 IMPL_XMLOBJECT_CLONE(AuthzService);
878 EndpointType* cloneEndpointType() const {
879 return new AuthzServiceImpl(*this);
883 class SAML_DLLLOCAL AttributeServiceImpl : public virtual AttributeService, public EndpointTypeImpl
886 virtual ~AttributeServiceImpl() {}
888 AttributeServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
889 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
891 AttributeServiceImpl(const AttributeServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
893 IMPL_XMLOBJECT_CLONE(AttributeService);
894 EndpointType* cloneEndpointType() const {
895 return new AttributeServiceImpl(*this);
899 class SAML_DLLLOCAL RoleDescriptorImpl : public virtual RoleDescriptor,
900 public virtual SignableObject,
901 public AbstractComplexElement,
902 public AbstractAttributeExtensibleXMLObject,
903 public AbstractDOMCachingXMLObject,
904 public AbstractXMLObjectMarshaller,
905 public AbstractXMLObjectUnmarshaller
908 m_ID=m_ProtocolSupportEnumeration=m_ErrorURL=NULL;
909 m_ValidUntil=m_CacheDuration=NULL;
910 m_children.push_back(NULL);
911 m_children.push_back(NULL);
912 m_children.push_back(NULL);
913 m_children.push_back(NULL);
917 m_pos_Signature=m_children.begin();
918 m_pos_Extensions=m_pos_Signature;
920 m_pos_Organization=m_pos_Extensions;
921 ++m_pos_Organization;
922 m_pos_ContactPerson=m_pos_Organization;
923 ++m_pos_ContactPerson;
927 list<XMLObject*>::iterator m_pos_ContactPerson;
929 RoleDescriptorImpl() {
934 virtual ~RoleDescriptorImpl() {
935 XMLString::release(&m_ID);
936 XMLString::release(&m_ProtocolSupportEnumeration);
937 XMLString::release(&m_ErrorURL);
939 delete m_CacheDuration;
942 RoleDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
943 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
947 RoleDescriptorImpl(const RoleDescriptorImpl& src)
948 : AbstractXMLObject(src), AbstractComplexElement(src),
949 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
952 setProtocolSupportEnumeration(src.getProtocolSupportEnumeration());
953 setErrorURL(src.getErrorURL());
954 setValidUntil(src.getValidUntil());
955 setCacheDuration(src.getCacheDuration());
956 if (src.getSignature())
957 setSignature(src.getSignature()->cloneSignature());
958 if (src.getExtensions())
959 setExtensions(src.getExtensions()->cloneExtensions());
960 if (src.getOrganization())
961 setOrganization(src.getOrganization()->cloneOrganization());
963 VectorOf(KeyDescriptor) v=getKeyDescriptors();
964 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
966 v.push_back((*i)->cloneKeyDescriptor());
969 VectorOf(ContactPerson) w=getContactPersons();
970 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
972 w.push_back((*j)->cloneContactPerson());
977 //IMPL_TYPED_CHILD(Signature);
978 // Need customized setter.
980 Signature* m_Signature;
981 list<XMLObject*>::iterator m_pos_Signature;
983 Signature* getSignature() const {
987 void setSignature(Signature* sig) {
988 prepareForAssignment(m_Signature,sig);
989 *m_pos_Signature=m_Signature=sig;
990 // Sync content reference back up.
992 m_Signature->setContentReference(new opensaml::ContentReference(*this));
996 IMPL_STRING_ATTRIB(ProtocolSupportEnumeration);
997 IMPL_STRING_ATTRIB(ErrorURL);
998 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
999 IMPL_DURATION_ATTRIB(CacheDuration,0);
1000 IMPL_TYPED_CHILD(Extensions);
1001 IMPL_TYPED_CHILDREN(KeyDescriptor,m_pos_Organization);
1002 IMPL_TYPED_CHILD(Organization);
1003 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
1005 bool hasSupport(const XMLCh* protocol) const {
1006 if (!protocol || !*protocol)
1008 if (m_ProtocolSupportEnumeration) {
1009 // Look for first character.
1010 xsecsize_t len=XMLString::stringLen(protocol);
1012 int index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
1014 // Only possible match is if it's the first character or a space comes before it.
1015 if (index==0 || m_ProtocolSupportEnumeration[index-1]==chSpace) {
1016 // See if rest of protocol string is present.
1017 if (0==XMLString::compareNString(m_ProtocolSupportEnumeration+index+1,protocol+1,len-1)) {
1018 // Only possible match is if it's the last character or a space comes after it.
1019 if (m_ProtocolSupportEnumeration[index+len]==chNull || m_ProtocolSupportEnumeration[index+len]==chSpace)
1025 // Move past last search and start again.
1030 // Move past last search and start again.
1033 index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
1039 void addSupport(const XMLCh* protocol) {
1040 if (hasSupport(protocol))
1042 if (m_ProtocolSupportEnumeration && *m_ProtocolSupportEnumeration) {
1043 #ifdef HAVE_GOOD_STL
1044 xstring pse(m_ProtocolSupportEnumeration);
1045 pse = pse + chSpace + protocol;
1046 setProtocolSupportEnumeration(pse.c_str());
1048 auto_ptr_char temp(m_ProtocolSupportEnumeration);
1049 auto_ptr_char temp2(protocol);
1050 string pse(temp.get());
1051 pse = pse + ' ' + temp2.get();
1052 auto_ptr_XMLCh temp3(pse.c_str());
1053 setProtocolSupportEnumeration(temp3.get());
1057 setProtocolSupportEnumeration(protocol);
1061 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1062 if (!qualifiedName.hasNamespaceURI()) {
1063 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
1067 else if (XMLString::equals(qualifiedName.getLocalPart(),PROTOCOLSUPPORTENUMERATION_ATTRIB_NAME)) {
1068 setProtocolSupportEnumeration(value);
1071 else if (XMLString::equals(qualifiedName.getLocalPart(),ERRORURL_ATTRIB_NAME)) {
1075 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
1076 setValidUntil(value);
1079 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
1080 setCacheDuration(value);
1084 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1088 void marshallAttributes(DOMElement* domElement) const {
1089 MARSHALL_ID_ATTRIB(ID,ID,NULL);
1090 MARSHALL_STRING_ATTRIB(ProtocolSupportEnumeration,PROTOCOLSUPPORTENUMERATION,NULL);
1091 MARSHALL_STRING_ATTRIB(ErrorURL,ERRORURL,NULL);
1092 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
1093 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
1094 marshallExtensionAttributes(domElement);
1097 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1098 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
1099 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
1100 PROC_TYPED_CHILDREN(KeyDescriptor,SAML20MD_NS,false);
1101 PROC_TYPED_CHILD(Organization,SAML20MD_NS,false);
1102 PROC_TYPED_CHILDREN(ContactPerson,SAML20MD_NS,false);
1103 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1106 void processAttribute(const DOMAttr* attribute) {
1107 PROC_ID_ATTRIB(ID,ID,NULL);
1108 unmarshallExtensionAttribute(attribute);
1112 class SAML_DLLLOCAL RoleDescriptorTypeImpl : public virtual RoleDescriptorType, public RoleDescriptorImpl
1115 virtual ~RoleDescriptorTypeImpl() {}
1117 RoleDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1118 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1121 RoleDescriptorTypeImpl(const RoleDescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1122 VectorOf(XMLObject) v=getUnknownXMLObjects();
1123 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
1124 v.push_back((*i)->clone());
1127 IMPL_XMLOBJECT_CLONE(RoleDescriptorType);
1128 RoleDescriptor* cloneRoleDescriptor() const {
1129 return new RoleDescriptorTypeImpl(*this);
1132 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
1135 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1136 getUnknownXMLObjects().push_back(childXMLObject);
1140 class SAML_DLLLOCAL SSODescriptorTypeImpl : public virtual SSODescriptorType, public RoleDescriptorImpl
1143 m_children.push_back(NULL);
1144 m_children.push_back(NULL);
1145 m_children.push_back(NULL);
1146 m_children.push_back(NULL);
1147 m_pos_ArtifactResolutionService=m_pos_ContactPerson;
1148 ++m_pos_ArtifactResolutionService;
1149 m_pos_SingleLogoutService=m_pos_ArtifactResolutionService;
1150 ++m_pos_SingleLogoutService;
1151 m_pos_ManageNameIDService=m_pos_SingleLogoutService;
1152 ++m_pos_ManageNameIDService;
1153 m_pos_NameIDFormat=m_pos_ManageNameIDService;
1154 ++m_pos_NameIDFormat;
1158 list<XMLObject*>::iterator m_pos_ArtifactResolutionService;
1159 list<XMLObject*>::iterator m_pos_SingleLogoutService;
1160 list<XMLObject*>::iterator m_pos_ManageNameIDService;
1161 list<XMLObject*>::iterator m_pos_NameIDFormat;
1163 SSODescriptorTypeImpl() {
1168 virtual ~SSODescriptorTypeImpl() {}
1170 SSODescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1171 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1175 SSODescriptorTypeImpl(const SSODescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1177 VectorOf(ArtifactResolutionService) v=getArtifactResolutionServices();
1178 for (vector<ArtifactResolutionService*>::const_iterator i=src.m_ArtifactResolutionServices.begin(); i!=src.m_ArtifactResolutionServices.end(); i++) {
1180 v.push_back((*i)->cloneArtifactResolutionService());
1183 VectorOf(SingleLogoutService) w=getSingleLogoutServices();
1184 for (vector<SingleLogoutService*>::const_iterator j=src.m_SingleLogoutServices.begin(); j!=src.m_SingleLogoutServices.end(); j++) {
1186 w.push_back((*j)->cloneSingleLogoutService());
1189 VectorOf(ManageNameIDService) x=getManageNameIDServices();
1190 for (vector<ManageNameIDService*>::const_iterator k=src.m_ManageNameIDServices.begin(); k!=src.m_ManageNameIDServices.end(); k++) {
1192 x.push_back((*k)->cloneManageNameIDService());
1195 VectorOf(NameIDFormat) y=getNameIDFormats();
1196 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1198 y.push_back((*m)->cloneNameIDFormat());
1203 IMPL_TYPED_CHILDREN(ArtifactResolutionService,m_pos_ArtifactResolutionService);
1204 IMPL_TYPED_CHILDREN(SingleLogoutService,m_pos_SingleLogoutService);
1205 IMPL_TYPED_CHILDREN(ManageNameIDService,m_pos_ManageNameIDService);
1206 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1209 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1210 PROC_TYPED_CHILDREN(ArtifactResolutionService,SAML20MD_NS,false);
1211 PROC_TYPED_CHILDREN(SingleLogoutService,SAML20MD_NS,false);
1212 PROC_TYPED_CHILDREN(ManageNameIDService,SAML20MD_NS,false);
1213 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1214 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1218 class SAML_DLLLOCAL IDPSSODescriptorImpl : public virtual IDPSSODescriptor, public SSODescriptorTypeImpl
1220 list<XMLObject*>::iterator m_pos_SingleSignOnService;
1221 list<XMLObject*>::iterator m_pos_NameIDMappingService;
1222 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1223 list<XMLObject*>::iterator m_pos_AttributeProfile;
1226 m_WantAuthnRequestsSigned=XML_BOOL_NULL;
1227 m_children.push_back(NULL);
1228 m_children.push_back(NULL);
1229 m_children.push_back(NULL);
1230 m_children.push_back(NULL);
1231 m_pos_SingleSignOnService=m_pos_NameIDFormat;
1232 ++m_pos_SingleSignOnService;
1233 m_pos_NameIDMappingService=m_pos_SingleSignOnService;
1234 ++m_pos_NameIDMappingService;
1235 m_pos_AssertionIDRequestService=m_pos_NameIDMappingService;
1236 ++m_pos_AssertionIDRequestService;
1237 m_pos_AttributeProfile=m_pos_AssertionIDRequestService;
1238 ++m_pos_AttributeProfile;
1242 virtual ~IDPSSODescriptorImpl() {}
1244 IDPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1245 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1249 IDPSSODescriptorImpl(const IDPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1251 WantAuthnRequestsSigned(src.m_WantAuthnRequestsSigned);
1252 VectorOf(SingleSignOnService) v=getSingleSignOnServices();
1253 for (vector<SingleSignOnService*>::const_iterator i=src.m_SingleSignOnServices.begin(); i!=src.m_SingleSignOnServices.end(); i++) {
1255 v.push_back((*i)->cloneSingleSignOnService());
1258 VectorOf(NameIDMappingService) w=getNameIDMappingServices();
1259 for (vector<NameIDMappingService*>::const_iterator j=src.m_NameIDMappingServices.begin(); j!=src.m_NameIDMappingServices.end(); j++) {
1261 w.push_back((*j)->cloneNameIDMappingService());
1264 VectorOf(AssertionIDRequestService) x=getAssertionIDRequestServices();
1265 for (vector<AssertionIDRequestService*>::const_iterator k=src.m_AssertionIDRequestServices.begin(); k!=src.m_AssertionIDRequestServices.end(); k++) {
1267 x.push_back((*k)->cloneAssertionIDRequestService());
1270 VectorOf(AttributeProfile) y=getAttributeProfiles();
1271 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1273 y.push_back((*m)->cloneAttributeProfile());
1276 VectorOf(Attribute) z=getAttributes();
1277 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1279 z.push_back((*n)->cloneAttribute());
1284 IMPL_XMLOBJECT_CLONE(IDPSSODescriptor);
1285 SSODescriptorType* cloneSSODescriptorType() const {
1286 return new IDPSSODescriptorImpl(*this);
1288 RoleDescriptor* cloneRoleDescriptor() const {
1289 return new IDPSSODescriptorImpl(*this);
1292 IMPL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned);
1293 IMPL_TYPED_CHILDREN(SingleSignOnService,m_pos_SingleSignOnService);
1294 IMPL_TYPED_CHILDREN(NameIDMappingService,m_pos_NameIDMappingService);
1295 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1296 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1297 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1299 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1300 if (!qualifiedName.hasNamespaceURI()) {
1301 if (XMLString::equals(qualifiedName.getLocalPart(),WANTAUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1302 setWantAuthnRequestsSigned(value);
1306 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1310 void marshallAttributes(DOMElement* domElement) const {
1311 MARSHALL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned,WANTAUTHNREQUESTSSIGNED,NULL);
1312 RoleDescriptorImpl::marshallAttributes(domElement);
1315 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1316 PROC_TYPED_CHILDREN(SingleSignOnService,SAML20MD_NS,false);
1317 PROC_TYPED_CHILDREN(NameIDMappingService,SAML20MD_NS,false);
1318 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1319 PROC_TYPED_CHILDREN(AttributeProfile,SAML20MD_NS,false);
1320 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
1321 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1325 class SAML_DLLLOCAL RequestedAttributeImpl : public virtual RequestedAttribute,
1326 public AbstractComplexElement,
1327 public AbstractAttributeExtensibleXMLObject,
1328 public AbstractDOMCachingXMLObject,
1329 public AbstractXMLObjectMarshaller,
1330 public AbstractXMLObjectUnmarshaller
1333 m_Name=m_NameFormat=m_FriendlyName=NULL;
1334 m_isRequired=XML_BOOL_NULL;
1337 virtual ~RequestedAttributeImpl() {
1338 XMLString::release(&m_Name);
1339 XMLString::release(&m_NameFormat);
1340 XMLString::release(&m_FriendlyName);
1343 RequestedAttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1344 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1348 RequestedAttributeImpl(const RequestedAttributeImpl& src)
1349 : AbstractXMLObject(src), AbstractComplexElement(src),
1350 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1352 setName(src.getName());
1353 setNameFormat(src.getNameFormat());
1354 setFriendlyName(src.getFriendlyName());
1355 isRequired(src.m_isRequired);
1356 VectorOf(XMLObject) v=getAttributeValues();
1357 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
1359 v.push_back((*i)->clone());
1364 IMPL_XMLOBJECT_CLONE(RequestedAttribute);
1365 Attribute* cloneAttribute() const {
1366 return new RequestedAttributeImpl(*this);
1369 IMPL_STRING_ATTRIB(Name);
1370 IMPL_STRING_ATTRIB(NameFormat);
1371 IMPL_STRING_ATTRIB(FriendlyName);
1372 IMPL_BOOLEAN_ATTRIB(isRequired);
1373 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
1375 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1376 if (!qualifiedName.hasNamespaceURI()) {
1377 if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) {
1381 else if (XMLString::equals(qualifiedName.getLocalPart(),NAMEFORMAT_ATTRIB_NAME)) {
1382 setNameFormat(value);
1385 else if (XMLString::equals(qualifiedName.getLocalPart(),FRIENDLYNAME_ATTRIB_NAME)) {
1386 setFriendlyName(value);
1389 else if (XMLString::equals(qualifiedName.getLocalPart(),ISREQUIRED_ATTRIB_NAME)) {
1390 setisRequired(value);
1394 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1398 void marshallAttributes(DOMElement* domElement) const {
1399 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
1400 MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,NULL);
1401 MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,NULL);
1402 MARSHALL_BOOLEAN_ATTRIB(isRequired,ISREQUIRED,NULL);
1403 marshallExtensionAttributes(domElement);
1406 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1407 getAttributeValues().push_back(childXMLObject);
1410 void processAttribute(const DOMAttr* attribute) {
1411 unmarshallExtensionAttribute(attribute);
1415 class SAML_DLLLOCAL AttributeConsumingServiceImpl : public virtual AttributeConsumingService,
1416 public AbstractComplexElement,
1417 public AbstractDOMCachingXMLObject,
1418 public AbstractXMLObjectMarshaller,
1419 public AbstractXMLObjectUnmarshaller
1421 list<XMLObject*>::iterator m_pos_ServiceDescription;
1422 list<XMLObject*>::iterator m_pos_RequestedAttribute;
1426 m_isDefault=XML_BOOL_NULL;
1427 m_children.push_back(NULL);
1428 m_children.push_back(NULL);
1429 m_pos_ServiceDescription=m_children.begin();
1430 m_pos_RequestedAttribute=m_pos_ServiceDescription;
1431 ++m_pos_RequestedAttribute;
1435 virtual ~AttributeConsumingServiceImpl() {
1436 XMLString::release(&m_Index);
1439 AttributeConsumingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1440 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1444 AttributeConsumingServiceImpl(const AttributeConsumingServiceImpl& src)
1445 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1447 setIndex(src.m_Index);
1448 isDefault(src.m_isDefault);
1449 VectorOf(ServiceName) v=getServiceNames();
1450 for (vector<ServiceName*>::const_iterator i=src.m_ServiceNames.begin(); i!=src.m_ServiceNames.end(); i++) {
1452 v.push_back((*i)->cloneServiceName());
1455 VectorOf(ServiceDescription) w=getServiceDescriptions();
1456 for (vector<ServiceDescription*>::const_iterator j=src.m_ServiceDescriptions.begin(); j!=src.m_ServiceDescriptions.end(); j++) {
1458 w.push_back((*j)->cloneServiceDescription());
1461 VectorOf(RequestedAttribute) x=getRequestedAttributes();
1462 for (vector<RequestedAttribute*>::const_iterator k=src.m_RequestedAttributes.begin(); k!=src.m_RequestedAttributes.end(); k++) {
1464 x.push_back((*k)->cloneRequestedAttribute());
1469 IMPL_XMLOBJECT_CLONE(AttributeConsumingService);
1470 IMPL_INTEGER_ATTRIB(Index);
1471 IMPL_BOOLEAN_ATTRIB(isDefault);
1472 IMPL_TYPED_CHILDREN(ServiceName,m_pos_ServiceDescription);
1473 IMPL_TYPED_CHILDREN(ServiceDescription,m_pos_RequestedAttribute);
1474 IMPL_TYPED_CHILDREN(RequestedAttribute,m_children.end());
1477 void marshallAttributes(DOMElement* domElement) const {
1478 MARSHALL_INTEGER_ATTRIB(Index,INDEX,NULL);
1479 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
1482 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1483 PROC_TYPED_CHILDREN(ServiceName,SAML20MD_NS,false);
1484 PROC_TYPED_CHILDREN(ServiceDescription,SAML20MD_NS,false);
1485 PROC_TYPED_CHILDREN(RequestedAttribute,SAML20MD_NS,false);
1486 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1489 void processAttribute(const DOMAttr* attribute) {
1490 PROC_INTEGER_ATTRIB(Index,INDEX,NULL);
1491 PROC_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
1492 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1496 class SAML_DLLLOCAL SPSSODescriptorImpl : public virtual SPSSODescriptor, public SSODescriptorTypeImpl
1498 list<XMLObject*>::iterator m_pos_AssertionConsumerService;
1501 m_AuthnRequestsSigned=XML_BOOL_NULL;
1502 m_WantAssertionsSigned=XML_BOOL_NULL;
1503 m_children.push_back(NULL);
1504 m_pos_AssertionConsumerService=m_pos_NameIDFormat;
1505 ++m_pos_AssertionConsumerService;
1509 virtual ~SPSSODescriptorImpl() {}
1511 SPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1512 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1516 SPSSODescriptorImpl(const SPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1518 AuthnRequestsSigned(src.m_AuthnRequestsSigned);
1519 WantAssertionsSigned(src.m_WantAssertionsSigned);
1520 VectorOf(AssertionConsumerService) v=getAssertionConsumerServices();
1521 for (vector<AssertionConsumerService*>::const_iterator i=src.m_AssertionConsumerServices.begin(); i!=src.m_AssertionConsumerServices.end(); i++) {
1523 v.push_back((*i)->cloneAssertionConsumerService());
1526 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1527 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1529 w.push_back((*j)->cloneAttributeConsumingService());
1534 IMPL_XMLOBJECT_CLONE(SPSSODescriptor);
1535 SSODescriptorType* cloneSSODescriptorType() const {
1536 return cloneSPSSODescriptor();
1538 RoleDescriptor* cloneRoleDescriptor() const {
1539 return cloneSPSSODescriptor();
1542 IMPL_BOOLEAN_ATTRIB(AuthnRequestsSigned);
1543 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1544 IMPL_TYPED_CHILDREN(AssertionConsumerService,m_pos_AssertionConsumerService);
1545 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1547 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1548 if (!qualifiedName.hasNamespaceURI()) {
1549 if (XMLString::equals(qualifiedName.getLocalPart(),AUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1550 setAuthnRequestsSigned(value);
1553 else if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1554 setWantAssertionsSigned(value);
1558 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1562 void marshallAttributes(DOMElement* domElement) const {
1563 MARSHALL_BOOLEAN_ATTRIB(AuthnRequestsSigned,AUTHNREQUESTSSIGNED,NULL);
1564 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,NULL);
1565 RoleDescriptorImpl::marshallAttributes(domElement);
1568 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1569 PROC_TYPED_CHILDREN(AssertionConsumerService,SAML20MD_NS,false);
1570 PROC_TYPED_CHILDREN(AttributeConsumingService,SAML20MD_NS,false);
1571 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1575 class SAML_DLLLOCAL AuthnAuthorityDescriptorImpl : public virtual AuthnAuthorityDescriptor, public RoleDescriptorImpl
1577 list<XMLObject*>::iterator m_pos_AuthnQueryService;
1578 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1581 m_children.push_back(NULL);
1582 m_children.push_back(NULL);
1583 m_pos_AuthnQueryService=m_pos_ContactPerson;
1584 ++m_pos_AuthnQueryService;
1585 m_pos_AssertionIDRequestService=m_pos_AuthnQueryService;
1586 ++m_pos_AssertionIDRequestService;
1590 virtual ~AuthnAuthorityDescriptorImpl() {}
1592 AuthnAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1593 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1597 AuthnAuthorityDescriptorImpl(const AuthnAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1599 VectorOf(AuthnQueryService) v=getAuthnQueryServices();
1600 for (vector<AuthnQueryService*>::const_iterator i=src.m_AuthnQueryServices.begin(); i!=src.m_AuthnQueryServices.end(); i++) {
1602 v.push_back((*i)->cloneAuthnQueryService());
1605 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1606 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1608 w.push_back((*j)->cloneAssertionIDRequestService());
1611 VectorOf(NameIDFormat) x=getNameIDFormats();
1612 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1614 x.push_back((*k)->cloneNameIDFormat());
1619 IMPL_XMLOBJECT_CLONE(AuthnAuthorityDescriptor);
1620 RoleDescriptor* cloneRoleDescriptor() const {
1621 return cloneAuthnAuthorityDescriptor();
1624 IMPL_TYPED_CHILDREN(AuthnQueryService,m_pos_AuthnQueryService);
1625 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1626 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1629 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1630 PROC_TYPED_CHILDREN(AuthnQueryService,SAML20MD_NS,false);
1631 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1632 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1633 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1637 class SAML_DLLLOCAL PDPDescriptorImpl : public virtual PDPDescriptor, public RoleDescriptorImpl
1639 list<XMLObject*>::iterator m_pos_AuthzService;
1640 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1643 m_children.push_back(NULL);
1644 m_children.push_back(NULL);
1645 m_pos_AuthzService=m_pos_ContactPerson;
1646 ++m_pos_AuthzService;
1647 m_pos_AssertionIDRequestService=m_pos_AuthzService;
1648 ++m_pos_AssertionIDRequestService;
1652 virtual ~PDPDescriptorImpl() {}
1654 PDPDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1655 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1659 PDPDescriptorImpl(const PDPDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1661 VectorOf(AuthzService) v=getAuthzServices();
1662 for (vector<AuthzService*>::const_iterator i=src.m_AuthzServices.begin(); i!=src.m_AuthzServices.end(); i++) {
1664 v.push_back((*i)->cloneAuthzService());
1667 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1668 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1670 w.push_back((*j)->cloneAssertionIDRequestService());
1673 VectorOf(NameIDFormat) x=getNameIDFormats();
1674 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1676 x.push_back((*k)->cloneNameIDFormat());
1681 IMPL_XMLOBJECT_CLONE(PDPDescriptor);
1682 RoleDescriptor* cloneRoleDescriptor() const {
1683 return clonePDPDescriptor();
1686 IMPL_TYPED_CHILDREN(AuthzService,m_pos_AuthzService);
1687 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1688 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1691 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1692 PROC_TYPED_CHILDREN(AuthzService,SAML20MD_NS,false);
1693 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1694 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1695 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1699 class SAML_DLLLOCAL AttributeAuthorityDescriptorImpl : public virtual AttributeAuthorityDescriptor, public RoleDescriptorImpl
1701 list<XMLObject*>::iterator m_pos_AttributeService;
1702 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1703 list<XMLObject*>::iterator m_pos_NameIDFormat;
1704 list<XMLObject*>::iterator m_pos_AttributeProfile;
1707 m_children.push_back(NULL);
1708 m_children.push_back(NULL);
1709 m_children.push_back(NULL);
1710 m_children.push_back(NULL);
1711 m_pos_AttributeService=m_pos_ContactPerson;
1712 ++m_pos_AttributeService;
1713 m_pos_AssertionIDRequestService=m_pos_AttributeService;
1714 ++m_pos_AssertionIDRequestService;
1715 m_pos_NameIDFormat=m_pos_AssertionIDRequestService;
1716 ++m_pos_NameIDFormat;
1717 m_pos_AttributeProfile=m_pos_NameIDFormat;
1718 ++m_pos_AttributeProfile;
1722 virtual ~AttributeAuthorityDescriptorImpl() {}
1724 AttributeAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1725 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1729 AttributeAuthorityDescriptorImpl(const AttributeAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1731 VectorOf(AttributeService) v=getAttributeServices();
1732 for (vector<AttributeService*>::const_iterator i=src.m_AttributeServices.begin(); i!=src.m_AttributeServices.end(); i++) {
1734 v.push_back((*i)->cloneAttributeService());
1737 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1738 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1740 w.push_back((*j)->cloneAssertionIDRequestService());
1743 VectorOf(NameIDFormat) x=getNameIDFormats();
1744 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1746 x.push_back((*k)->cloneNameIDFormat());
1749 VectorOf(AttributeProfile) y=getAttributeProfiles();
1750 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1752 y.push_back((*m)->cloneAttributeProfile());
1755 VectorOf(Attribute) z=getAttributes();
1756 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1758 z.push_back((*n)->cloneAttribute());
1763 IMPL_XMLOBJECT_CLONE(AttributeAuthorityDescriptor);
1764 RoleDescriptor* cloneRoleDescriptor() const {
1765 return cloneAttributeAuthorityDescriptor();
1768 IMPL_TYPED_CHILDREN(AttributeService,m_pos_AttributeService);
1769 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1770 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1771 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1772 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1775 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1776 PROC_TYPED_CHILDREN(AttributeService,SAML20MD_NS,false);
1777 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1778 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1779 PROC_TYPED_CHILDREN(AttributeProfile,SAML20MD_NS,false);
1780 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
1781 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1785 class SAML_DLLLOCAL QueryDescriptorTypeImpl : public virtual QueryDescriptorType, public RoleDescriptorImpl
1788 m_WantAssertionsSigned=XML_BOOL_NULL;
1789 m_children.push_back(NULL);
1790 m_pos_NameIDFormat=m_pos_ContactPerson;
1791 ++m_pos_NameIDFormat;
1795 list<XMLObject*>::iterator m_pos_NameIDFormat;
1797 QueryDescriptorTypeImpl() {
1802 virtual ~QueryDescriptorTypeImpl() {}
1804 QueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1805 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1809 QueryDescriptorTypeImpl(const QueryDescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1811 WantAssertionsSigned(src.m_WantAssertionsSigned);
1812 VectorOf(NameIDFormat) y=getNameIDFormats();
1813 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1815 y.push_back((*m)->cloneNameIDFormat());
1820 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1821 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1823 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1824 if (!qualifiedName.hasNamespaceURI()) {
1825 if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1826 setWantAssertionsSigned(value);
1830 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1834 void marshallAttributes(DOMElement* domElement) const {
1835 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,NULL);
1836 RoleDescriptorImpl::marshallAttributes(domElement);
1839 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1840 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1841 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1845 class SAML_DLLLOCAL AuthnQueryDescriptorTypeImpl : public virtual AuthnQueryDescriptorType, public QueryDescriptorTypeImpl
1848 virtual ~AuthnQueryDescriptorTypeImpl() {}
1850 AuthnQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1851 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1853 AuthnQueryDescriptorTypeImpl(const AuthnQueryDescriptorTypeImpl& src) : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {}
1855 IMPL_XMLOBJECT_CLONE(AuthnQueryDescriptorType);
1856 QueryDescriptorType* cloneQueryDescriptorType() const {
1857 return new AuthnQueryDescriptorTypeImpl(*this);
1859 RoleDescriptor* cloneRoleDescriptor() const {
1860 return new AuthnQueryDescriptorTypeImpl(*this);
1864 class SAML_DLLLOCAL AttributeQueryDescriptorTypeImpl : public virtual AttributeQueryDescriptorType, public QueryDescriptorTypeImpl
1867 virtual ~AttributeQueryDescriptorTypeImpl() {}
1869 AttributeQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1870 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1872 AttributeQueryDescriptorTypeImpl(const AttributeQueryDescriptorTypeImpl& src)
1873 : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1874 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1875 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1877 w.push_back((*j)->cloneAttributeConsumingService());
1882 IMPL_XMLOBJECT_CLONE(AttributeQueryDescriptorType);
1883 QueryDescriptorType* cloneQueryDescriptorType() const {
1884 return new AttributeQueryDescriptorTypeImpl(*this);
1886 RoleDescriptor* cloneRoleDescriptor() const {
1887 return new AttributeQueryDescriptorTypeImpl(*this);
1890 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1893 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1894 PROC_TYPED_CHILDREN(AttributeConsumingService,SAML20MD_NS,false);
1895 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1899 class SAML_DLLLOCAL AuthzDecisionQueryDescriptorTypeImpl : public virtual AuthzDecisionQueryDescriptorType, public QueryDescriptorTypeImpl
1902 virtual ~AuthzDecisionQueryDescriptorTypeImpl() {}
1904 AuthzDecisionQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1905 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1907 AuthzDecisionQueryDescriptorTypeImpl(const AuthzDecisionQueryDescriptorTypeImpl& src)
1908 : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1909 VectorOf(ActionNamespace) w=getActionNamespaces();
1910 for (vector<ActionNamespace*>::const_iterator j=src.m_ActionNamespaces.begin(); j!=src.m_ActionNamespaces.end(); j++) {
1912 w.push_back((*j)->cloneActionNamespace());
1917 IMPL_XMLOBJECT_CLONE(AuthzDecisionQueryDescriptorType);
1918 QueryDescriptorType* cloneQueryDescriptorType() const {
1919 return new AuthzDecisionQueryDescriptorTypeImpl(*this);
1921 RoleDescriptor* cloneRoleDescriptor() const {
1922 return new AuthzDecisionQueryDescriptorTypeImpl(*this);
1925 IMPL_TYPED_CHILDREN(ActionNamespace,m_children.end());
1928 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1929 PROC_TYPED_CHILDREN(ActionNamespace,samlconstants::SAML20MD_QUERY_EXT_NS,false);
1930 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1934 class SAML_DLLLOCAL AffiliationDescriptorImpl : public virtual AffiliationDescriptor,
1935 public virtual SignableObject,
1936 public AbstractComplexElement,
1937 public AbstractAttributeExtensibleXMLObject,
1938 public AbstractDOMCachingXMLObject,
1939 public AbstractXMLObjectMarshaller,
1940 public AbstractXMLObjectUnmarshaller
1942 list<XMLObject*>::iterator m_pos_AffiliateMember;
1945 m_ID=m_AffiliationOwnerID=NULL;
1946 m_ValidUntil=m_CacheDuration=NULL;
1947 m_children.push_back(NULL);
1948 m_children.push_back(NULL);
1949 m_children.push_back(NULL);
1952 m_pos_Signature=m_children.begin();
1953 m_pos_Extensions=m_pos_Signature;
1955 m_pos_AffiliateMember=m_pos_Extensions;
1956 ++m_pos_AffiliateMember;
1960 virtual ~AffiliationDescriptorImpl() {
1961 XMLString::release(&m_ID);
1962 XMLString::release(&m_AffiliationOwnerID);
1963 delete m_ValidUntil;
1964 delete m_CacheDuration;
1967 AffiliationDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1968 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1972 AffiliationDescriptorImpl(const AffiliationDescriptorImpl& src)
1973 : AbstractXMLObject(src), AbstractComplexElement(src),
1974 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1977 setAffiliationOwnerID(src.getAffiliationOwnerID());
1978 setValidUntil(src.getValidUntil());
1979 setCacheDuration(src.getCacheDuration());
1980 if (src.getSignature())
1981 setSignature(src.getSignature()->cloneSignature());
1982 if (src.getExtensions())
1983 setExtensions(src.getExtensions()->cloneExtensions());
1985 VectorOf(KeyDescriptor) v=getKeyDescriptors();
1986 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
1988 v.push_back((*i)->cloneKeyDescriptor());
1991 VectorOf(AffiliateMember) w=getAffiliateMembers();
1992 for (vector<AffiliateMember*>::const_iterator j=src.m_AffiliateMembers.begin(); j!=src.m_AffiliateMembers.end(); j++) {
1994 w.push_back((*j)->cloneAffiliateMember());
1999 IMPL_XMLOBJECT_CLONE(AffiliationDescriptor);
2001 //IMPL_TYPED_CHILD(Signature);
2002 // Need customized setter.
2004 Signature* m_Signature;
2005 list<XMLObject*>::iterator m_pos_Signature;
2007 Signature* getSignature() const {
2011 void setSignature(Signature* sig) {
2012 prepareForAssignment(m_Signature,sig);
2013 *m_pos_Signature=m_Signature=sig;
2014 // Sync content reference back up.
2016 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2020 IMPL_STRING_ATTRIB(AffiliationOwnerID);
2021 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2022 IMPL_DURATION_ATTRIB(CacheDuration,0);
2023 IMPL_TYPED_CHILD(Extensions);
2024 IMPL_TYPED_CHILDREN(AffiliateMember,m_pos_AffiliateMember);
2025 IMPL_TYPED_CHILDREN(KeyDescriptor,m_children.end());
2027 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
2028 if (!qualifiedName.hasNamespaceURI()) {
2029 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
2033 else if (XMLString::equals(qualifiedName.getLocalPart(),AFFILIATIONOWNERID_ATTRIB_NAME)) {
2034 setAffiliationOwnerID(value);
2037 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
2038 setValidUntil(value);
2041 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
2042 setCacheDuration(value);
2046 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
2050 void marshallAttributes(DOMElement* domElement) const {
2051 MARSHALL_ID_ATTRIB(ID,ID,NULL);
2052 MARSHALL_STRING_ATTRIB(AffiliationOwnerID,AFFILIATIONOWNERID,NULL);
2053 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2054 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2055 marshallExtensionAttributes(domElement);
2058 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2059 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2060 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2061 PROC_TYPED_CHILDREN(AffiliateMember,SAML20MD_NS,false);
2062 PROC_TYPED_CHILDREN(KeyDescriptor,SAML20MD_NS,false);
2063 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2066 void processAttribute(const DOMAttr* attribute) {
2067 PROC_ID_ATTRIB(ID,ID,NULL);
2068 unmarshallExtensionAttribute(attribute);
2072 class SAML_DLLLOCAL EntityDescriptorImpl : public virtual EntityDescriptor,
2073 public virtual SignableObject,
2074 public AbstractComplexElement,
2075 public AbstractAttributeExtensibleXMLObject,
2076 public AbstractDOMCachingXMLObject,
2077 public AbstractXMLObjectMarshaller,
2078 public AbstractXMLObjectUnmarshaller
2080 list<XMLObject*>::iterator m_pos_ContactPerson;
2083 m_ID=m_EntityID=NULL;
2084 m_ValidUntil=m_CacheDuration=NULL;
2085 m_children.push_back(NULL);
2086 m_children.push_back(NULL);
2087 m_children.push_back(NULL);
2088 m_children.push_back(NULL);
2089 m_children.push_back(NULL);
2092 m_AffiliationDescriptor=NULL;
2093 m_Organization=NULL;
2094 m_pos_Signature=m_children.begin();
2095 m_pos_Extensions=m_pos_Signature;
2097 m_pos_AffiliationDescriptor=m_pos_Extensions;
2098 ++m_pos_AffiliationDescriptor;
2099 m_pos_Organization=m_pos_AffiliationDescriptor;
2100 ++m_pos_Organization;
2101 m_pos_ContactPerson=m_pos_Organization;
2102 ++m_pos_ContactPerson;
2106 virtual ~EntityDescriptorImpl() {
2107 XMLString::release(&m_ID);
2108 XMLString::release(&m_EntityID);
2109 delete m_ValidUntil;
2110 delete m_CacheDuration;
2113 EntityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2114 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2118 EntityDescriptorImpl(const EntityDescriptorImpl& src)
2119 : AbstractXMLObject(src), AbstractComplexElement(src),
2120 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
2123 setEntityID(src.getEntityID());
2124 setValidUntil(src.getValidUntil());
2125 setCacheDuration(src.getCacheDuration());
2126 if (src.getSignature())
2127 setSignature(src.getSignature()->cloneSignature());
2128 if (src.getExtensions())
2129 setExtensions(src.getExtensions()->cloneExtensions());
2130 if (src.getAffiliationDescriptor())
2131 setAffiliationDescriptor(src.getAffiliationDescriptor()->cloneAffiliationDescriptor());
2132 if (src.getOrganization())
2133 setOrganization(src.getOrganization()->cloneOrganization());
2135 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2137 IDPSSODescriptor* idp=dynamic_cast<IDPSSODescriptor*>(*i);
2139 getIDPSSODescriptors().push_back(idp->cloneIDPSSODescriptor());
2143 SPSSODescriptor* sp=dynamic_cast<SPSSODescriptor*>(*i);
2145 getSPSSODescriptors().push_back(sp->cloneSPSSODescriptor());
2149 AuthnAuthorityDescriptor* authn=dynamic_cast<AuthnAuthorityDescriptor*>(*i);
2151 getAuthnAuthorityDescriptors().push_back(authn->cloneAuthnAuthorityDescriptor());
2155 AttributeAuthorityDescriptor* attr=dynamic_cast<AttributeAuthorityDescriptor*>(*i);
2157 getAttributeAuthorityDescriptors().push_back(attr->cloneAttributeAuthorityDescriptor());
2161 PDPDescriptor* pdp=dynamic_cast<PDPDescriptor*>(*i);
2163 getPDPDescriptors().push_back(pdp->clonePDPDescriptor());
2167 AuthnQueryDescriptorType* authnq=dynamic_cast<AuthnQueryDescriptorType*>(*i);
2169 getAuthnQueryDescriptorTypes().push_back(authnq->cloneAuthnQueryDescriptorType());
2173 AttributeQueryDescriptorType* attrq=dynamic_cast<AttributeQueryDescriptorType*>(*i);
2175 getAttributeQueryDescriptorTypes().push_back(attrq->cloneAttributeQueryDescriptorType());
2179 AuthzDecisionQueryDescriptorType* authzq=dynamic_cast<AuthzDecisionQueryDescriptorType*>(*i);
2181 getAuthzDecisionQueryDescriptorTypes().push_back(authzq->cloneAuthzDecisionQueryDescriptorType());
2185 RoleDescriptor* role=dynamic_cast<RoleDescriptor*>(*i);
2187 getRoleDescriptors().push_back(role->cloneRoleDescriptor());
2193 VectorOf(ContactPerson) v=getContactPersons();
2194 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
2196 v.push_back((*j)->cloneContactPerson());
2199 VectorOf(AdditionalMetadataLocation) w=getAdditionalMetadataLocations();
2200 for (vector<AdditionalMetadataLocation*>::const_iterator k=src.m_AdditionalMetadataLocations.begin(); k!=src.m_AdditionalMetadataLocations.end(); k++) {
2202 w.push_back((*k)->cloneAdditionalMetadataLocation());
2207 IMPL_XMLOBJECT_CLONE(EntityDescriptor);
2209 //IMPL_TYPED_CHILD(Signature);
2210 // Need customized setter.
2212 Signature* m_Signature;
2213 list<XMLObject*>::iterator m_pos_Signature;
2215 Signature* getSignature() const {
2219 void setSignature(Signature* sig) {
2220 prepareForAssignment(m_Signature,sig);
2221 *m_pos_Signature=m_Signature=sig;
2222 // Sync content reference back up.
2224 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2228 IMPL_STRING_ATTRIB(EntityID);
2229 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2230 IMPL_DURATION_ATTRIB(CacheDuration,0);
2231 IMPL_TYPED_CHILD(Extensions);
2232 IMPL_TYPED_CHILDREN(RoleDescriptor,m_pos_AffiliationDescriptor);
2233 IMPL_TYPED_CHILDREN(IDPSSODescriptor,m_pos_AffiliationDescriptor);
2234 IMPL_TYPED_CHILDREN(SPSSODescriptor,m_pos_AffiliationDescriptor);
2235 IMPL_TYPED_CHILDREN(AuthnAuthorityDescriptor,m_pos_AffiliationDescriptor);
2236 IMPL_TYPED_CHILDREN(AttributeAuthorityDescriptor,m_pos_AffiliationDescriptor);
2237 IMPL_TYPED_CHILDREN(PDPDescriptor,m_pos_AffiliationDescriptor);
2238 IMPL_TYPED_CHILDREN(AuthnQueryDescriptorType,m_pos_AffiliationDescriptor);
2239 IMPL_TYPED_CHILDREN(AttributeQueryDescriptorType,m_pos_AffiliationDescriptor);
2240 IMPL_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,m_pos_AffiliationDescriptor);
2241 IMPL_TYPED_CHILD(AffiliationDescriptor);
2242 IMPL_TYPED_CHILD(Organization);
2243 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
2244 IMPL_TYPED_CHILDREN(AdditionalMetadataLocation,m_children.end());
2246 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
2247 if (!qualifiedName.hasNamespaceURI()) {
2248 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
2252 else if (XMLString::equals(qualifiedName.getLocalPart(),ENTITYID_ATTRIB_NAME)) {
2256 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
2257 setValidUntil(value);
2260 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
2261 setCacheDuration(value);
2265 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
2268 const RoleDescriptor* getRoleDescriptor(const xmltooling::QName& qname, const XMLCh* protocol) const {
2269 // Check for "known" elements/types.
2270 if (qname == IDPSSODescriptor::ELEMENT_QNAME)
2271 return find_if(m_IDPSSODescriptors, isValidForProtocol(protocol));
2272 if (qname == SPSSODescriptor::ELEMENT_QNAME)
2273 return find_if(m_SPSSODescriptors, isValidForProtocol(protocol));
2274 if (qname == AuthnAuthorityDescriptor::ELEMENT_QNAME)
2275 return find_if(m_AuthnAuthorityDescriptors, isValidForProtocol(protocol));
2276 if (qname == AttributeAuthorityDescriptor::ELEMENT_QNAME)
2277 return find_if(m_AttributeAuthorityDescriptors, isValidForProtocol(protocol));
2278 if (qname == PDPDescriptor::ELEMENT_QNAME)
2279 return find_if(m_PDPDescriptors, isValidForProtocol(protocol));
2280 if (qname == AuthnQueryDescriptorType::TYPE_QNAME)
2281 return find_if(m_AuthnQueryDescriptorTypes, isValidForProtocol(protocol));
2282 if (qname == AttributeQueryDescriptorType::TYPE_QNAME)
2283 return find_if(m_AttributeQueryDescriptorTypes, isValidForProtocol(protocol));
2284 if (qname == AuthzDecisionQueryDescriptorType::TYPE_QNAME)
2285 return find_if(m_AuthzDecisionQueryDescriptorTypes, isValidForProtocol(protocol));
2287 vector<RoleDescriptor*>::const_iterator i =
2288 find_if(m_RoleDescriptors.begin(), m_RoleDescriptors.end(), ofTypeValidForProtocol(qname,protocol));
2289 return (i!=m_RoleDescriptors.end()) ? *i : NULL;
2293 void marshallAttributes(DOMElement* domElement) const {
2294 MARSHALL_ID_ATTRIB(ID,ID,NULL);
2295 MARSHALL_STRING_ATTRIB(EntityID,ENTITYID,NULL);
2296 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2297 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2298 marshallExtensionAttributes(domElement);
2301 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2302 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2303 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2304 PROC_TYPED_CHILDREN(IDPSSODescriptor,SAML20MD_NS,false);
2305 PROC_TYPED_CHILDREN(SPSSODescriptor,SAML20MD_NS,false);
2306 PROC_TYPED_CHILDREN(AuthnAuthorityDescriptor,SAML20MD_NS,false);
2307 PROC_TYPED_CHILDREN(AttributeAuthorityDescriptor,SAML20MD_NS,false);
2308 PROC_TYPED_CHILDREN(PDPDescriptor,SAML20MD_NS,false);
2309 PROC_TYPED_CHILDREN(AuthnQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2310 PROC_TYPED_CHILDREN(AttributeQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2311 PROC_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2312 PROC_TYPED_CHILDREN(RoleDescriptor,SAML20MD_NS,false);
2313 PROC_TYPED_CHILD(AffiliationDescriptor,SAML20MD_NS,false);
2314 PROC_TYPED_CHILD(Organization,SAML20MD_NS,false);
2315 PROC_TYPED_CHILDREN(ContactPerson,SAML20MD_NS,false);
2316 PROC_TYPED_CHILDREN(AdditionalMetadataLocation,SAML20MD_NS,false);
2317 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2320 void processAttribute(const DOMAttr* attribute) {
2321 PROC_ID_ATTRIB(ID,ID,NULL);
2322 unmarshallExtensionAttribute(attribute);
2326 class SAML_DLLLOCAL EntitiesDescriptorImpl : public virtual EntitiesDescriptor,
2327 public virtual SignableObject,
2328 public AbstractComplexElement,
2329 public AbstractDOMCachingXMLObject,
2330 public AbstractXMLObjectMarshaller,
2331 public AbstractXMLObjectUnmarshaller
2335 m_ValidUntil=m_CacheDuration=NULL;
2336 m_children.push_back(NULL);
2337 m_children.push_back(NULL);
2340 m_pos_Signature=m_children.begin();
2341 m_pos_Extensions=m_pos_Signature;
2346 virtual ~EntitiesDescriptorImpl() {
2347 XMLString::release(&m_ID);
2348 XMLString::release(&m_Name);
2349 delete m_ValidUntil;
2350 delete m_CacheDuration;
2353 EntitiesDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2354 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2358 EntitiesDescriptorImpl(const EntitiesDescriptorImpl& src)
2359 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2362 setName(src.getName());
2363 setValidUntil(src.getValidUntil());
2364 setCacheDuration(src.getCacheDuration());
2365 if (src.getSignature())
2366 setSignature(src.getSignature()->cloneSignature());
2367 if (src.getExtensions())
2368 setExtensions(src.getExtensions()->cloneExtensions());
2370 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2372 EntityDescriptor* e=dynamic_cast<EntityDescriptor*>(*i);
2374 getEntityDescriptors().push_back(e->cloneEntityDescriptor());
2378 EntitiesDescriptor* es=dynamic_cast<EntitiesDescriptor*>(*i);
2380 getEntitiesDescriptors().push_back(es->cloneEntitiesDescriptor());
2387 IMPL_XMLOBJECT_CLONE(EntitiesDescriptor);
2389 //IMPL_TYPED_CHILD(Signature);
2390 // Need customized setter.
2392 Signature* m_Signature;
2393 list<XMLObject*>::iterator m_pos_Signature;
2395 Signature* getSignature() const {
2399 void setSignature(Signature* sig) {
2400 prepareForAssignment(m_Signature,sig);
2401 *m_pos_Signature=m_Signature=sig;
2402 // Sync content reference back up.
2404 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2408 IMPL_STRING_ATTRIB(Name);
2409 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2410 IMPL_DURATION_ATTRIB(CacheDuration,0);
2411 IMPL_TYPED_CHILD(Extensions);
2412 IMPL_TYPED_CHILDREN(EntityDescriptor,m_children.end());
2413 IMPL_TYPED_CHILDREN(EntitiesDescriptor,m_children.end());
2416 void marshallAttributes(DOMElement* domElement) const {
2417 MARSHALL_ID_ATTRIB(ID,ID,NULL);
2418 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
2419 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2420 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2423 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2424 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2425 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2426 PROC_TYPED_CHILDREN(EntityDescriptor,SAML20MD_NS,false);
2427 PROC_TYPED_CHILDREN(EntitiesDescriptor,SAML20MD_NS,false);
2428 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2431 void processAttribute(const DOMAttr* attribute) {
2432 PROC_ID_ATTRIB(ID,ID,NULL);
2433 PROC_STRING_ATTRIB(Name,NAME,NULL);
2434 PROC_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2435 PROC_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2439 class SAML_DLLLOCAL EntityAttributesImpl : public virtual EntityAttributes,
2440 public AbstractComplexElement,
2441 public AbstractDOMCachingXMLObject,
2442 public AbstractXMLObjectMarshaller,
2443 public AbstractXMLObjectUnmarshaller
2446 virtual ~EntityAttributesImpl() {}
2448 EntityAttributesImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2449 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2452 EntityAttributesImpl(const EntityAttributesImpl& src)
2453 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2454 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2456 Attribute* a=dynamic_cast<Attribute*>(*i);
2458 getAttributes().push_back(a->cloneAttribute());
2462 saml2::Assertion* as=dynamic_cast<saml2::Assertion*>(*i);
2464 getAssertions().push_back(as->cloneAssertion());
2471 IMPL_XMLOBJECT_CLONE(EntityAttributes);
2473 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
2474 IMPL_TYPED_FOREIGN_CHILDREN(Assertion,saml2,m_children.end());
2477 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2478 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
2479 PROC_TYPED_FOREIGN_CHILDREN(Assertion,saml2,SAML20_NS,false);
2480 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2486 #if defined (_MSC_VER)
2487 #pragma warning( pop )
2490 IMPL_ELEMENT_QNAME(IDPSSODescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2491 IMPL_ELEMENT_QNAME(SPSSODescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2492 IMPL_ELEMENT_QNAME(AuthnAuthorityDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2493 IMPL_ELEMENT_QNAME(AttributeAuthorityDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2494 IMPL_ELEMENT_QNAME(PDPDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2495 IMPL_TYPE_QNAME(AuthnQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2496 IMPL_TYPE_QNAME(AttributeQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2497 IMPL_TYPE_QNAME(AuthzDecisionQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2499 // Builder Implementations
2501 IMPL_XMLOBJECTBUILDER(AdditionalMetadataLocation);
2502 IMPL_XMLOBJECTBUILDER(AffiliateMember);
2503 IMPL_XMLOBJECTBUILDER(AffiliationDescriptor);
2504 IMPL_XMLOBJECTBUILDER(ArtifactResolutionService);
2505 IMPL_XMLOBJECTBUILDER(AssertionConsumerService);
2506 IMPL_XMLOBJECTBUILDER(AssertionIDRequestService);
2507 IMPL_XMLOBJECTBUILDER(AttributeAuthorityDescriptor);
2508 IMPL_XMLOBJECTBUILDER(AttributeConsumingService);
2509 IMPL_XMLOBJECTBUILDER(AttributeProfile);
2510 IMPL_XMLOBJECTBUILDER(AttributeQueryDescriptorType);
2511 IMPL_XMLOBJECTBUILDER(AttributeService);
2512 IMPL_XMLOBJECTBUILDER(AuthnAuthorityDescriptor);
2513 IMPL_XMLOBJECTBUILDER(AuthnQueryDescriptorType);
2514 IMPL_XMLOBJECTBUILDER(AuthnQueryService);
2515 IMPL_XMLOBJECTBUILDER(AuthzDecisionQueryDescriptorType);
2516 IMPL_XMLOBJECTBUILDER(AuthzService);
2517 IMPL_XMLOBJECTBUILDER(Company);
2518 IMPL_XMLOBJECTBUILDER(ContactPerson);
2519 IMPL_XMLOBJECTBUILDER(EmailAddress);
2520 IMPL_XMLOBJECTBUILDER(EndpointType);
2521 IMPL_XMLOBJECTBUILDER(EntitiesDescriptor);
2522 IMPL_XMLOBJECTBUILDER(EntityDescriptor);
2523 IMPL_XMLOBJECTBUILDER(Extensions);
2524 IMPL_XMLOBJECTBUILDER(GivenName);
2525 IMPL_XMLOBJECTBUILDER(IDPSSODescriptor);
2526 IMPL_XMLOBJECTBUILDER(IndexedEndpointType);
2527 IMPL_XMLOBJECTBUILDER(KeyDescriptor);
2528 IMPL_XMLOBJECTBUILDER(localizedNameType);
2529 IMPL_XMLOBJECTBUILDER(localizedURIType);
2530 IMPL_XMLOBJECTBUILDER(ManageNameIDService);
2531 IMPL_XMLOBJECTBUILDER(NameIDFormat);
2532 IMPL_XMLOBJECTBUILDER(NameIDMappingService);
2533 IMPL_XMLOBJECTBUILDER(Organization);
2534 IMPL_XMLOBJECTBUILDER(OrganizationName);
2535 IMPL_XMLOBJECTBUILDER(OrganizationDisplayName);
2536 IMPL_XMLOBJECTBUILDER(OrganizationURL);
2537 IMPL_XMLOBJECTBUILDER(PDPDescriptor);
2538 IMPL_XMLOBJECTBUILDER(RequestedAttribute);
2539 IMPL_XMLOBJECTBUILDER(ServiceDescription);
2540 IMPL_XMLOBJECTBUILDER(ServiceName);
2541 IMPL_XMLOBJECTBUILDER(SingleLogoutService);
2542 IMPL_XMLOBJECTBUILDER(SingleSignOnService);
2543 IMPL_XMLOBJECTBUILDER(SPSSODescriptor);
2544 IMPL_XMLOBJECTBUILDER(SurName);
2545 IMPL_XMLOBJECTBUILDER(TelephoneNumber);
2547 IMPL_XMLOBJECTBUILDER(ActionNamespace);
2548 IMPL_XMLOBJECTBUILDER(SourceID);
2549 IMPL_XMLOBJECTBUILDER(EntityAttributes);
2551 #ifdef HAVE_COVARIANT_RETURNS
2552 RoleDescriptor* RoleDescriptorBuilder::buildObject(
2554 xmltooling::XMLObject* RoleDescriptorBuilder::buildObject(
2556 const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType
2559 return new RoleDescriptorTypeImpl(nsURI,localName,prefix,schemaType);
2562 const XMLCh ActionNamespace::LOCAL_NAME[] = UNICODE_LITERAL_15(A,c,t,i,o,n,N,a,m,e,s,p,a,c,e);
2563 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);
2564 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);
2565 const XMLCh AdditionalMetadataLocation::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(n,a,m,e,s,p,a,c,e);
2566 const XMLCh AffiliateMember::LOCAL_NAME[] = UNICODE_LITERAL_15(A,f,f,i,l,i,a,t,e,M,e,m,b,e,r);
2567 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);
2568 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);
2569 const XMLCh AffiliationDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2570 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);
2571 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);
2572 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);
2573 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);
2574 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);
2575 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);
2576 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);
2577 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);
2578 const XMLCh AttributeConsumingService::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
2579 const XMLCh AttributeConsumingService::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
2580 const XMLCh AttributeProfile::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,P,r,o,f,i,l,e);
2581 const XMLCh AttributeQueryDescriptorType::LOCAL_NAME[] =UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2582 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);
2583 const XMLCh AttributeService::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,S,e,r,v,i,c,e);
2584 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);
2585 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);
2586 const XMLCh AuthnQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2587 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);
2588 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);
2589 const XMLCh AuthzDecisionQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2590 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);
2591 const XMLCh AuthzService::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,z,S,e,r,v,i,c,e);
2592 const XMLCh CacheableSAMLObject::CACHEDURATION_ATTRIB_NAME[] = UNICODE_LITERAL_13(c,a,c,h,e,D,u,r,a,t,i,o,n);
2593 const XMLCh Company::LOCAL_NAME[] = UNICODE_LITERAL_7(C,o,m,p,a,n,y);
2594 const XMLCh ContactPerson::LOCAL_NAME[] = UNICODE_LITERAL_13(C,o,n,t,a,c,t,P,e,r,s,o,n);
2595 const XMLCh ContactPerson::TYPE_NAME[] = UNICODE_LITERAL_11(C,o,n,t,a,c,t,T,y,p,e);
2596 const XMLCh ContactPerson::CONTACTTYPE_ATTRIB_NAME[] = UNICODE_LITERAL_11(c,o,n,t,a,c,t,T,y,p,e);
2597 const XMLCh ContactPerson::CONTACT_TECHNICAL[] = UNICODE_LITERAL_9(t,e,c,h,n,i,c,a,l);
2598 const XMLCh ContactPerson::CONTACT_SUPPORT[] = UNICODE_LITERAL_7(s,u,p,p,o,r,t);
2599 const XMLCh ContactPerson::CONTACT_ADMINISTRATIVE[] = UNICODE_LITERAL_14(a,d,m,i,n,i,s,t,r,a,t,i,v,e);
2600 const XMLCh ContactPerson::CONTACT_BILLING[] = UNICODE_LITERAL_7(b,i,l,l,i,n,g);
2601 const XMLCh ContactPerson::CONTACT_OTHER[] = UNICODE_LITERAL_5(o,t,h,e,r);
2602 const XMLCh EmailAddress::LOCAL_NAME[] = UNICODE_LITERAL_12(E,m,a,i,l,A,d,d,r,e,s,s);
2603 const XMLCh EndpointType::LOCAL_NAME[] = {chNull};
2604 const XMLCh EndpointType::TYPE_NAME[] = UNICODE_LITERAL_12(E,n,d,p,o,i,n,t,T,y,p,e);
2605 const XMLCh EndpointType::BINDING_ATTRIB_NAME[] = UNICODE_LITERAL_7(B,i,n,d,i,n,g);
2606 const XMLCh EndpointType::LOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_8(L,o,c,a,t,i,o,n);
2607 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);
2608 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);
2609 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);
2610 const XMLCh EntitiesDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2611 const XMLCh EntitiesDescriptor::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e);
2612 const XMLCh EntityDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,D,e,s,c,r,i,p,t,o,r);
2613 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);
2614 const XMLCh EntityDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2615 const XMLCh EntityDescriptor::ENTITYID_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,n,t,i,t,y,I,D);
2616 const XMLCh EntityAttributes::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,A,t,t,r,i,b,u,t,e,s);
2617 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);
2618 const XMLCh Extensions::LOCAL_NAME[] = UNICODE_LITERAL_10(E,x,t,e,n,s,i,o,n,s);
2619 const XMLCh Extensions::TYPE_NAME[] = UNICODE_LITERAL_14(E,x,t,e,n,s,i,o,n,s,T,y,p,e);
2620 const XMLCh GivenName::LOCAL_NAME[] = UNICODE_LITERAL_9(G,i,v,e,n,N,a,m,e);
2621 const XMLCh IDPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(I,D,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
2622 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);
2623 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);
2624 const XMLCh IndexedEndpointType::LOCAL_NAME[] = {chNull};
2625 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);
2626 const XMLCh IndexedEndpointType::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
2627 const XMLCh IndexedEndpointType::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
2628 const XMLCh KeyDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(K,e,y,D,e,s,c,r,i,p,t,o,r);
2629 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);
2630 const XMLCh KeyDescriptor::USE_ATTRIB_NAME[] = UNICODE_LITERAL_3(u,s,e);
2631 const XMLCh KeyDescriptor::KEYTYPE_ENCRYPTION[] = UNICODE_LITERAL_10(e,n,c,r,y,p,t,i,o,n);
2632 const XMLCh KeyDescriptor::KEYTYPE_SIGNING[] = UNICODE_LITERAL_7(s,i,g,n,i,n,g);
2633 const XMLCh localizedNameType::LOCAL_NAME[] = {chNull};
2634 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);
2635 const XMLCh localizedNameType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2636 const XMLCh localizedURIType::LOCAL_NAME[] = {chNull};
2637 const XMLCh localizedURIType::TYPE_NAME[] = UNICODE_LITERAL_16(l,o,c,a,l,i,z,e,d,U,R,I,T,y,p,e);
2638 const XMLCh localizedURIType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2639 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);
2640 const XMLCh NameIDFormat::LOCAL_NAME[] = UNICODE_LITERAL_12(N,a,m,e,I,D,F,o,r,m,a,t);
2641 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);
2642 const XMLCh Organization::LOCAL_NAME[] = UNICODE_LITERAL_12(O,r,g,a,n,i,z,a,t,i,o,n);
2643 const XMLCh Organization::TYPE_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,T,y,p,e);
2644 const XMLCh OrganizationName::LOCAL_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,N,a,m,e);
2645 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);
2646 const XMLCh OrganizationURL::LOCAL_NAME[] = UNICODE_LITERAL_15(O,r,g,a,n,i,z,a,t,i,o,n,U,R,L);
2647 const XMLCh PDPDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(P,D,P,D,e,s,c,r,i,p,t,o,r);
2648 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);
2649 const XMLCh QueryDescriptorType::LOCAL_NAME[] = {chNull};
2650 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);
2651 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);
2652 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);
2653 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);
2654 const XMLCh RequestedAttribute::ISREQUIRED_ATTRIB_NAME[] = UNICODE_LITERAL_10(i,s,R,e,q,u,i,r,e,d);
2655 const XMLCh RoleDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2656 const XMLCh RoleDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2657 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);
2658 const XMLCh RoleDescriptor::ERRORURL_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,r,r,o,r,U,R,L);
2659 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);
2660 const XMLCh ServiceName::LOCAL_NAME[] = UNICODE_LITERAL_11(S,e,r,v,i,c,e,N,a,m,e);
2661 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);
2662 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);
2663 const XMLCh SourceID::LOCAL_NAME[] = UNICODE_LITERAL_8(S,o,u,r,c,e,I,D);
2664 const XMLCh SPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_15(S,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
2665 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);
2666 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);
2667 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);
2668 const XMLCh SSODescriptorType::LOCAL_NAME[] = {chNull};
2669 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);
2670 const XMLCh SurName::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,r,N,a,m,e);
2671 const XMLCh TelephoneNumber::LOCAL_NAME[] = UNICODE_LITERAL_15(T,e,l,e,p,h,o,n,e,N,u,m,b,e,r);
2672 const XMLCh TimeBoundSAMLObject::VALIDUNTIL_ATTRIB_NAME[] = UNICODE_LITERAL_10(v,a,l,i,d,U,n,t,i,l);