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"
27 #include <xmltooling/AbstractComplexElement.h>
28 #include <xmltooling/AbstractSimpleElement.h>
29 #include <xmltooling/impl/AnyElement.h>
30 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
31 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
32 #include <xmltooling/util/XMLHelper.h>
35 #include <xercesc/util/XMLUniDefs.hpp>
37 using namespace samlconstants;
38 using namespace opensaml::saml2md;
39 using namespace opensaml::saml2;
40 using namespace xmlencryption;
41 using namespace xmlsignature;
42 using namespace xmltooling;
44 using xmlconstants::XMLSIG_NS;
45 using xmlconstants::XML_BOOL_NULL;
47 #if defined (_MSC_VER)
48 #pragma warning( push )
49 #pragma warning( disable : 4250 4251 )
55 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AffiliateMember);
56 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AttributeProfile);
57 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Company);
58 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,EmailAddress);
59 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,GivenName);
60 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,NameIDFormat);
61 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,SurName);
62 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,TelephoneNumber);
64 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,ActionNamespace);
65 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,SourceID);
67 class SAML_DLLLOCAL localizedNameTypeImpl : public virtual localizedNameType,
68 public AbstractSimpleElement,
69 public AbstractDOMCachingXMLObject,
70 public AbstractXMLObjectMarshaller,
71 public AbstractXMLObjectUnmarshaller
79 localizedNameTypeImpl() {
84 virtual ~localizedNameTypeImpl() {
85 XMLString::release(&m_Lang);
86 XMLString::release(&m_LangPrefix);
89 localizedNameTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
90 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
94 localizedNameTypeImpl(const localizedNameTypeImpl& src)
95 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
97 setLang(src.getLang());
99 m_LangPrefix = XMLString::replicate(src.m_LangPrefix);
102 IMPL_XMLOBJECT_CLONE(localizedNameType);
103 IMPL_XMLOBJECT_FOREIGN_ATTRIB(Lang,XMLCh);
106 void marshallAttributes(DOMElement* domElement) const {
107 if (m_Lang && *m_Lang) {
108 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(xmlconstants::XML_NS,LANG_ATTRIB_NAME);
109 if (m_LangPrefix && *m_LangPrefix)
110 attr->setPrefix(m_LangPrefix);
111 attr->setNodeValue(m_Lang);
112 domElement->setAttributeNodeNS(attr);
116 void processAttribute(const DOMAttr* attribute) {
117 if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
118 setLang(attribute->getValue());
119 const XMLCh* temp = attribute->getPrefix();
120 if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
121 m_LangPrefix = XMLString::replicate(temp);
124 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
128 class SAML_DLLLOCAL localizedURITypeImpl : public virtual localizedURIType,
129 public AbstractSimpleElement,
130 public AbstractDOMCachingXMLObject,
131 public AbstractXMLObjectMarshaller,
132 public AbstractXMLObjectUnmarshaller
140 localizedURITypeImpl() {
145 virtual ~localizedURITypeImpl() {
146 XMLString::release(&m_Lang);
147 XMLString::release(&m_LangPrefix);
150 localizedURITypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
151 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
155 localizedURITypeImpl(const localizedURITypeImpl& src)
156 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
158 setLang(src.getLang());
159 if (src.m_LangPrefix)
160 m_LangPrefix = XMLString::replicate(src.m_LangPrefix);
163 IMPL_XMLOBJECT_CLONE(localizedURIType);
164 IMPL_XMLOBJECT_FOREIGN_ATTRIB(Lang,XMLCh);
167 void marshallAttributes(DOMElement* domElement) const {
168 if (m_Lang && *m_Lang) {
169 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(xmlconstants::XML_NS,LANG_ATTRIB_NAME);
170 if (m_LangPrefix && *m_LangPrefix)
171 attr->setPrefix(m_LangPrefix);
172 attr->setNodeValue(m_Lang);
173 domElement->setAttributeNodeNS(attr);
177 void processAttribute(const DOMAttr* attribute) {
178 if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
179 setLang(attribute->getValue());
180 const XMLCh* temp = attribute->getPrefix();
181 if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
182 m_LangPrefix = XMLString::replicate(temp);
185 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
189 class SAML_DLLLOCAL OrganizationNameImpl : public virtual OrganizationName, public localizedNameTypeImpl
192 virtual ~OrganizationNameImpl() {}
194 OrganizationNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
195 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
197 OrganizationNameImpl(const OrganizationNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
199 IMPL_XMLOBJECT_CLONE(OrganizationName);
200 localizedNameType* clonelocalizedNameType() const {
201 return new OrganizationNameImpl(*this);
205 class SAML_DLLLOCAL OrganizationDisplayNameImpl : public virtual OrganizationDisplayName, public localizedNameTypeImpl
208 virtual ~OrganizationDisplayNameImpl() {}
210 OrganizationDisplayNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
211 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
213 OrganizationDisplayNameImpl(const OrganizationDisplayNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
215 IMPL_XMLOBJECT_CLONE(OrganizationDisplayName);
216 localizedNameType* clonelocalizedNameType() const {
217 return new OrganizationDisplayNameImpl(*this);
221 class SAML_DLLLOCAL OrganizationURLImpl : public virtual OrganizationURL, public localizedURITypeImpl
224 virtual ~OrganizationURLImpl() {}
226 OrganizationURLImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
227 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
229 OrganizationURLImpl(const OrganizationURLImpl& src) : AbstractXMLObject(src), localizedURITypeImpl(src) {}
231 IMPL_XMLOBJECT_CLONE(OrganizationURL);
232 localizedURIType* clonelocalizedURIType() const {
233 return new OrganizationURLImpl(*this);
237 class SAML_DLLLOCAL ServiceNameImpl : public virtual ServiceName, public localizedNameTypeImpl
240 virtual ~ServiceNameImpl() {}
242 ServiceNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
243 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
245 ServiceNameImpl(const ServiceNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
247 IMPL_XMLOBJECT_CLONE(ServiceName);
248 localizedNameType* clonelocalizedNameType() const {
249 return new ServiceNameImpl(*this);
253 class SAML_DLLLOCAL ServiceDescriptionImpl : public virtual ServiceDescription, public localizedNameTypeImpl
256 virtual ~ServiceDescriptionImpl() {}
258 ServiceDescriptionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
259 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
261 ServiceDescriptionImpl(const ServiceDescriptionImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
263 IMPL_XMLOBJECT_CLONE(ServiceDescription);
264 localizedNameType* clonelocalizedNameType() const {
265 return new ServiceDescriptionImpl(*this);
269 class SAML_DLLLOCAL ExtensionsImpl : public virtual Extensions,
270 public AbstractComplexElement,
271 public AbstractDOMCachingXMLObject,
272 public AbstractXMLObjectMarshaller,
273 public AbstractXMLObjectUnmarshaller
276 virtual ~ExtensionsImpl() {}
278 ExtensionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
279 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
282 ExtensionsImpl(const ExtensionsImpl& src)
283 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
284 VectorOf(XMLObject) v=getUnknownXMLObjects();
285 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
286 v.push_back((*i)->clone());
289 IMPL_XMLOBJECT_CLONE(Extensions);
290 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
293 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
295 const XMLCh* nsURI=root->getNamespaceURI();
296 if (!XMLString::equals(nsURI,SAML20MD_NS) && nsURI && *nsURI) {
297 getUnknownXMLObjects().push_back(childXMLObject);
301 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
305 class SAML_DLLLOCAL OrganizationImpl : public virtual Organization,
306 public AbstractComplexElement,
307 public AbstractAttributeExtensibleXMLObject,
308 public AbstractDOMCachingXMLObject,
309 public AbstractXMLObjectMarshaller,
310 public AbstractXMLObjectUnmarshaller
312 list<XMLObject*>::iterator m_pos_OrganizationDisplayName;
313 list<XMLObject*>::iterator m_pos_OrganizationURL;
316 m_children.push_back(NULL);
317 m_children.push_back(NULL);
318 m_children.push_back(NULL);
320 m_pos_Extensions=m_children.begin();
321 m_pos_OrganizationDisplayName=m_pos_Extensions;
322 ++m_pos_OrganizationDisplayName;
323 m_pos_OrganizationURL=m_pos_OrganizationDisplayName;
324 ++m_pos_OrganizationURL;
327 virtual ~OrganizationImpl() {}
329 OrganizationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
330 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
334 OrganizationImpl(const OrganizationImpl& src)
335 : AbstractXMLObject(src), AbstractComplexElement(src),
336 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
338 if (src.getExtensions())
339 setExtensions(src.getExtensions()->cloneExtensions());
340 VectorOf(OrganizationName) v=getOrganizationNames();
341 for (vector<OrganizationName*>::const_iterator i=src.m_OrganizationNames.begin(); i!=src.m_OrganizationNames.end(); i++) {
343 v.push_back((*i)->cloneOrganizationName());
346 VectorOf(OrganizationDisplayName) w=getOrganizationDisplayNames();
347 for (vector<OrganizationDisplayName*>::const_iterator j=src.m_OrganizationDisplayNames.begin(); j!=src.m_OrganizationDisplayNames.end(); j++) {
349 w.push_back((*j)->cloneOrganizationDisplayName());
352 VectorOf(OrganizationURL) x=getOrganizationURLs();
353 for (vector<OrganizationURL*>::const_iterator k=src.m_OrganizationURLs.begin(); k!=src.m_OrganizationURLs.end(); k++) {
355 x.push_back((*k)->cloneOrganizationURL());
360 IMPL_XMLOBJECT_CLONE(Organization);
361 IMPL_TYPED_CHILD(Extensions);
362 IMPL_TYPED_CHILDREN(OrganizationName,m_pos_OrganizationDisplayName);
363 IMPL_TYPED_CHILDREN(OrganizationDisplayName,m_pos_OrganizationURL);
364 IMPL_TYPED_CHILDREN(OrganizationURL,m_children.end());
367 void marshallAttributes(DOMElement* domElement) const {
368 marshallExtensionAttributes(domElement);
371 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
372 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
373 PROC_TYPED_CHILDREN(OrganizationName,SAML20MD_NS,false);
374 PROC_TYPED_CHILDREN(OrganizationDisplayName,SAML20MD_NS,false);
375 PROC_TYPED_CHILDREN(OrganizationURL,SAML20MD_NS,false);
376 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
379 void processAttribute(const DOMAttr* attribute) {
380 unmarshallExtensionAttribute(attribute);
384 class SAML_DLLLOCAL ContactPersonImpl : public virtual ContactPerson,
385 public AbstractComplexElement,
386 public AbstractAttributeExtensibleXMLObject,
387 public AbstractDOMCachingXMLObject,
388 public AbstractXMLObjectMarshaller,
389 public AbstractXMLObjectUnmarshaller
391 list<XMLObject*>::iterator m_pos_TelephoneNumber;
395 m_children.push_back(NULL);
396 m_children.push_back(NULL);
397 m_children.push_back(NULL);
398 m_children.push_back(NULL);
399 m_children.push_back(NULL);
404 m_pos_Extensions=m_children.begin();
405 m_pos_Company=m_pos_Extensions;
407 m_pos_GivenName=m_pos_Company;
409 m_pos_SurName=m_pos_GivenName;
411 m_pos_TelephoneNumber=m_pos_SurName;
412 ++m_pos_TelephoneNumber;
415 virtual ~ContactPersonImpl() {
416 XMLString::release(&m_ContactType);
419 ContactPersonImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
420 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
424 ContactPersonImpl(const ContactPersonImpl& src)
425 : AbstractXMLObject(src), AbstractComplexElement(src),
426 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
428 if (src.getExtensions())
429 setExtensions(src.getExtensions()->cloneExtensions());
430 if (src.getCompany())
431 setCompany(src.getCompany()->cloneCompany());
432 if (src.getGivenName())
433 setGivenName(src.getGivenName()->cloneGivenName());
434 if (src.getSurName())
435 setSurName(src.getSurName()->cloneSurName());
437 VectorOf(EmailAddress) v=getEmailAddresss();
438 for (vector<EmailAddress*>::const_iterator i=src.m_EmailAddresss.begin(); i!=src.m_EmailAddresss.end(); i++) {
440 v.push_back((*i)->cloneEmailAddress());
443 VectorOf(TelephoneNumber) w=getTelephoneNumbers();
444 for (vector<TelephoneNumber*>::const_iterator j=src.m_TelephoneNumbers.begin(); j!=src.m_TelephoneNumbers.end(); j++) {
446 w.push_back((*j)->cloneTelephoneNumber());
451 IMPL_XMLOBJECT_CLONE(ContactPerson);
452 IMPL_STRING_ATTRIB(ContactType);
453 IMPL_TYPED_CHILD(Extensions);
454 IMPL_TYPED_CHILD(Company);
455 IMPL_TYPED_CHILD(GivenName);
456 IMPL_TYPED_CHILD(SurName);
457 IMPL_TYPED_CHILDREN(EmailAddress,m_pos_TelephoneNumber);
458 IMPL_TYPED_CHILDREN(TelephoneNumber,m_children.end());
460 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
461 if (!qualifiedName.hasNamespaceURI()) {
462 if (XMLString::equals(qualifiedName.getLocalPart(),CONTACTTYPE_ATTRIB_NAME)) {
463 setContactType(value);
467 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
471 void marshallAttributes(DOMElement* domElement) const {
472 MARSHALL_STRING_ATTRIB(ContactType,CONTACTTYPE,NULL);
473 marshallExtensionAttributes(domElement);
476 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
477 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
478 PROC_TYPED_CHILD(Company,SAML20MD_NS,false);
479 PROC_TYPED_CHILD(GivenName,SAML20MD_NS,false);
480 PROC_TYPED_CHILD(SurName,SAML20MD_NS,false);
481 PROC_TYPED_CHILDREN(EmailAddress,SAML20MD_NS,false);
482 PROC_TYPED_CHILDREN(TelephoneNumber,SAML20MD_NS,false);
483 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
486 void processAttribute(const DOMAttr* attribute) {
487 unmarshallExtensionAttribute(attribute);
491 class SAML_DLLLOCAL AdditionalMetadataLocationImpl : public virtual AdditionalMetadataLocation,
492 public AbstractSimpleElement,
493 public AbstractDOMCachingXMLObject,
494 public AbstractXMLObjectMarshaller,
495 public AbstractXMLObjectUnmarshaller
502 virtual ~AdditionalMetadataLocationImpl() {
503 XMLString::release(&m_Namespace);
506 AdditionalMetadataLocationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
507 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
511 AdditionalMetadataLocationImpl(const AdditionalMetadataLocationImpl& src)
512 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
516 IMPL_XMLOBJECT_CLONE(AdditionalMetadataLocation);
517 IMPL_STRING_ATTRIB(Namespace);
520 void marshallAttributes(DOMElement* domElement) const {
521 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
524 void processAttribute(const DOMAttr* attribute) {
525 PROC_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
526 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
530 class SAML_DLLLOCAL KeyDescriptorImpl : public virtual KeyDescriptor,
531 public AbstractComplexElement,
532 public AbstractDOMCachingXMLObject,
533 public AbstractXMLObjectMarshaller,
534 public AbstractXMLObjectUnmarshaller
539 m_children.push_back(NULL);
540 m_pos_KeyInfo=m_children.begin();
543 virtual ~KeyDescriptorImpl() {
544 XMLString::release(&m_Use);
547 KeyDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
548 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
552 KeyDescriptorImpl(const KeyDescriptorImpl& src)
553 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
555 setUse(src.getUse());
556 if (src.getKeyInfo())
557 setKeyInfo(src.getKeyInfo()->cloneKeyInfo());
558 VectorOf(EncryptionMethod) v=getEncryptionMethods();
559 for (vector<EncryptionMethod*>::const_iterator i=src.m_EncryptionMethods.begin(); i!=src.m_EncryptionMethods.end(); i++) {
561 v.push_back((*i)->cloneEncryptionMethod());
566 IMPL_XMLOBJECT_CLONE(KeyDescriptor);
567 IMPL_STRING_ATTRIB(Use);
568 IMPL_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature);
569 IMPL_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,m_children.end());
572 void marshallAttributes(DOMElement* domElement) const {
573 MARSHALL_STRING_ATTRIB(Use,USE,NULL);
576 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
577 PROC_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature,XMLSIG_NS,false);
578 PROC_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,SAML20MD_NS,false);
579 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
582 void processAttribute(const DOMAttr* attribute) {
583 PROC_STRING_ATTRIB(Use,USE,NULL);
584 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
588 class SAML_DLLLOCAL EndpointTypeImpl : public virtual EndpointType,
589 public AbstractAttributeExtensibleXMLObject,
590 public AbstractComplexElement,
591 public AbstractDOMCachingXMLObject,
592 public AbstractXMLObjectMarshaller,
593 public AbstractXMLObjectUnmarshaller
596 m_Binding=m_Location=m_ResponseLocation=NULL;
605 virtual ~EndpointTypeImpl() {
606 XMLString::release(&m_Binding);
607 XMLString::release(&m_Location);
608 XMLString::release(&m_ResponseLocation);
611 EndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
612 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
615 EndpointTypeImpl(const EndpointTypeImpl& src)
616 : AbstractXMLObject(src),
617 AbstractAttributeExtensibleXMLObject(src),
618 AbstractComplexElement(src),
619 AbstractDOMCachingXMLObject(src) {
620 setBinding(src.getBinding());
621 setLocation(src.getLocation());
622 setResponseLocation(src.getResponseLocation());
623 VectorOf(XMLObject) v=getUnknownXMLObjects();
624 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
625 v.push_back((*i)->clone());
628 IMPL_XMLOBJECT_CLONE(EndpointType);
629 IMPL_STRING_ATTRIB(Binding);
630 IMPL_STRING_ATTRIB(Location);
631 IMPL_STRING_ATTRIB(ResponseLocation);
632 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
634 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
635 if (!qualifiedName.hasNamespaceURI()) {
636 if (XMLString::equals(qualifiedName.getLocalPart(),BINDING_ATTRIB_NAME)) {
640 else if (XMLString::equals(qualifiedName.getLocalPart(),LOCATION_ATTRIB_NAME)) {
644 else if (XMLString::equals(qualifiedName.getLocalPart(),RESPONSELOCATION_ATTRIB_NAME)) {
645 setResponseLocation(value);
649 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
652 void marshallAttributes(DOMElement* domElement) const {
653 MARSHALL_STRING_ATTRIB(Binding,BINDING,NULL);
654 MARSHALL_STRING_ATTRIB(Location,LOCATION,NULL);
655 MARSHALL_STRING_ATTRIB(ResponseLocation,RESPONSELOCATION,NULL);
656 marshallExtensionAttributes(domElement);
659 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
661 const XMLCh* nsURI=root->getNamespaceURI();
662 if (!XMLString::equals(nsURI,SAML20MD_NS) && nsURI && *nsURI) {
663 getUnknownXMLObjects().push_back(childXMLObject);
666 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
669 void processAttribute(const DOMAttr* attribute) {
670 unmarshallExtensionAttribute(attribute);
674 class SAML_DLLLOCAL IndexedEndpointTypeImpl : public virtual IndexedEndpointType, public EndpointTypeImpl
678 m_isDefault=XML_BOOL_NULL;
682 IndexedEndpointTypeImpl() {
686 virtual ~IndexedEndpointTypeImpl() {
687 XMLString::release(&m_Index);
690 IndexedEndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
691 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
693 IndexedEndpointTypeImpl(const IndexedEndpointTypeImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {
694 setIndex(src.m_Index);
695 isDefault(src.m_isDefault);
698 IMPL_XMLOBJECT_CLONE(IndexedEndpointType);
699 EndpointType* cloneEndpointType() const {
700 return new IndexedEndpointTypeImpl(*this);
703 IMPL_INTEGER_ATTRIB(Index);
704 IMPL_BOOLEAN_ATTRIB(isDefault);
706 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
707 if (!qualifiedName.hasNamespaceURI()) {
708 if (XMLString::equals(qualifiedName.getLocalPart(),INDEX_ATTRIB_NAME)) {
712 else if (XMLString::equals(qualifiedName.getLocalPart(),ISDEFAULT_ATTRIB_NAME)) {
717 EndpointTypeImpl::setAttribute(qualifiedName, value, ID);
721 void marshallAttributes(DOMElement* domElement) const {
722 MARSHALL_INTEGER_ATTRIB(Index,INDEX,NULL);
723 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
724 EndpointTypeImpl::marshallAttributes(domElement);
728 class SAML_DLLLOCAL ArtifactResolutionServiceImpl : public virtual ArtifactResolutionService, public IndexedEndpointTypeImpl
731 virtual ~ArtifactResolutionServiceImpl() {}
733 ArtifactResolutionServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
734 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
736 ArtifactResolutionServiceImpl(const ArtifactResolutionServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
738 IMPL_XMLOBJECT_CLONE(ArtifactResolutionService);
739 IndexedEndpointType* cloneIndexedEndpointType() const {
740 return new ArtifactResolutionServiceImpl(*this);
742 EndpointType* cloneEndpointType() const {
743 return new ArtifactResolutionServiceImpl(*this);
747 class SAML_DLLLOCAL SingleLogoutServiceImpl : public virtual SingleLogoutService, public EndpointTypeImpl
750 virtual ~SingleLogoutServiceImpl() {}
752 SingleLogoutServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
753 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
755 SingleLogoutServiceImpl(const SingleLogoutServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
757 IMPL_XMLOBJECT_CLONE(SingleLogoutService);
758 EndpointType* cloneEndpointType() const {
759 return new SingleLogoutServiceImpl(*this);
763 class SAML_DLLLOCAL ManageNameIDServiceImpl : public virtual ManageNameIDService, public EndpointTypeImpl
766 virtual ~ManageNameIDServiceImpl() {}
768 ManageNameIDServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
769 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
771 ManageNameIDServiceImpl(const ManageNameIDServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
773 IMPL_XMLOBJECT_CLONE(ManageNameIDService);
774 EndpointType* cloneEndpointType() const {
775 return new ManageNameIDServiceImpl(*this);
779 class SAML_DLLLOCAL SingleSignOnServiceImpl : public virtual SingleSignOnService, public EndpointTypeImpl
782 virtual ~SingleSignOnServiceImpl() {}
784 SingleSignOnServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
785 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
787 SingleSignOnServiceImpl(const SingleSignOnServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
789 IMPL_XMLOBJECT_CLONE(SingleSignOnService);
790 EndpointType* cloneEndpointType() const {
791 return new SingleSignOnServiceImpl(*this);
795 class SAML_DLLLOCAL NameIDMappingServiceImpl : public virtual NameIDMappingService, public EndpointTypeImpl
798 virtual ~NameIDMappingServiceImpl() {}
800 NameIDMappingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
801 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
803 NameIDMappingServiceImpl(const NameIDMappingServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
805 IMPL_XMLOBJECT_CLONE(NameIDMappingService);
806 EndpointType* cloneEndpointType() const {
807 return new NameIDMappingServiceImpl(*this);
811 class SAML_DLLLOCAL AssertionIDRequestServiceImpl : public virtual AssertionIDRequestService, public EndpointTypeImpl
814 virtual ~AssertionIDRequestServiceImpl() {}
816 AssertionIDRequestServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
817 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
819 AssertionIDRequestServiceImpl(const AssertionIDRequestServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
821 IMPL_XMLOBJECT_CLONE(AssertionIDRequestService);
822 EndpointType* cloneEndpointType() const {
823 return new AssertionIDRequestServiceImpl(*this);
827 class SAML_DLLLOCAL AssertionConsumerServiceImpl : public virtual AssertionConsumerService, public IndexedEndpointTypeImpl
830 virtual ~AssertionConsumerServiceImpl() {}
832 AssertionConsumerServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
833 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
835 AssertionConsumerServiceImpl(const AssertionConsumerServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
837 IMPL_XMLOBJECT_CLONE(AssertionConsumerService);
838 EndpointType* cloneEndpointType() const {
839 return new AssertionConsumerServiceImpl(*this);
841 IndexedEndpointType* cloneIndexedEndpointType() const {
842 return new AssertionConsumerServiceImpl(*this);
846 class SAML_DLLLOCAL AuthnQueryServiceImpl : public virtual AuthnQueryService, public EndpointTypeImpl
849 virtual ~AuthnQueryServiceImpl() {}
851 AuthnQueryServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
852 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
854 AuthnQueryServiceImpl(const AuthnQueryServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
856 IMPL_XMLOBJECT_CLONE(AuthnQueryService);
857 EndpointType* cloneEndpointType() const {
858 return new AuthnQueryServiceImpl(*this);
862 class SAML_DLLLOCAL AuthzServiceImpl : public virtual AuthzService, public EndpointTypeImpl
865 virtual ~AuthzServiceImpl() {}
867 AuthzServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
868 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
870 AuthzServiceImpl(const AuthzServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
872 IMPL_XMLOBJECT_CLONE(AuthzService);
873 EndpointType* cloneEndpointType() const {
874 return new AuthzServiceImpl(*this);
878 class SAML_DLLLOCAL AttributeServiceImpl : public virtual AttributeService, public EndpointTypeImpl
881 virtual ~AttributeServiceImpl() {}
883 AttributeServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
884 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
886 AttributeServiceImpl(const AttributeServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
888 IMPL_XMLOBJECT_CLONE(AttributeService);
889 EndpointType* cloneEndpointType() const {
890 return new AttributeServiceImpl(*this);
894 class SAML_DLLLOCAL RoleDescriptorImpl : public virtual RoleDescriptor,
895 public virtual SignableObject,
896 public AbstractComplexElement,
897 public AbstractAttributeExtensibleXMLObject,
898 public AbstractDOMCachingXMLObject,
899 public AbstractXMLObjectMarshaller,
900 public AbstractXMLObjectUnmarshaller
903 m_ID=m_ProtocolSupportEnumeration=m_ErrorURL=NULL;
904 m_ValidUntil=m_CacheDuration=NULL;
905 m_children.push_back(NULL);
906 m_children.push_back(NULL);
907 m_children.push_back(NULL);
908 m_children.push_back(NULL);
912 m_pos_Signature=m_children.begin();
913 m_pos_Extensions=m_pos_Signature;
915 m_pos_Organization=m_pos_Extensions;
916 ++m_pos_Organization;
917 m_pos_ContactPerson=m_pos_Organization;
918 ++m_pos_ContactPerson;
922 list<XMLObject*>::iterator m_pos_ContactPerson;
924 RoleDescriptorImpl() {
929 virtual ~RoleDescriptorImpl() {
930 XMLString::release(&m_ID);
931 XMLString::release(&m_ProtocolSupportEnumeration);
932 XMLString::release(&m_ErrorURL);
934 delete m_CacheDuration;
937 RoleDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
938 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
942 RoleDescriptorImpl(const RoleDescriptorImpl& src)
943 : AbstractXMLObject(src), AbstractComplexElement(src),
944 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
947 setProtocolSupportEnumeration(src.getProtocolSupportEnumeration());
948 setErrorURL(src.getErrorURL());
949 setValidUntil(src.getValidUntil());
950 setCacheDuration(src.getCacheDuration());
951 if (src.getSignature())
952 setSignature(src.getSignature()->cloneSignature());
953 if (src.getExtensions())
954 setExtensions(src.getExtensions()->cloneExtensions());
955 if (src.getOrganization())
956 setOrganization(src.getOrganization()->cloneOrganization());
958 VectorOf(KeyDescriptor) v=getKeyDescriptors();
959 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
961 v.push_back((*i)->cloneKeyDescriptor());
964 VectorOf(ContactPerson) w=getContactPersons();
965 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
967 w.push_back((*j)->cloneContactPerson());
972 //IMPL_TYPED_CHILD(Signature);
973 // Need customized setter.
975 Signature* m_Signature;
976 list<XMLObject*>::iterator m_pos_Signature;
978 Signature* getSignature() const {
982 void setSignature(Signature* sig) {
983 prepareForAssignment(m_Signature,sig);
984 *m_pos_Signature=m_Signature=sig;
985 // Sync content reference back up.
987 m_Signature->setContentReference(new opensaml::ContentReference(*this));
991 IMPL_STRING_ATTRIB(ProtocolSupportEnumeration);
992 IMPL_STRING_ATTRIB(ErrorURL);
993 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
994 IMPL_DURATION_ATTRIB(CacheDuration,0);
995 IMPL_TYPED_CHILD(Extensions);
996 IMPL_TYPED_CHILDREN(KeyDescriptor,m_pos_Organization);
997 IMPL_TYPED_CHILD(Organization);
998 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
1000 bool hasSupport(const XMLCh* protocol) const {
1001 if (!protocol || !*protocol)
1003 if (m_ProtocolSupportEnumeration) {
1004 // Look for first character.
1005 unsigned int len=XMLString::stringLen(protocol);
1007 int index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
1009 // Only possible match is if it's the first character or a space comes before it.
1010 if (index==0 || m_ProtocolSupportEnumeration[index-1]==chSpace) {
1011 // See if rest of protocol string is present.
1012 if (0==XMLString::compareNString(m_ProtocolSupportEnumeration+index+1,protocol+1,len-1)) {
1013 // Only possible match is if it's the last character or a space comes after it.
1014 if (m_ProtocolSupportEnumeration[index+len]==chNull || m_ProtocolSupportEnumeration[index+len]==chSpace)
1020 // Move past last search and start again.
1025 // Move past last search and start again.
1028 index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
1034 void addSupport(const XMLCh* protocol) {
1035 if (hasSupport(protocol))
1037 if (m_ProtocolSupportEnumeration && *m_ProtocolSupportEnumeration) {
1038 #ifdef HAVE_GOOD_STL
1039 xstring pse(m_ProtocolSupportEnumeration);
1040 pse = pse + chSpace + protocol;
1041 setProtocolSupportEnumeration(pse.c_str());
1043 auto_ptr_char temp(m_ProtocolSupportEnumeration);
1044 auto_ptr_char temp2(protocol);
1045 string pse(temp.get());
1046 pse = pse + ' ' + temp2.get();
1047 auto_ptr_XMLCh temp3(pse.c_str());
1048 setProtocolSupportEnumeration(temp3.get());
1052 setProtocolSupportEnumeration(protocol);
1056 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1057 if (!qualifiedName.hasNamespaceURI()) {
1058 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
1062 else if (XMLString::equals(qualifiedName.getLocalPart(),PROTOCOLSUPPORTENUMERATION_ATTRIB_NAME)) {
1063 setProtocolSupportEnumeration(value);
1066 else if (XMLString::equals(qualifiedName.getLocalPart(),ERRORURL_ATTRIB_NAME)) {
1070 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
1071 setValidUntil(value);
1074 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
1075 setCacheDuration(value);
1079 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1083 void marshallAttributes(DOMElement* domElement) const {
1084 MARSHALL_ID_ATTRIB(ID,ID,NULL);
1085 MARSHALL_STRING_ATTRIB(ProtocolSupportEnumeration,PROTOCOLSUPPORTENUMERATION,NULL);
1086 MARSHALL_STRING_ATTRIB(ErrorURL,ERRORURL,NULL);
1087 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
1088 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
1089 marshallExtensionAttributes(domElement);
1092 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1093 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
1094 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
1095 PROC_TYPED_CHILDREN(KeyDescriptor,SAML20MD_NS,false);
1096 PROC_TYPED_CHILD(Organization,SAML20MD_NS,false);
1097 PROC_TYPED_CHILDREN(ContactPerson,SAML20MD_NS,false);
1098 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1101 void processAttribute(const DOMAttr* attribute) {
1102 PROC_ID_ATTRIB(ID,ID,NULL);
1103 unmarshallExtensionAttribute(attribute);
1107 class SAML_DLLLOCAL RoleDescriptorTypeImpl : public virtual RoleDescriptorType, public RoleDescriptorImpl
1110 virtual ~RoleDescriptorTypeImpl() {}
1112 RoleDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1113 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1116 RoleDescriptorTypeImpl(const RoleDescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1117 VectorOf(XMLObject) v=getUnknownXMLObjects();
1118 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
1119 v.push_back((*i)->clone());
1122 IMPL_XMLOBJECT_CLONE(RoleDescriptorType);
1123 RoleDescriptor* cloneRoleDescriptor() const {
1124 return new RoleDescriptorTypeImpl(*this);
1127 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
1130 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1131 getUnknownXMLObjects().push_back(childXMLObject);
1135 class SAML_DLLLOCAL SSODescriptorTypeImpl : public virtual SSODescriptorType, public RoleDescriptorImpl
1138 m_children.push_back(NULL);
1139 m_children.push_back(NULL);
1140 m_children.push_back(NULL);
1141 m_children.push_back(NULL);
1142 m_pos_ArtifactResolutionService=m_pos_ContactPerson;
1143 ++m_pos_ArtifactResolutionService;
1144 m_pos_SingleLogoutService=m_pos_ArtifactResolutionService;
1145 ++m_pos_SingleLogoutService;
1146 m_pos_ManageNameIDService=m_pos_SingleLogoutService;
1147 ++m_pos_ManageNameIDService;
1148 m_pos_NameIDFormat=m_pos_ManageNameIDService;
1149 ++m_pos_NameIDFormat;
1153 list<XMLObject*>::iterator m_pos_ArtifactResolutionService;
1154 list<XMLObject*>::iterator m_pos_SingleLogoutService;
1155 list<XMLObject*>::iterator m_pos_ManageNameIDService;
1156 list<XMLObject*>::iterator m_pos_NameIDFormat;
1158 SSODescriptorTypeImpl() {
1163 virtual ~SSODescriptorTypeImpl() {}
1165 SSODescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1166 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1170 SSODescriptorTypeImpl(const SSODescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1172 VectorOf(ArtifactResolutionService) v=getArtifactResolutionServices();
1173 for (vector<ArtifactResolutionService*>::const_iterator i=src.m_ArtifactResolutionServices.begin(); i!=src.m_ArtifactResolutionServices.end(); i++) {
1175 v.push_back((*i)->cloneArtifactResolutionService());
1178 VectorOf(SingleLogoutService) w=getSingleLogoutServices();
1179 for (vector<SingleLogoutService*>::const_iterator j=src.m_SingleLogoutServices.begin(); j!=src.m_SingleLogoutServices.end(); j++) {
1181 w.push_back((*j)->cloneSingleLogoutService());
1184 VectorOf(ManageNameIDService) x=getManageNameIDServices();
1185 for (vector<ManageNameIDService*>::const_iterator k=src.m_ManageNameIDServices.begin(); k!=src.m_ManageNameIDServices.end(); k++) {
1187 x.push_back((*k)->cloneManageNameIDService());
1190 VectorOf(NameIDFormat) y=getNameIDFormats();
1191 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1193 y.push_back((*m)->cloneNameIDFormat());
1198 IMPL_TYPED_CHILDREN(ArtifactResolutionService,m_pos_ArtifactResolutionService);
1199 IMPL_TYPED_CHILDREN(SingleLogoutService,m_pos_SingleLogoutService);
1200 IMPL_TYPED_CHILDREN(ManageNameIDService,m_pos_ManageNameIDService);
1201 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1204 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1205 PROC_TYPED_CHILDREN(ArtifactResolutionService,SAML20MD_NS,false);
1206 PROC_TYPED_CHILDREN(SingleLogoutService,SAML20MD_NS,false);
1207 PROC_TYPED_CHILDREN(ManageNameIDService,SAML20MD_NS,false);
1208 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1209 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1213 class SAML_DLLLOCAL IDPSSODescriptorImpl : public virtual IDPSSODescriptor, public SSODescriptorTypeImpl
1215 list<XMLObject*>::iterator m_pos_SingleSignOnService;
1216 list<XMLObject*>::iterator m_pos_NameIDMappingService;
1217 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1218 list<XMLObject*>::iterator m_pos_AttributeProfile;
1221 m_WantAuthnRequestsSigned=XML_BOOL_NULL;
1222 m_children.push_back(NULL);
1223 m_children.push_back(NULL);
1224 m_children.push_back(NULL);
1225 m_children.push_back(NULL);
1226 m_pos_SingleSignOnService=m_pos_NameIDFormat;
1227 ++m_pos_SingleSignOnService;
1228 m_pos_NameIDMappingService=m_pos_SingleSignOnService;
1229 ++m_pos_NameIDMappingService;
1230 m_pos_AssertionIDRequestService=m_pos_NameIDMappingService;
1231 ++m_pos_AssertionIDRequestService;
1232 m_pos_AttributeProfile=m_pos_AssertionIDRequestService;
1233 ++m_pos_AttributeProfile;
1237 virtual ~IDPSSODescriptorImpl() {}
1239 IDPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1240 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1244 IDPSSODescriptorImpl(const IDPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1246 WantAuthnRequestsSigned(src.m_WantAuthnRequestsSigned);
1247 VectorOf(SingleSignOnService) v=getSingleSignOnServices();
1248 for (vector<SingleSignOnService*>::const_iterator i=src.m_SingleSignOnServices.begin(); i!=src.m_SingleSignOnServices.end(); i++) {
1250 v.push_back((*i)->cloneSingleSignOnService());
1253 VectorOf(NameIDMappingService) w=getNameIDMappingServices();
1254 for (vector<NameIDMappingService*>::const_iterator j=src.m_NameIDMappingServices.begin(); j!=src.m_NameIDMappingServices.end(); j++) {
1256 w.push_back((*j)->cloneNameIDMappingService());
1259 VectorOf(AssertionIDRequestService) x=getAssertionIDRequestServices();
1260 for (vector<AssertionIDRequestService*>::const_iterator k=src.m_AssertionIDRequestServices.begin(); k!=src.m_AssertionIDRequestServices.end(); k++) {
1262 x.push_back((*k)->cloneAssertionIDRequestService());
1265 VectorOf(AttributeProfile) y=getAttributeProfiles();
1266 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1268 y.push_back((*m)->cloneAttributeProfile());
1271 VectorOf(Attribute) z=getAttributes();
1272 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1274 z.push_back((*n)->cloneAttribute());
1279 IMPL_XMLOBJECT_CLONE(IDPSSODescriptor);
1280 SSODescriptorType* cloneSSODescriptorType() const {
1281 return new IDPSSODescriptorImpl(*this);
1283 RoleDescriptor* cloneRoleDescriptor() const {
1284 return new IDPSSODescriptorImpl(*this);
1287 IMPL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned);
1288 IMPL_TYPED_CHILDREN(SingleSignOnService,m_pos_SingleSignOnService);
1289 IMPL_TYPED_CHILDREN(NameIDMappingService,m_pos_NameIDMappingService);
1290 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1291 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1292 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1294 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1295 if (!qualifiedName.hasNamespaceURI()) {
1296 if (XMLString::equals(qualifiedName.getLocalPart(),WANTAUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1297 setWantAuthnRequestsSigned(value);
1301 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1305 void marshallAttributes(DOMElement* domElement) const {
1306 MARSHALL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned,WANTAUTHNREQUESTSSIGNED,NULL);
1307 RoleDescriptorImpl::marshallAttributes(domElement);
1310 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1311 PROC_TYPED_CHILDREN(SingleSignOnService,SAML20MD_NS,false);
1312 PROC_TYPED_CHILDREN(NameIDMappingService,SAML20MD_NS,false);
1313 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1314 PROC_TYPED_CHILDREN(AttributeProfile,SAML20MD_NS,false);
1315 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
1316 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1320 class SAML_DLLLOCAL RequestedAttributeImpl : public virtual RequestedAttribute,
1321 public AbstractComplexElement,
1322 public AbstractAttributeExtensibleXMLObject,
1323 public AbstractDOMCachingXMLObject,
1324 public AbstractXMLObjectMarshaller,
1325 public AbstractXMLObjectUnmarshaller
1328 m_Name=m_NameFormat=m_FriendlyName=NULL;
1329 m_isRequired=XML_BOOL_NULL;
1332 virtual ~RequestedAttributeImpl() {
1333 XMLString::release(&m_Name);
1334 XMLString::release(&m_NameFormat);
1335 XMLString::release(&m_FriendlyName);
1338 RequestedAttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1339 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1343 RequestedAttributeImpl(const RequestedAttributeImpl& src)
1344 : AbstractXMLObject(src), AbstractComplexElement(src),
1345 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1347 setName(src.getName());
1348 setNameFormat(src.getNameFormat());
1349 setFriendlyName(src.getFriendlyName());
1350 isRequired(src.m_isRequired);
1351 VectorOf(XMLObject) v=getAttributeValues();
1352 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
1354 v.push_back((*i)->clone());
1359 IMPL_XMLOBJECT_CLONE(RequestedAttribute);
1360 Attribute* cloneAttribute() const {
1361 return new RequestedAttributeImpl(*this);
1364 IMPL_STRING_ATTRIB(Name);
1365 IMPL_STRING_ATTRIB(NameFormat);
1366 IMPL_STRING_ATTRIB(FriendlyName);
1367 IMPL_BOOLEAN_ATTRIB(isRequired);
1368 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
1370 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1371 if (!qualifiedName.hasNamespaceURI()) {
1372 if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) {
1376 else if (XMLString::equals(qualifiedName.getLocalPart(),NAMEFORMAT_ATTRIB_NAME)) {
1377 setNameFormat(value);
1380 else if (XMLString::equals(qualifiedName.getLocalPart(),FRIENDLYNAME_ATTRIB_NAME)) {
1381 setFriendlyName(value);
1384 else if (XMLString::equals(qualifiedName.getLocalPart(),ISREQUIRED_ATTRIB_NAME)) {
1385 setisRequired(value);
1389 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1393 void marshallAttributes(DOMElement* domElement) const {
1394 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
1395 MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,NULL);
1396 MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,NULL);
1397 MARSHALL_BOOLEAN_ATTRIB(isRequired,ISREQUIRED,NULL);
1398 marshallExtensionAttributes(domElement);
1401 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1402 getAttributeValues().push_back(childXMLObject);
1405 void processAttribute(const DOMAttr* attribute) {
1406 unmarshallExtensionAttribute(attribute);
1410 class SAML_DLLLOCAL AttributeConsumingServiceImpl : public virtual AttributeConsumingService,
1411 public AbstractComplexElement,
1412 public AbstractDOMCachingXMLObject,
1413 public AbstractXMLObjectMarshaller,
1414 public AbstractXMLObjectUnmarshaller
1416 list<XMLObject*>::iterator m_pos_ServiceDescription;
1417 list<XMLObject*>::iterator m_pos_RequestedAttribute;
1421 m_isDefault=XML_BOOL_NULL;
1422 m_children.push_back(NULL);
1423 m_children.push_back(NULL);
1424 m_pos_ServiceDescription=m_children.begin();
1425 m_pos_RequestedAttribute=m_pos_ServiceDescription;
1426 ++m_pos_RequestedAttribute;
1430 virtual ~AttributeConsumingServiceImpl() {
1431 XMLString::release(&m_Index);
1434 AttributeConsumingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1435 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1439 AttributeConsumingServiceImpl(const AttributeConsumingServiceImpl& src)
1440 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1442 setIndex(src.m_Index);
1443 isDefault(src.m_isDefault);
1444 VectorOf(ServiceName) v=getServiceNames();
1445 for (vector<ServiceName*>::const_iterator i=src.m_ServiceNames.begin(); i!=src.m_ServiceNames.end(); i++) {
1447 v.push_back((*i)->cloneServiceName());
1450 VectorOf(ServiceDescription) w=getServiceDescriptions();
1451 for (vector<ServiceDescription*>::const_iterator j=src.m_ServiceDescriptions.begin(); j!=src.m_ServiceDescriptions.end(); j++) {
1453 w.push_back((*j)->cloneServiceDescription());
1456 VectorOf(RequestedAttribute) x=getRequestedAttributes();
1457 for (vector<RequestedAttribute*>::const_iterator k=src.m_RequestedAttributes.begin(); k!=src.m_RequestedAttributes.end(); k++) {
1459 x.push_back((*k)->cloneRequestedAttribute());
1464 IMPL_XMLOBJECT_CLONE(AttributeConsumingService);
1465 IMPL_INTEGER_ATTRIB(Index);
1466 IMPL_BOOLEAN_ATTRIB(isDefault);
1467 IMPL_TYPED_CHILDREN(ServiceName,m_pos_ServiceDescription);
1468 IMPL_TYPED_CHILDREN(ServiceDescription,m_pos_RequestedAttribute);
1469 IMPL_TYPED_CHILDREN(RequestedAttribute,m_children.end());
1472 void marshallAttributes(DOMElement* domElement) const {
1473 MARSHALL_INTEGER_ATTRIB(Index,INDEX,NULL);
1474 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
1477 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1478 PROC_TYPED_CHILDREN(ServiceName,SAML20MD_NS,false);
1479 PROC_TYPED_CHILDREN(ServiceDescription,SAML20MD_NS,false);
1480 PROC_TYPED_CHILDREN(RequestedAttribute,SAML20MD_NS,false);
1481 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1484 void processAttribute(const DOMAttr* attribute) {
1485 PROC_INTEGER_ATTRIB(Index,INDEX,NULL);
1486 PROC_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
1487 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1491 class SAML_DLLLOCAL SPSSODescriptorImpl : public virtual SPSSODescriptor, public SSODescriptorTypeImpl
1493 list<XMLObject*>::iterator m_pos_AssertionConsumerService;
1496 m_AuthnRequestsSigned=XML_BOOL_NULL;
1497 m_WantAssertionsSigned=XML_BOOL_NULL;
1498 m_children.push_back(NULL);
1499 m_pos_AssertionConsumerService=m_pos_NameIDFormat;
1500 ++m_pos_AssertionConsumerService;
1504 virtual ~SPSSODescriptorImpl() {}
1506 SPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1507 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1511 SPSSODescriptorImpl(const SPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1513 AuthnRequestsSigned(src.m_AuthnRequestsSigned);
1514 WantAssertionsSigned(src.m_WantAssertionsSigned);
1515 VectorOf(AssertionConsumerService) v=getAssertionConsumerServices();
1516 for (vector<AssertionConsumerService*>::const_iterator i=src.m_AssertionConsumerServices.begin(); i!=src.m_AssertionConsumerServices.end(); i++) {
1518 v.push_back((*i)->cloneAssertionConsumerService());
1521 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1522 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1524 w.push_back((*j)->cloneAttributeConsumingService());
1529 IMPL_XMLOBJECT_CLONE(SPSSODescriptor);
1530 SSODescriptorType* cloneSSODescriptorType() const {
1531 return cloneSPSSODescriptor();
1533 RoleDescriptor* cloneRoleDescriptor() const {
1534 return cloneSPSSODescriptor();
1537 IMPL_BOOLEAN_ATTRIB(AuthnRequestsSigned);
1538 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1539 IMPL_TYPED_CHILDREN(AssertionConsumerService,m_pos_AssertionConsumerService);
1540 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1542 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1543 if (!qualifiedName.hasNamespaceURI()) {
1544 if (XMLString::equals(qualifiedName.getLocalPart(),AUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1545 setAuthnRequestsSigned(value);
1548 else if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1549 setWantAssertionsSigned(value);
1553 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1557 void marshallAttributes(DOMElement* domElement) const {
1558 MARSHALL_BOOLEAN_ATTRIB(AuthnRequestsSigned,AUTHNREQUESTSSIGNED,NULL);
1559 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,NULL);
1560 RoleDescriptorImpl::marshallAttributes(domElement);
1563 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1564 PROC_TYPED_CHILDREN(AssertionConsumerService,SAML20MD_NS,false);
1565 PROC_TYPED_CHILDREN(AttributeConsumingService,SAML20MD_NS,false);
1566 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1570 class SAML_DLLLOCAL AuthnAuthorityDescriptorImpl : public virtual AuthnAuthorityDescriptor, public RoleDescriptorImpl
1572 list<XMLObject*>::iterator m_pos_AuthnQueryService;
1573 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1576 m_children.push_back(NULL);
1577 m_children.push_back(NULL);
1578 m_pos_AuthnQueryService=m_pos_ContactPerson;
1579 ++m_pos_AuthnQueryService;
1580 m_pos_AssertionIDRequestService=m_pos_AuthnQueryService;
1581 ++m_pos_AssertionIDRequestService;
1585 virtual ~AuthnAuthorityDescriptorImpl() {}
1587 AuthnAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1588 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1592 AuthnAuthorityDescriptorImpl(const AuthnAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1594 VectorOf(AuthnQueryService) v=getAuthnQueryServices();
1595 for (vector<AuthnQueryService*>::const_iterator i=src.m_AuthnQueryServices.begin(); i!=src.m_AuthnQueryServices.end(); i++) {
1597 v.push_back((*i)->cloneAuthnQueryService());
1600 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1601 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1603 w.push_back((*j)->cloneAssertionIDRequestService());
1606 VectorOf(NameIDFormat) x=getNameIDFormats();
1607 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1609 x.push_back((*k)->cloneNameIDFormat());
1614 IMPL_XMLOBJECT_CLONE(AuthnAuthorityDescriptor);
1615 RoleDescriptor* cloneRoleDescriptor() const {
1616 return cloneAuthnAuthorityDescriptor();
1619 IMPL_TYPED_CHILDREN(AuthnQueryService,m_pos_AuthnQueryService);
1620 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1621 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1624 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1625 PROC_TYPED_CHILDREN(AuthnQueryService,SAML20MD_NS,false);
1626 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1627 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1628 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1632 class SAML_DLLLOCAL PDPDescriptorImpl : public virtual PDPDescriptor, public RoleDescriptorImpl
1634 list<XMLObject*>::iterator m_pos_AuthzService;
1635 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1638 m_children.push_back(NULL);
1639 m_children.push_back(NULL);
1640 m_pos_AuthzService=m_pos_ContactPerson;
1641 ++m_pos_AuthzService;
1642 m_pos_AssertionIDRequestService=m_pos_AuthzService;
1643 ++m_pos_AssertionIDRequestService;
1647 virtual ~PDPDescriptorImpl() {}
1649 PDPDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1650 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1654 PDPDescriptorImpl(const PDPDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1656 VectorOf(AuthzService) v=getAuthzServices();
1657 for (vector<AuthzService*>::const_iterator i=src.m_AuthzServices.begin(); i!=src.m_AuthzServices.end(); i++) {
1659 v.push_back((*i)->cloneAuthzService());
1662 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1663 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1665 w.push_back((*j)->cloneAssertionIDRequestService());
1668 VectorOf(NameIDFormat) x=getNameIDFormats();
1669 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1671 x.push_back((*k)->cloneNameIDFormat());
1676 IMPL_XMLOBJECT_CLONE(PDPDescriptor);
1677 RoleDescriptor* cloneRoleDescriptor() const {
1678 return clonePDPDescriptor();
1681 IMPL_TYPED_CHILDREN(AuthzService,m_pos_AuthzService);
1682 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1683 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1686 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1687 PROC_TYPED_CHILDREN(AuthzService,SAML20MD_NS,false);
1688 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1689 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1690 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1694 class SAML_DLLLOCAL AttributeAuthorityDescriptorImpl : public virtual AttributeAuthorityDescriptor, public RoleDescriptorImpl
1696 list<XMLObject*>::iterator m_pos_AttributeService;
1697 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1698 list<XMLObject*>::iterator m_pos_NameIDFormat;
1699 list<XMLObject*>::iterator m_pos_AttributeProfile;
1702 m_children.push_back(NULL);
1703 m_children.push_back(NULL);
1704 m_children.push_back(NULL);
1705 m_children.push_back(NULL);
1706 m_pos_AttributeService=m_pos_ContactPerson;
1707 ++m_pos_AttributeService;
1708 m_pos_AssertionIDRequestService=m_pos_AttributeService;
1709 ++m_pos_AssertionIDRequestService;
1710 m_pos_NameIDFormat=m_pos_AssertionIDRequestService;
1711 ++m_pos_NameIDFormat;
1712 m_pos_AttributeProfile=m_pos_NameIDFormat;
1713 ++m_pos_AttributeProfile;
1717 virtual ~AttributeAuthorityDescriptorImpl() {}
1719 AttributeAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1720 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1724 AttributeAuthorityDescriptorImpl(const AttributeAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1726 VectorOf(AttributeService) v=getAttributeServices();
1727 for (vector<AttributeService*>::const_iterator i=src.m_AttributeServices.begin(); i!=src.m_AttributeServices.end(); i++) {
1729 v.push_back((*i)->cloneAttributeService());
1732 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1733 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1735 w.push_back((*j)->cloneAssertionIDRequestService());
1738 VectorOf(NameIDFormat) x=getNameIDFormats();
1739 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1741 x.push_back((*k)->cloneNameIDFormat());
1744 VectorOf(AttributeProfile) y=getAttributeProfiles();
1745 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1747 y.push_back((*m)->cloneAttributeProfile());
1750 VectorOf(Attribute) z=getAttributes();
1751 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1753 z.push_back((*n)->cloneAttribute());
1758 IMPL_XMLOBJECT_CLONE(AttributeAuthorityDescriptor);
1759 RoleDescriptor* cloneRoleDescriptor() const {
1760 return cloneAttributeAuthorityDescriptor();
1763 IMPL_TYPED_CHILDREN(AttributeService,m_pos_AttributeService);
1764 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1765 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1766 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1767 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1770 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1771 PROC_TYPED_CHILDREN(AttributeService,SAML20MD_NS,false);
1772 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1773 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1774 PROC_TYPED_CHILDREN(AttributeProfile,SAML20MD_NS,false);
1775 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
1776 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1780 class SAML_DLLLOCAL QueryDescriptorTypeImpl : public virtual QueryDescriptorType, public RoleDescriptorImpl
1783 m_WantAssertionsSigned=XML_BOOL_NULL;
1784 m_children.push_back(NULL);
1785 m_pos_NameIDFormat=m_pos_ContactPerson;
1786 ++m_pos_NameIDFormat;
1790 list<XMLObject*>::iterator m_pos_NameIDFormat;
1792 QueryDescriptorTypeImpl() {
1797 virtual ~QueryDescriptorTypeImpl() {}
1799 QueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1800 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1804 QueryDescriptorTypeImpl(const QueryDescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1806 WantAssertionsSigned(src.m_WantAssertionsSigned);
1807 VectorOf(NameIDFormat) y=getNameIDFormats();
1808 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1810 y.push_back((*m)->cloneNameIDFormat());
1815 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1816 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1818 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
1819 if (!qualifiedName.hasNamespaceURI()) {
1820 if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1821 setWantAssertionsSigned(value);
1825 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1829 void marshallAttributes(DOMElement* domElement) const {
1830 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,NULL);
1831 RoleDescriptorImpl::marshallAttributes(domElement);
1834 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1835 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1836 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1840 class SAML_DLLLOCAL AuthnQueryDescriptorTypeImpl : public virtual AuthnQueryDescriptorType, public QueryDescriptorTypeImpl
1843 virtual ~AuthnQueryDescriptorTypeImpl() {}
1845 AuthnQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1846 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1848 AuthnQueryDescriptorTypeImpl(const AuthnQueryDescriptorTypeImpl& src) : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {}
1850 IMPL_XMLOBJECT_CLONE(AuthnQueryDescriptorType);
1851 QueryDescriptorType* cloneQueryDescriptorType() const {
1852 return new AuthnQueryDescriptorTypeImpl(*this);
1854 RoleDescriptor* cloneRoleDescriptor() const {
1855 return new AuthnQueryDescriptorTypeImpl(*this);
1859 class SAML_DLLLOCAL AttributeQueryDescriptorTypeImpl : public virtual AttributeQueryDescriptorType, public QueryDescriptorTypeImpl
1862 virtual ~AttributeQueryDescriptorTypeImpl() {}
1864 AttributeQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1865 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1867 AttributeQueryDescriptorTypeImpl(const AttributeQueryDescriptorTypeImpl& src)
1868 : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1869 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1870 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1872 w.push_back((*j)->cloneAttributeConsumingService());
1877 IMPL_XMLOBJECT_CLONE(AttributeQueryDescriptorType);
1878 QueryDescriptorType* cloneQueryDescriptorType() const {
1879 return new AttributeQueryDescriptorTypeImpl(*this);
1881 RoleDescriptor* cloneRoleDescriptor() const {
1882 return new AttributeQueryDescriptorTypeImpl(*this);
1885 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1888 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1889 PROC_TYPED_CHILDREN(AttributeConsumingService,SAML20MD_NS,false);
1890 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1894 class SAML_DLLLOCAL AuthzDecisionQueryDescriptorTypeImpl : public virtual AuthzDecisionQueryDescriptorType, public QueryDescriptorTypeImpl
1897 virtual ~AuthzDecisionQueryDescriptorTypeImpl() {}
1899 AuthzDecisionQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1900 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1902 AuthzDecisionQueryDescriptorTypeImpl(const AuthzDecisionQueryDescriptorTypeImpl& src)
1903 : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1904 VectorOf(ActionNamespace) w=getActionNamespaces();
1905 for (vector<ActionNamespace*>::const_iterator j=src.m_ActionNamespaces.begin(); j!=src.m_ActionNamespaces.end(); j++) {
1907 w.push_back((*j)->cloneActionNamespace());
1912 IMPL_XMLOBJECT_CLONE(AuthzDecisionQueryDescriptorType);
1913 QueryDescriptorType* cloneQueryDescriptorType() const {
1914 return new AuthzDecisionQueryDescriptorTypeImpl(*this);
1916 RoleDescriptor* cloneRoleDescriptor() const {
1917 return new AuthzDecisionQueryDescriptorTypeImpl(*this);
1920 IMPL_TYPED_CHILDREN(ActionNamespace,m_children.end());
1923 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1924 PROC_TYPED_CHILDREN(ActionNamespace,samlconstants::SAML20MD_QUERY_EXT_NS,false);
1925 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1929 class SAML_DLLLOCAL AffiliationDescriptorImpl : public virtual AffiliationDescriptor,
1930 public virtual SignableObject,
1931 public AbstractComplexElement,
1932 public AbstractAttributeExtensibleXMLObject,
1933 public AbstractDOMCachingXMLObject,
1934 public AbstractXMLObjectMarshaller,
1935 public AbstractXMLObjectUnmarshaller
1937 list<XMLObject*>::iterator m_pos_AffiliateMember;
1940 m_ID=m_AffiliationOwnerID=NULL;
1941 m_ValidUntil=m_CacheDuration=NULL;
1942 m_children.push_back(NULL);
1943 m_children.push_back(NULL);
1944 m_children.push_back(NULL);
1947 m_pos_Signature=m_children.begin();
1948 m_pos_Extensions=m_pos_Signature;
1950 m_pos_AffiliateMember=m_pos_Extensions;
1951 ++m_pos_AffiliateMember;
1955 virtual ~AffiliationDescriptorImpl() {
1956 XMLString::release(&m_ID);
1957 XMLString::release(&m_AffiliationOwnerID);
1958 delete m_ValidUntil;
1959 delete m_CacheDuration;
1962 AffiliationDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
1963 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1967 AffiliationDescriptorImpl(const AffiliationDescriptorImpl& src)
1968 : AbstractXMLObject(src), AbstractComplexElement(src),
1969 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1972 setAffiliationOwnerID(src.getAffiliationOwnerID());
1973 setValidUntil(src.getValidUntil());
1974 setCacheDuration(src.getCacheDuration());
1975 if (src.getSignature())
1976 setSignature(src.getSignature()->cloneSignature());
1977 if (src.getExtensions())
1978 setExtensions(src.getExtensions()->cloneExtensions());
1980 VectorOf(KeyDescriptor) v=getKeyDescriptors();
1981 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
1983 v.push_back((*i)->cloneKeyDescriptor());
1986 VectorOf(AffiliateMember) w=getAffiliateMembers();
1987 for (vector<AffiliateMember*>::const_iterator j=src.m_AffiliateMembers.begin(); j!=src.m_AffiliateMembers.end(); j++) {
1989 w.push_back((*j)->cloneAffiliateMember());
1994 IMPL_XMLOBJECT_CLONE(AffiliationDescriptor);
1996 //IMPL_TYPED_CHILD(Signature);
1997 // Need customized setter.
1999 Signature* m_Signature;
2000 list<XMLObject*>::iterator m_pos_Signature;
2002 Signature* getSignature() const {
2006 void setSignature(Signature* sig) {
2007 prepareForAssignment(m_Signature,sig);
2008 *m_pos_Signature=m_Signature=sig;
2009 // Sync content reference back up.
2011 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2015 IMPL_STRING_ATTRIB(AffiliationOwnerID);
2016 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2017 IMPL_DURATION_ATTRIB(CacheDuration,0);
2018 IMPL_TYPED_CHILD(Extensions);
2019 IMPL_TYPED_CHILDREN(AffiliateMember,m_pos_AffiliateMember);
2020 IMPL_TYPED_CHILDREN(KeyDescriptor,m_children.end());
2022 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
2023 if (!qualifiedName.hasNamespaceURI()) {
2024 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
2028 else if (XMLString::equals(qualifiedName.getLocalPart(),AFFILIATIONOWNERID_ATTRIB_NAME)) {
2029 setAffiliationOwnerID(value);
2032 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
2033 setValidUntil(value);
2036 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
2037 setCacheDuration(value);
2041 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
2045 void marshallAttributes(DOMElement* domElement) const {
2046 MARSHALL_ID_ATTRIB(ID,ID,NULL);
2047 MARSHALL_STRING_ATTRIB(AffiliationOwnerID,AFFILIATIONOWNERID,NULL);
2048 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2049 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2050 marshallExtensionAttributes(domElement);
2053 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2054 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2055 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2056 PROC_TYPED_CHILDREN(AffiliateMember,SAML20MD_NS,false);
2057 PROC_TYPED_CHILDREN(KeyDescriptor,SAML20MD_NS,false);
2058 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2061 void processAttribute(const DOMAttr* attribute) {
2062 PROC_ID_ATTRIB(ID,ID,NULL);
2063 unmarshallExtensionAttribute(attribute);
2067 class SAML_DLLLOCAL EntityDescriptorImpl : public virtual EntityDescriptor,
2068 public virtual SignableObject,
2069 public AbstractComplexElement,
2070 public AbstractAttributeExtensibleXMLObject,
2071 public AbstractDOMCachingXMLObject,
2072 public AbstractXMLObjectMarshaller,
2073 public AbstractXMLObjectUnmarshaller
2075 list<XMLObject*>::iterator m_pos_ContactPerson;
2078 m_ID=m_EntityID=NULL;
2079 m_ValidUntil=m_CacheDuration=NULL;
2080 m_children.push_back(NULL);
2081 m_children.push_back(NULL);
2082 m_children.push_back(NULL);
2083 m_children.push_back(NULL);
2084 m_children.push_back(NULL);
2087 m_AffiliationDescriptor=NULL;
2088 m_Organization=NULL;
2089 m_pos_Signature=m_children.begin();
2090 m_pos_Extensions=m_pos_Signature;
2092 m_pos_AffiliationDescriptor=m_pos_Extensions;
2093 ++m_pos_AffiliationDescriptor;
2094 m_pos_Organization=m_pos_AffiliationDescriptor;
2095 ++m_pos_Organization;
2096 m_pos_ContactPerson=m_pos_Organization;
2097 ++m_pos_ContactPerson;
2101 virtual ~EntityDescriptorImpl() {
2102 XMLString::release(&m_ID);
2103 XMLString::release(&m_EntityID);
2104 delete m_ValidUntil;
2105 delete m_CacheDuration;
2108 EntityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2109 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2113 EntityDescriptorImpl(const EntityDescriptorImpl& src)
2114 : AbstractXMLObject(src), AbstractComplexElement(src),
2115 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
2118 setEntityID(src.getEntityID());
2119 setValidUntil(src.getValidUntil());
2120 setCacheDuration(src.getCacheDuration());
2121 if (src.getSignature())
2122 setSignature(src.getSignature()->cloneSignature());
2123 if (src.getExtensions())
2124 setExtensions(src.getExtensions()->cloneExtensions());
2125 if (src.getAffiliationDescriptor())
2126 setAffiliationDescriptor(src.getAffiliationDescriptor()->cloneAffiliationDescriptor());
2127 if (src.getOrganization())
2128 setOrganization(src.getOrganization()->cloneOrganization());
2130 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2132 IDPSSODescriptor* idp=dynamic_cast<IDPSSODescriptor*>(*i);
2134 getIDPSSODescriptors().push_back(idp->cloneIDPSSODescriptor());
2138 SPSSODescriptor* sp=dynamic_cast<SPSSODescriptor*>(*i);
2140 getSPSSODescriptors().push_back(sp->cloneSPSSODescriptor());
2144 AuthnAuthorityDescriptor* authn=dynamic_cast<AuthnAuthorityDescriptor*>(*i);
2146 getAuthnAuthorityDescriptors().push_back(authn->cloneAuthnAuthorityDescriptor());
2150 AttributeAuthorityDescriptor* attr=dynamic_cast<AttributeAuthorityDescriptor*>(*i);
2152 getAttributeAuthorityDescriptors().push_back(attr->cloneAttributeAuthorityDescriptor());
2156 PDPDescriptor* pdp=dynamic_cast<PDPDescriptor*>(*i);
2158 getPDPDescriptors().push_back(pdp->clonePDPDescriptor());
2162 AuthnQueryDescriptorType* authnq=dynamic_cast<AuthnQueryDescriptorType*>(*i);
2164 getAuthnQueryDescriptorTypes().push_back(authnq->cloneAuthnQueryDescriptorType());
2168 AttributeQueryDescriptorType* attrq=dynamic_cast<AttributeQueryDescriptorType*>(*i);
2170 getAttributeQueryDescriptorTypes().push_back(attrq->cloneAttributeQueryDescriptorType());
2174 AuthzDecisionQueryDescriptorType* authzq=dynamic_cast<AuthzDecisionQueryDescriptorType*>(*i);
2176 getAuthzDecisionQueryDescriptorTypes().push_back(authzq->cloneAuthzDecisionQueryDescriptorType());
2180 RoleDescriptor* role=dynamic_cast<RoleDescriptor*>(*i);
2182 getRoleDescriptors().push_back(role->cloneRoleDescriptor());
2188 VectorOf(ContactPerson) v=getContactPersons();
2189 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
2191 v.push_back((*j)->cloneContactPerson());
2194 VectorOf(AdditionalMetadataLocation) w=getAdditionalMetadataLocations();
2195 for (vector<AdditionalMetadataLocation*>::const_iterator k=src.m_AdditionalMetadataLocations.begin(); k!=src.m_AdditionalMetadataLocations.end(); k++) {
2197 w.push_back((*k)->cloneAdditionalMetadataLocation());
2202 IMPL_XMLOBJECT_CLONE(EntityDescriptor);
2204 //IMPL_TYPED_CHILD(Signature);
2205 // Need customized setter.
2207 Signature* m_Signature;
2208 list<XMLObject*>::iterator m_pos_Signature;
2210 Signature* getSignature() const {
2214 void setSignature(Signature* sig) {
2215 prepareForAssignment(m_Signature,sig);
2216 *m_pos_Signature=m_Signature=sig;
2217 // Sync content reference back up.
2219 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2223 IMPL_STRING_ATTRIB(EntityID);
2224 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2225 IMPL_DURATION_ATTRIB(CacheDuration,0);
2226 IMPL_TYPED_CHILD(Extensions);
2227 IMPL_TYPED_CHILDREN(RoleDescriptor,m_pos_AffiliationDescriptor);
2228 IMPL_TYPED_CHILDREN(IDPSSODescriptor,m_pos_AffiliationDescriptor);
2229 IMPL_TYPED_CHILDREN(SPSSODescriptor,m_pos_AffiliationDescriptor);
2230 IMPL_TYPED_CHILDREN(AuthnAuthorityDescriptor,m_pos_AffiliationDescriptor);
2231 IMPL_TYPED_CHILDREN(AttributeAuthorityDescriptor,m_pos_AffiliationDescriptor);
2232 IMPL_TYPED_CHILDREN(PDPDescriptor,m_pos_AffiliationDescriptor);
2233 IMPL_TYPED_CHILDREN(AuthnQueryDescriptorType,m_pos_AffiliationDescriptor);
2234 IMPL_TYPED_CHILDREN(AttributeQueryDescriptorType,m_pos_AffiliationDescriptor);
2235 IMPL_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,m_pos_AffiliationDescriptor);
2236 IMPL_TYPED_CHILD(AffiliationDescriptor);
2237 IMPL_TYPED_CHILD(Organization);
2238 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
2239 IMPL_TYPED_CHILDREN(AdditionalMetadataLocation,m_children.end());
2241 void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
2242 if (!qualifiedName.hasNamespaceURI()) {
2243 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
2247 else if (XMLString::equals(qualifiedName.getLocalPart(),ENTITYID_ATTRIB_NAME)) {
2251 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
2252 setValidUntil(value);
2255 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
2256 setCacheDuration(value);
2260 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
2263 const RoleDescriptor* getRoleDescriptor(const xmltooling::QName& qname, const XMLCh* protocol) const {
2264 // Check for "known" elements/types.
2265 if (qname == IDPSSODescriptor::ELEMENT_QNAME)
2266 return find_if(m_IDPSSODescriptors, isValidForProtocol(protocol));
2267 if (qname == SPSSODescriptor::ELEMENT_QNAME)
2268 return find_if(m_SPSSODescriptors, isValidForProtocol(protocol));
2269 if (qname == AuthnAuthorityDescriptor::ELEMENT_QNAME)
2270 return find_if(m_AuthnAuthorityDescriptors, isValidForProtocol(protocol));
2271 if (qname == AttributeAuthorityDescriptor::ELEMENT_QNAME)
2272 return find_if(m_AttributeAuthorityDescriptors, isValidForProtocol(protocol));
2273 if (qname == PDPDescriptor::ELEMENT_QNAME)
2274 return find_if(m_PDPDescriptors, isValidForProtocol(protocol));
2275 if (qname == AuthnQueryDescriptorType::TYPE_QNAME)
2276 return find_if(m_AuthnQueryDescriptorTypes, isValidForProtocol(protocol));
2277 if (qname == AttributeQueryDescriptorType::TYPE_QNAME)
2278 return find_if(m_AttributeQueryDescriptorTypes, isValidForProtocol(protocol));
2279 if (qname == AuthzDecisionQueryDescriptorType::TYPE_QNAME)
2280 return find_if(m_AuthzDecisionQueryDescriptorTypes, isValidForProtocol(protocol));
2282 vector<RoleDescriptor*>::const_iterator i =
2283 find_if(m_RoleDescriptors.begin(), m_RoleDescriptors.end(), ofTypeValidForProtocol(qname,protocol));
2284 return (i!=m_RoleDescriptors.end()) ? *i : NULL;
2288 void marshallAttributes(DOMElement* domElement) const {
2289 MARSHALL_ID_ATTRIB(ID,ID,NULL);
2290 MARSHALL_STRING_ATTRIB(EntityID,ENTITYID,NULL);
2291 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2292 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2293 marshallExtensionAttributes(domElement);
2296 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2297 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2298 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2299 PROC_TYPED_CHILDREN(IDPSSODescriptor,SAML20MD_NS,false);
2300 PROC_TYPED_CHILDREN(SPSSODescriptor,SAML20MD_NS,false);
2301 PROC_TYPED_CHILDREN(AuthnAuthorityDescriptor,SAML20MD_NS,false);
2302 PROC_TYPED_CHILDREN(AttributeAuthorityDescriptor,SAML20MD_NS,false);
2303 PROC_TYPED_CHILDREN(PDPDescriptor,SAML20MD_NS,false);
2304 PROC_TYPED_CHILDREN(AuthnQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2305 PROC_TYPED_CHILDREN(AttributeQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2306 PROC_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2307 PROC_TYPED_CHILDREN(RoleDescriptor,SAML20MD_NS,false);
2308 PROC_TYPED_CHILD(AffiliationDescriptor,SAML20MD_NS,false);
2309 PROC_TYPED_CHILD(Organization,SAML20MD_NS,false);
2310 PROC_TYPED_CHILDREN(ContactPerson,SAML20MD_NS,false);
2311 PROC_TYPED_CHILDREN(AdditionalMetadataLocation,SAML20MD_NS,false);
2312 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2315 void processAttribute(const DOMAttr* attribute) {
2316 PROC_ID_ATTRIB(ID,ID,NULL);
2317 unmarshallExtensionAttribute(attribute);
2321 class SAML_DLLLOCAL EntitiesDescriptorImpl : public virtual EntitiesDescriptor,
2322 public virtual SignableObject,
2323 public AbstractComplexElement,
2324 public AbstractDOMCachingXMLObject,
2325 public AbstractXMLObjectMarshaller,
2326 public AbstractXMLObjectUnmarshaller
2330 m_ValidUntil=m_CacheDuration=NULL;
2331 m_children.push_back(NULL);
2332 m_children.push_back(NULL);
2335 m_pos_Signature=m_children.begin();
2336 m_pos_Extensions=m_pos_Signature;
2341 virtual ~EntitiesDescriptorImpl() {
2342 XMLString::release(&m_ID);
2343 XMLString::release(&m_Name);
2344 delete m_ValidUntil;
2345 delete m_CacheDuration;
2348 EntitiesDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2349 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2353 EntitiesDescriptorImpl(const EntitiesDescriptorImpl& src)
2354 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2357 setName(src.getName());
2358 setValidUntil(src.getValidUntil());
2359 setCacheDuration(src.getCacheDuration());
2360 if (src.getSignature())
2361 setSignature(src.getSignature()->cloneSignature());
2362 if (src.getExtensions())
2363 setExtensions(src.getExtensions()->cloneExtensions());
2365 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2367 EntityDescriptor* e=dynamic_cast<EntityDescriptor*>(*i);
2369 getEntityDescriptors().push_back(e->cloneEntityDescriptor());
2373 EntitiesDescriptor* es=dynamic_cast<EntitiesDescriptor*>(*i);
2375 getEntitiesDescriptors().push_back(es->cloneEntitiesDescriptor());
2382 IMPL_XMLOBJECT_CLONE(EntitiesDescriptor);
2384 //IMPL_TYPED_CHILD(Signature);
2385 // Need customized setter.
2387 Signature* m_Signature;
2388 list<XMLObject*>::iterator m_pos_Signature;
2390 Signature* getSignature() const {
2394 void setSignature(Signature* sig) {
2395 prepareForAssignment(m_Signature,sig);
2396 *m_pos_Signature=m_Signature=sig;
2397 // Sync content reference back up.
2399 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2403 IMPL_STRING_ATTRIB(Name);
2404 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2405 IMPL_DURATION_ATTRIB(CacheDuration,0);
2406 IMPL_TYPED_CHILD(Extensions);
2407 IMPL_TYPED_CHILDREN(EntityDescriptor,m_children.end());
2408 IMPL_TYPED_CHILDREN(EntitiesDescriptor,m_children.end());
2411 void marshallAttributes(DOMElement* domElement) const {
2412 MARSHALL_ID_ATTRIB(ID,ID,NULL);
2413 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
2414 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2415 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2418 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2419 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2420 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2421 PROC_TYPED_CHILDREN(EntityDescriptor,SAML20MD_NS,false);
2422 PROC_TYPED_CHILDREN(EntitiesDescriptor,SAML20MD_NS,false);
2423 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2426 void processAttribute(const DOMAttr* attribute) {
2427 PROC_ID_ATTRIB(ID,ID,NULL);
2428 PROC_STRING_ATTRIB(Name,NAME,NULL);
2429 PROC_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2430 PROC_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2434 class SAML_DLLLOCAL EntityAttributesImpl : public virtual EntityAttributes,
2435 public AbstractComplexElement,
2436 public AbstractDOMCachingXMLObject,
2437 public AbstractXMLObjectMarshaller,
2438 public AbstractXMLObjectUnmarshaller
2441 virtual ~EntityAttributesImpl() {}
2443 EntityAttributesImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
2444 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2447 EntityAttributesImpl(const EntityAttributesImpl& src)
2448 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2449 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2451 Attribute* a=dynamic_cast<Attribute*>(*i);
2453 getAttributes().push_back(a->cloneAttribute());
2457 saml2::Assertion* as=dynamic_cast<saml2::Assertion*>(*i);
2459 getAssertions().push_back(as->cloneAssertion());
2466 IMPL_XMLOBJECT_CLONE(EntityAttributes);
2468 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
2469 IMPL_TYPED_FOREIGN_CHILDREN(Assertion,saml2,m_children.end());
2472 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2473 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
2474 PROC_TYPED_FOREIGN_CHILDREN(Assertion,saml2,SAML20_NS,false);
2475 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2481 #if defined (_MSC_VER)
2482 #pragma warning( pop )
2485 IMPL_ELEMENT_QNAME(IDPSSODescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2486 IMPL_ELEMENT_QNAME(SPSSODescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2487 IMPL_ELEMENT_QNAME(AuthnAuthorityDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2488 IMPL_ELEMENT_QNAME(AttributeAuthorityDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2489 IMPL_ELEMENT_QNAME(PDPDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2490 IMPL_TYPE_QNAME(AuthnQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2491 IMPL_TYPE_QNAME(AttributeQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2492 IMPL_TYPE_QNAME(AuthzDecisionQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2494 // Builder Implementations
2496 IMPL_XMLOBJECTBUILDER(AdditionalMetadataLocation);
2497 IMPL_XMLOBJECTBUILDER(AffiliateMember);
2498 IMPL_XMLOBJECTBUILDER(AffiliationDescriptor);
2499 IMPL_XMLOBJECTBUILDER(ArtifactResolutionService);
2500 IMPL_XMLOBJECTBUILDER(AssertionConsumerService);
2501 IMPL_XMLOBJECTBUILDER(AssertionIDRequestService);
2502 IMPL_XMLOBJECTBUILDER(AttributeAuthorityDescriptor);
2503 IMPL_XMLOBJECTBUILDER(AttributeConsumingService);
2504 IMPL_XMLOBJECTBUILDER(AttributeProfile);
2505 IMPL_XMLOBJECTBUILDER(AttributeQueryDescriptorType);
2506 IMPL_XMLOBJECTBUILDER(AttributeService);
2507 IMPL_XMLOBJECTBUILDER(AuthnAuthorityDescriptor);
2508 IMPL_XMLOBJECTBUILDER(AuthnQueryDescriptorType);
2509 IMPL_XMLOBJECTBUILDER(AuthnQueryService);
2510 IMPL_XMLOBJECTBUILDER(AuthzDecisionQueryDescriptorType);
2511 IMPL_XMLOBJECTBUILDER(AuthzService);
2512 IMPL_XMLOBJECTBUILDER(Company);
2513 IMPL_XMLOBJECTBUILDER(ContactPerson);
2514 IMPL_XMLOBJECTBUILDER(EmailAddress);
2515 IMPL_XMLOBJECTBUILDER(EndpointType);
2516 IMPL_XMLOBJECTBUILDER(EntitiesDescriptor);
2517 IMPL_XMLOBJECTBUILDER(EntityDescriptor);
2518 IMPL_XMLOBJECTBUILDER(Extensions);
2519 IMPL_XMLOBJECTBUILDER(GivenName);
2520 IMPL_XMLOBJECTBUILDER(IDPSSODescriptor);
2521 IMPL_XMLOBJECTBUILDER(IndexedEndpointType);
2522 IMPL_XMLOBJECTBUILDER(KeyDescriptor);
2523 IMPL_XMLOBJECTBUILDER(localizedNameType);
2524 IMPL_XMLOBJECTBUILDER(localizedURIType);
2525 IMPL_XMLOBJECTBUILDER(ManageNameIDService);
2526 IMPL_XMLOBJECTBUILDER(NameIDFormat);
2527 IMPL_XMLOBJECTBUILDER(NameIDMappingService);
2528 IMPL_XMLOBJECTBUILDER(Organization);
2529 IMPL_XMLOBJECTBUILDER(OrganizationName);
2530 IMPL_XMLOBJECTBUILDER(OrganizationDisplayName);
2531 IMPL_XMLOBJECTBUILDER(OrganizationURL);
2532 IMPL_XMLOBJECTBUILDER(PDPDescriptor);
2533 IMPL_XMLOBJECTBUILDER(RequestedAttribute);
2534 IMPL_XMLOBJECTBUILDER(ServiceDescription);
2535 IMPL_XMLOBJECTBUILDER(ServiceName);
2536 IMPL_XMLOBJECTBUILDER(SingleLogoutService);
2537 IMPL_XMLOBJECTBUILDER(SingleSignOnService);
2538 IMPL_XMLOBJECTBUILDER(SPSSODescriptor);
2539 IMPL_XMLOBJECTBUILDER(SurName);
2540 IMPL_XMLOBJECTBUILDER(TelephoneNumber);
2542 IMPL_XMLOBJECTBUILDER(ActionNamespace);
2543 IMPL_XMLOBJECTBUILDER(SourceID);
2544 IMPL_XMLOBJECTBUILDER(EntityAttributes);
2546 #ifdef HAVE_COVARIANT_RETURNS
2547 RoleDescriptor* RoleDescriptorBuilder::buildObject(
2549 xmltooling::XMLObject* RoleDescriptorBuilder::buildObject(
2551 const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType
2554 return new RoleDescriptorTypeImpl(nsURI,localName,prefix,schemaType);
2557 const XMLCh ActionNamespace::LOCAL_NAME[] = UNICODE_LITERAL_15(A,c,t,i,o,n,N,a,m,e,s,p,a,c,e);
2558 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);
2559 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);
2560 const XMLCh AdditionalMetadataLocation::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(n,a,m,e,s,p,a,c,e);
2561 const XMLCh AffiliateMember::LOCAL_NAME[] = UNICODE_LITERAL_15(A,f,f,i,l,i,a,t,e,M,e,m,b,e,r);
2562 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);
2563 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);
2564 const XMLCh AffiliationDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2565 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);
2566 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);
2567 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);
2568 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);
2569 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);
2570 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);
2571 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);
2572 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);
2573 const XMLCh AttributeConsumingService::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
2574 const XMLCh AttributeConsumingService::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
2575 const XMLCh AttributeProfile::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,P,r,o,f,i,l,e);
2576 const XMLCh AttributeQueryDescriptorType::LOCAL_NAME[] =UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2577 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);
2578 const XMLCh AttributeService::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,S,e,r,v,i,c,e);
2579 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);
2580 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);
2581 const XMLCh AuthnQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2582 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);
2583 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);
2584 const XMLCh AuthzDecisionQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2585 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);
2586 const XMLCh AuthzService::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,z,S,e,r,v,i,c,e);
2587 const XMLCh CacheableSAMLObject::CACHEDURATION_ATTRIB_NAME[] = UNICODE_LITERAL_13(c,a,c,h,e,D,u,r,a,t,i,o,n);
2588 const XMLCh Company::LOCAL_NAME[] = UNICODE_LITERAL_7(C,o,m,p,a,n,y);
2589 const XMLCh ContactPerson::LOCAL_NAME[] = UNICODE_LITERAL_13(C,o,n,t,a,c,t,P,e,r,s,o,n);
2590 const XMLCh ContactPerson::TYPE_NAME[] = UNICODE_LITERAL_11(C,o,n,t,a,c,t,T,y,p,e);
2591 const XMLCh ContactPerson::CONTACTTYPE_ATTRIB_NAME[] = UNICODE_LITERAL_11(c,o,n,t,a,c,t,T,y,p,e);
2592 const XMLCh ContactPerson::CONTACT_TECHNICAL[] = UNICODE_LITERAL_9(t,e,c,h,n,i,c,a,l);
2593 const XMLCh ContactPerson::CONTACT_SUPPORT[] = UNICODE_LITERAL_7(s,u,p,p,o,r,t);
2594 const XMLCh ContactPerson::CONTACT_ADMINISTRATIVE[] = UNICODE_LITERAL_14(a,d,m,i,n,i,s,t,r,a,t,i,v,e);
2595 const XMLCh ContactPerson::CONTACT_BILLING[] = UNICODE_LITERAL_7(b,i,l,l,i,n,g);
2596 const XMLCh ContactPerson::CONTACT_OTHER[] = UNICODE_LITERAL_5(o,t,h,e,r);
2597 const XMLCh EmailAddress::LOCAL_NAME[] = UNICODE_LITERAL_12(E,m,a,i,l,A,d,d,r,e,s,s);
2598 const XMLCh EndpointType::LOCAL_NAME[] = {chNull};
2599 const XMLCh EndpointType::TYPE_NAME[] = UNICODE_LITERAL_12(E,n,d,p,o,i,n,t,T,y,p,e);
2600 const XMLCh EndpointType::BINDING_ATTRIB_NAME[] = UNICODE_LITERAL_7(B,i,n,d,i,n,g);
2601 const XMLCh EndpointType::LOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_8(L,o,c,a,t,i,o,n);
2602 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);
2603 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);
2604 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);
2605 const XMLCh EntitiesDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2606 const XMLCh EntitiesDescriptor::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e);
2607 const XMLCh EntityDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,D,e,s,c,r,i,p,t,o,r);
2608 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);
2609 const XMLCh EntityDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2610 const XMLCh EntityDescriptor::ENTITYID_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,n,t,i,t,y,I,D);
2611 const XMLCh EntityAttributes::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,A,t,t,r,i,b,u,t,e,s);
2612 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);
2613 const XMLCh Extensions::LOCAL_NAME[] = UNICODE_LITERAL_10(E,x,t,e,n,s,i,o,n,s);
2614 const XMLCh Extensions::TYPE_NAME[] = UNICODE_LITERAL_14(E,x,t,e,n,s,i,o,n,s,T,y,p,e);
2615 const XMLCh GivenName::LOCAL_NAME[] = UNICODE_LITERAL_9(G,i,v,e,n,N,a,m,e);
2616 const XMLCh IDPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(I,D,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
2617 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);
2618 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);
2619 const XMLCh IndexedEndpointType::LOCAL_NAME[] = {chNull};
2620 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);
2621 const XMLCh IndexedEndpointType::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
2622 const XMLCh IndexedEndpointType::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
2623 const XMLCh KeyDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(K,e,y,D,e,s,c,r,i,p,t,o,r);
2624 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);
2625 const XMLCh KeyDescriptor::USE_ATTRIB_NAME[] = UNICODE_LITERAL_3(u,s,e);
2626 const XMLCh KeyDescriptor::KEYTYPE_ENCRYPTION[] = UNICODE_LITERAL_10(e,n,c,r,y,p,t,i,o,n);
2627 const XMLCh KeyDescriptor::KEYTYPE_SIGNING[] = UNICODE_LITERAL_7(s,i,g,n,i,n,g);
2628 const XMLCh localizedNameType::LOCAL_NAME[] = {chNull};
2629 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);
2630 const XMLCh localizedNameType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2631 const XMLCh localizedURIType::LOCAL_NAME[] = {chNull};
2632 const XMLCh localizedURIType::TYPE_NAME[] = UNICODE_LITERAL_16(l,o,c,a,l,i,z,e,d,U,R,I,T,y,p,e);
2633 const XMLCh localizedURIType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2634 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);
2635 const XMLCh NameIDFormat::LOCAL_NAME[] = UNICODE_LITERAL_12(N,a,m,e,I,D,F,o,r,m,a,t);
2636 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);
2637 const XMLCh Organization::LOCAL_NAME[] = UNICODE_LITERAL_12(O,r,g,a,n,i,z,a,t,i,o,n);
2638 const XMLCh Organization::TYPE_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,T,y,p,e);
2639 const XMLCh OrganizationName::LOCAL_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,N,a,m,e);
2640 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);
2641 const XMLCh OrganizationURL::LOCAL_NAME[] = UNICODE_LITERAL_15(O,r,g,a,n,i,z,a,t,i,o,n,U,R,L);
2642 const XMLCh PDPDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(P,D,P,D,e,s,c,r,i,p,t,o,r);
2643 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);
2644 const XMLCh QueryDescriptorType::LOCAL_NAME[] = {chNull};
2645 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);
2646 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);
2647 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);
2648 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);
2649 const XMLCh RequestedAttribute::ISREQUIRED_ATTRIB_NAME[] = UNICODE_LITERAL_10(i,s,R,e,q,u,i,r,e,d);
2650 const XMLCh RoleDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2651 const XMLCh RoleDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2652 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);
2653 const XMLCh RoleDescriptor::ERRORURL_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,r,r,o,r,U,R,L);
2654 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);
2655 const XMLCh ServiceName::LOCAL_NAME[] = UNICODE_LITERAL_11(S,e,r,v,i,c,e,N,a,m,e);
2656 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);
2657 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);
2658 const XMLCh SourceID::LOCAL_NAME[] = UNICODE_LITERAL_8(S,o,u,r,c,e,I,D);
2659 const XMLCh SPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_15(S,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
2660 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);
2661 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);
2662 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);
2663 const XMLCh SSODescriptorType::LOCAL_NAME[] = {chNull};
2664 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);
2665 const XMLCh SurName::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,r,N,a,m,e);
2666 const XMLCh TelephoneNumber::LOCAL_NAME[] = UNICODE_LITERAL_15(T,e,l,e,p,h,o,n,e,N,u,m,b,e,r);
2667 const XMLCh TimeBoundSAMLObject::VALIDUNTIL_ATTRIB_NAME[] = UNICODE_LITERAL_10(v,a,l,i,d,U,n,t,i,l);