2 * Copyright 2001-2007 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 Assertions 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 opensaml;
41 using namespace xmlencryption;
42 using namespace xmlsignature;
43 using namespace xmltooling;
45 using xmlconstants::XMLSIG_NS;
46 using xmlconstants::XML_BOOL_NULL;
48 #if defined (_MSC_VER)
49 #pragma warning( push )
50 #pragma warning( disable : 4250 4251 )
56 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AffiliateMember);
57 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AttributeProfile);
58 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Company);
59 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,EmailAddress);
60 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,GivenName);
61 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,NameIDFormat);
62 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,SurName);
63 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,TelephoneNumber);
65 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,ActionNamespace);
66 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,SourceID);
68 class SAML_DLLLOCAL localizedNameTypeImpl : public virtual localizedNameType,
69 public AbstractSimpleElement,
70 public AbstractDOMCachingXMLObject,
71 public AbstractXMLObjectMarshaller,
72 public AbstractXMLObjectUnmarshaller
80 localizedNameTypeImpl() {
85 virtual ~localizedNameTypeImpl() {
86 XMLString::release(&m_Lang);
87 XMLString::release(&m_LangPrefix);
90 localizedNameTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
91 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
95 localizedNameTypeImpl(const localizedNameTypeImpl& src)
96 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
98 setLang(src.getLang());
100 m_LangPrefix = XMLString::replicate(src.m_LangPrefix);
103 IMPL_XMLOBJECT_CLONE(localizedNameType);
104 IMPL_XMLOBJECT_FOREIGN_ATTRIB(Lang,XMLCh);
107 void marshallAttributes(DOMElement* domElement) const {
108 if (m_Lang && *m_Lang) {
109 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(xmlconstants::XML_NS,LANG_ATTRIB_NAME);
110 if (m_LangPrefix && *m_LangPrefix)
111 attr->setPrefix(m_LangPrefix);
112 attr->setNodeValue(m_Lang);
113 domElement->setAttributeNodeNS(attr);
117 void processAttribute(const DOMAttr* attribute) {
118 if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
119 setLang(attribute->getValue());
120 const XMLCh* temp = attribute->getPrefix();
121 if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
122 m_LangPrefix = XMLString::replicate(temp);
125 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
129 class SAML_DLLLOCAL localizedURITypeImpl : public virtual localizedURIType,
130 public AbstractSimpleElement,
131 public AbstractDOMCachingXMLObject,
132 public AbstractXMLObjectMarshaller,
133 public AbstractXMLObjectUnmarshaller
141 localizedURITypeImpl() {
146 virtual ~localizedURITypeImpl() {
147 XMLString::release(&m_Lang);
148 XMLString::release(&m_LangPrefix);
151 localizedURITypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
152 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
156 localizedURITypeImpl(const localizedURITypeImpl& src)
157 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
159 setLang(src.getLang());
160 if (src.m_LangPrefix)
161 m_LangPrefix = XMLString::replicate(src.m_LangPrefix);
164 IMPL_XMLOBJECT_CLONE(localizedURIType);
165 IMPL_XMLOBJECT_FOREIGN_ATTRIB(Lang,XMLCh);
168 void marshallAttributes(DOMElement* domElement) const {
169 if (m_Lang && *m_Lang) {
170 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(xmlconstants::XML_NS,LANG_ATTRIB_NAME);
171 if (m_LangPrefix && *m_LangPrefix)
172 attr->setPrefix(m_LangPrefix);
173 attr->setNodeValue(m_Lang);
174 domElement->setAttributeNodeNS(attr);
178 void processAttribute(const DOMAttr* attribute) {
179 if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
180 setLang(attribute->getValue());
181 const XMLCh* temp = attribute->getPrefix();
182 if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
183 m_LangPrefix = XMLString::replicate(temp);
186 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
190 class SAML_DLLLOCAL OrganizationNameImpl : public virtual OrganizationName, public localizedNameTypeImpl
193 virtual ~OrganizationNameImpl() {}
195 OrganizationNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
196 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
198 OrganizationNameImpl(const OrganizationNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
200 IMPL_XMLOBJECT_CLONE(OrganizationName);
201 localizedNameType* clonelocalizedNameType() const {
202 return new OrganizationNameImpl(*this);
206 class SAML_DLLLOCAL OrganizationDisplayNameImpl : public virtual OrganizationDisplayName, public localizedNameTypeImpl
209 virtual ~OrganizationDisplayNameImpl() {}
211 OrganizationDisplayNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
212 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
214 OrganizationDisplayNameImpl(const OrganizationDisplayNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
216 IMPL_XMLOBJECT_CLONE(OrganizationDisplayName);
217 localizedNameType* clonelocalizedNameType() const {
218 return new OrganizationDisplayNameImpl(*this);
222 class SAML_DLLLOCAL OrganizationURLImpl : public virtual OrganizationURL, public localizedURITypeImpl
225 virtual ~OrganizationURLImpl() {}
227 OrganizationURLImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
228 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
230 OrganizationURLImpl(const OrganizationURLImpl& src) : AbstractXMLObject(src), localizedURITypeImpl(src) {}
232 IMPL_XMLOBJECT_CLONE(OrganizationURL);
233 localizedURIType* clonelocalizedURIType() const {
234 return new OrganizationURLImpl(*this);
238 class SAML_DLLLOCAL ServiceNameImpl : public virtual ServiceName, public localizedNameTypeImpl
241 virtual ~ServiceNameImpl() {}
243 ServiceNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
244 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
246 ServiceNameImpl(const ServiceNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
248 IMPL_XMLOBJECT_CLONE(ServiceName);
249 localizedNameType* clonelocalizedNameType() const {
250 return new ServiceNameImpl(*this);
254 class SAML_DLLLOCAL ServiceDescriptionImpl : public virtual ServiceDescription, public localizedNameTypeImpl
257 virtual ~ServiceDescriptionImpl() {}
259 ServiceDescriptionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
260 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
262 ServiceDescriptionImpl(const ServiceDescriptionImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
264 IMPL_XMLOBJECT_CLONE(ServiceDescription);
265 localizedNameType* clonelocalizedNameType() const {
266 return new ServiceDescriptionImpl(*this);
270 class SAML_DLLLOCAL ExtensionsImpl : public virtual Extensions,
271 public AbstractComplexElement,
272 public AbstractDOMCachingXMLObject,
273 public AbstractXMLObjectMarshaller,
274 public AbstractXMLObjectUnmarshaller
277 virtual ~ExtensionsImpl() {}
279 ExtensionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
280 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
283 ExtensionsImpl(const ExtensionsImpl& src)
284 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
285 VectorOf(XMLObject) v=getUnknownXMLObjects();
286 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
287 v.push_back((*i)->clone());
290 IMPL_XMLOBJECT_CLONE(Extensions);
291 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
294 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
296 const XMLCh* nsURI=root->getNamespaceURI();
297 if (!XMLString::equals(nsURI,SAML20MD_NS) && nsURI && *nsURI) {
298 getUnknownXMLObjects().push_back(childXMLObject);
302 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
306 class SAML_DLLLOCAL OrganizationImpl : public virtual Organization,
307 public AbstractComplexElement,
308 public AbstractAttributeExtensibleXMLObject,
309 public AbstractDOMCachingXMLObject,
310 public AbstractXMLObjectMarshaller,
311 public AbstractXMLObjectUnmarshaller
313 list<XMLObject*>::iterator m_pos_OrganizationDisplayName;
314 list<XMLObject*>::iterator m_pos_OrganizationURL;
317 m_children.push_back(NULL);
318 m_children.push_back(NULL);
319 m_children.push_back(NULL);
321 m_pos_Extensions=m_children.begin();
322 m_pos_OrganizationDisplayName=m_pos_Extensions;
323 ++m_pos_OrganizationDisplayName;
324 m_pos_OrganizationURL=m_pos_OrganizationDisplayName;
325 ++m_pos_OrganizationURL;
328 virtual ~OrganizationImpl() {}
330 OrganizationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
331 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
335 OrganizationImpl(const OrganizationImpl& src)
336 : AbstractXMLObject(src), AbstractComplexElement(src),
337 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
339 if (src.getExtensions())
340 setExtensions(src.getExtensions()->cloneExtensions());
341 VectorOf(OrganizationName) v=getOrganizationNames();
342 for (vector<OrganizationName*>::const_iterator i=src.m_OrganizationNames.begin(); i!=src.m_OrganizationNames.end(); i++) {
344 v.push_back((*i)->cloneOrganizationName());
347 VectorOf(OrganizationDisplayName) w=getOrganizationDisplayNames();
348 for (vector<OrganizationDisplayName*>::const_iterator j=src.m_OrganizationDisplayNames.begin(); j!=src.m_OrganizationDisplayNames.end(); j++) {
350 w.push_back((*j)->cloneOrganizationDisplayName());
353 VectorOf(OrganizationURL) x=getOrganizationURLs();
354 for (vector<OrganizationURL*>::const_iterator k=src.m_OrganizationURLs.begin(); k!=src.m_OrganizationURLs.end(); k++) {
356 x.push_back((*k)->cloneOrganizationURL());
361 IMPL_XMLOBJECT_CLONE(Organization);
362 IMPL_TYPED_CHILD(Extensions);
363 IMPL_TYPED_CHILDREN(OrganizationName,m_pos_OrganizationDisplayName);
364 IMPL_TYPED_CHILDREN(OrganizationDisplayName,m_pos_OrganizationURL);
365 IMPL_TYPED_CHILDREN(OrganizationURL,m_children.end());
368 void marshallAttributes(DOMElement* domElement) const {
369 marshallExtensionAttributes(domElement);
372 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
373 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
374 PROC_TYPED_CHILDREN(OrganizationName,SAML20MD_NS,false);
375 PROC_TYPED_CHILDREN(OrganizationDisplayName,SAML20MD_NS,false);
376 PROC_TYPED_CHILDREN(OrganizationURL,SAML20MD_NS,false);
377 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
380 void processAttribute(const DOMAttr* attribute) {
381 unmarshallExtensionAttribute(attribute);
385 class SAML_DLLLOCAL ContactPersonImpl : public virtual ContactPerson,
386 public AbstractComplexElement,
387 public AbstractAttributeExtensibleXMLObject,
388 public AbstractDOMCachingXMLObject,
389 public AbstractXMLObjectMarshaller,
390 public AbstractXMLObjectUnmarshaller
392 list<XMLObject*>::iterator m_pos_TelephoneNumber;
396 m_children.push_back(NULL);
397 m_children.push_back(NULL);
398 m_children.push_back(NULL);
399 m_children.push_back(NULL);
400 m_children.push_back(NULL);
405 m_pos_Extensions=m_children.begin();
406 m_pos_Company=m_pos_Extensions;
408 m_pos_GivenName=m_pos_Company;
410 m_pos_SurName=m_pos_GivenName;
412 m_pos_TelephoneNumber=m_pos_SurName;
413 ++m_pos_TelephoneNumber;
416 virtual ~ContactPersonImpl() {
417 XMLString::release(&m_ContactType);
420 ContactPersonImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
421 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
425 ContactPersonImpl(const ContactPersonImpl& src)
426 : AbstractXMLObject(src), AbstractComplexElement(src),
427 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
429 if (src.getExtensions())
430 setExtensions(src.getExtensions()->cloneExtensions());
431 if (src.getCompany())
432 setCompany(src.getCompany()->cloneCompany());
433 if (src.getGivenName())
434 setGivenName(src.getGivenName()->cloneGivenName());
435 if (src.getSurName())
436 setSurName(src.getSurName()->cloneSurName());
438 VectorOf(EmailAddress) v=getEmailAddresss();
439 for (vector<EmailAddress*>::const_iterator i=src.m_EmailAddresss.begin(); i!=src.m_EmailAddresss.end(); i++) {
441 v.push_back((*i)->cloneEmailAddress());
444 VectorOf(TelephoneNumber) w=getTelephoneNumbers();
445 for (vector<TelephoneNumber*>::const_iterator j=src.m_TelephoneNumbers.begin(); j!=src.m_TelephoneNumbers.end(); j++) {
447 w.push_back((*j)->cloneTelephoneNumber());
452 IMPL_XMLOBJECT_CLONE(ContactPerson);
453 IMPL_STRING_ATTRIB(ContactType);
454 IMPL_TYPED_CHILD(Extensions);
455 IMPL_TYPED_CHILD(Company);
456 IMPL_TYPED_CHILD(GivenName);
457 IMPL_TYPED_CHILD(SurName);
458 IMPL_TYPED_CHILDREN(EmailAddress,m_pos_TelephoneNumber);
459 IMPL_TYPED_CHILDREN(TelephoneNumber,m_children.end());
461 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
462 if (!qualifiedName.hasNamespaceURI()) {
463 if (XMLString::equals(qualifiedName.getLocalPart(),CONTACTTYPE_ATTRIB_NAME)) {
464 setContactType(value);
468 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
472 void marshallAttributes(DOMElement* domElement) const {
473 MARSHALL_STRING_ATTRIB(ContactType,CONTACTTYPE,NULL);
474 marshallExtensionAttributes(domElement);
477 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
478 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
479 PROC_TYPED_CHILD(Company,SAML20MD_NS,false);
480 PROC_TYPED_CHILD(GivenName,SAML20MD_NS,false);
481 PROC_TYPED_CHILD(SurName,SAML20MD_NS,false);
482 PROC_TYPED_CHILDREN(EmailAddress,SAML20MD_NS,false);
483 PROC_TYPED_CHILDREN(TelephoneNumber,SAML20MD_NS,false);
484 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
487 void processAttribute(const DOMAttr* attribute) {
488 unmarshallExtensionAttribute(attribute);
492 class SAML_DLLLOCAL AdditionalMetadataLocationImpl : public virtual AdditionalMetadataLocation,
493 public AbstractSimpleElement,
494 public AbstractDOMCachingXMLObject,
495 public AbstractXMLObjectMarshaller,
496 public AbstractXMLObjectUnmarshaller
503 virtual ~AdditionalMetadataLocationImpl() {
504 XMLString::release(&m_Namespace);
507 AdditionalMetadataLocationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
508 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
512 AdditionalMetadataLocationImpl(const AdditionalMetadataLocationImpl& src)
513 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
517 IMPL_XMLOBJECT_CLONE(AdditionalMetadataLocation);
518 IMPL_STRING_ATTRIB(Namespace);
521 void marshallAttributes(DOMElement* domElement) const {
522 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
525 void processAttribute(const DOMAttr* attribute) {
526 PROC_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
527 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
531 class SAML_DLLLOCAL KeyDescriptorImpl : public virtual KeyDescriptor,
532 public AbstractComplexElement,
533 public AbstractDOMCachingXMLObject,
534 public AbstractXMLObjectMarshaller,
535 public AbstractXMLObjectUnmarshaller
540 m_children.push_back(NULL);
541 m_pos_KeyInfo=m_children.begin();
544 virtual ~KeyDescriptorImpl() {
545 XMLString::release(&m_Use);
548 KeyDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
549 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
553 KeyDescriptorImpl(const KeyDescriptorImpl& src)
554 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
556 setUse(src.getUse());
557 if (src.getKeyInfo())
558 setKeyInfo(src.getKeyInfo()->cloneKeyInfo());
559 VectorOf(EncryptionMethod) v=getEncryptionMethods();
560 for (vector<EncryptionMethod*>::const_iterator i=src.m_EncryptionMethods.begin(); i!=src.m_EncryptionMethods.end(); i++) {
562 v.push_back((*i)->cloneEncryptionMethod());
567 IMPL_XMLOBJECT_CLONE(KeyDescriptor);
568 IMPL_STRING_ATTRIB(Use);
569 IMPL_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature);
570 IMPL_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,m_children.end());
573 void marshallAttributes(DOMElement* domElement) const {
574 MARSHALL_STRING_ATTRIB(Use,USE,NULL);
577 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
578 PROC_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature,XMLSIG_NS,false);
579 PROC_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,SAML20MD_NS,false);
580 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
583 void processAttribute(const DOMAttr* attribute) {
584 PROC_STRING_ATTRIB(Use,USE,NULL);
585 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
589 class SAML_DLLLOCAL EndpointTypeImpl : public virtual EndpointType,
590 public AbstractAttributeExtensibleXMLObject,
591 public AbstractComplexElement,
592 public AbstractDOMCachingXMLObject,
593 public AbstractXMLObjectMarshaller,
594 public AbstractXMLObjectUnmarshaller
597 m_Binding=m_Location=m_ResponseLocation=NULL;
606 virtual ~EndpointTypeImpl() {
607 XMLString::release(&m_Binding);
608 XMLString::release(&m_Location);
609 XMLString::release(&m_ResponseLocation);
612 EndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
613 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
616 EndpointTypeImpl(const EndpointTypeImpl& src)
617 : AbstractXMLObject(src),
618 AbstractAttributeExtensibleXMLObject(src),
619 AbstractComplexElement(src),
620 AbstractDOMCachingXMLObject(src) {
621 setBinding(src.getBinding());
622 setLocation(src.getLocation());
623 setResponseLocation(src.getResponseLocation());
624 VectorOf(XMLObject) v=getUnknownXMLObjects();
625 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
626 v.push_back((*i)->clone());
629 IMPL_XMLOBJECT_CLONE(EndpointType);
630 IMPL_STRING_ATTRIB(Binding);
631 IMPL_STRING_ATTRIB(Location);
632 IMPL_STRING_ATTRIB(ResponseLocation);
633 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
635 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
636 if (!qualifiedName.hasNamespaceURI()) {
637 if (XMLString::equals(qualifiedName.getLocalPart(),BINDING_ATTRIB_NAME)) {
641 else if (XMLString::equals(qualifiedName.getLocalPart(),LOCATION_ATTRIB_NAME)) {
645 else if (XMLString::equals(qualifiedName.getLocalPart(),RESPONSELOCATION_ATTRIB_NAME)) {
646 setResponseLocation(value);
650 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
653 void marshallAttributes(DOMElement* domElement) const {
654 MARSHALL_STRING_ATTRIB(Binding,BINDING,NULL);
655 MARSHALL_STRING_ATTRIB(Location,LOCATION,NULL);
656 MARSHALL_STRING_ATTRIB(ResponseLocation,RESPONSELOCATION,NULL);
657 marshallExtensionAttributes(domElement);
660 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
662 const XMLCh* nsURI=root->getNamespaceURI();
663 if (!XMLString::equals(nsURI,SAML20MD_NS) && nsURI && *nsURI) {
664 getUnknownXMLObjects().push_back(childXMLObject);
667 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
670 void processAttribute(const DOMAttr* attribute) {
671 unmarshallExtensionAttribute(attribute);
675 class SAML_DLLLOCAL IndexedEndpointTypeImpl : public virtual IndexedEndpointType, public EndpointTypeImpl
679 m_isDefault=XML_BOOL_NULL;
683 IndexedEndpointTypeImpl() {
687 virtual ~IndexedEndpointTypeImpl() {
688 XMLString::release(&m_Index);
691 IndexedEndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
692 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
694 IndexedEndpointTypeImpl(const IndexedEndpointTypeImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {
695 setIndex(src.m_Index);
696 isDefault(src.m_isDefault);
699 IMPL_XMLOBJECT_CLONE(IndexedEndpointType);
700 EndpointType* cloneEndpointType() const {
701 return new IndexedEndpointTypeImpl(*this);
704 IMPL_INTEGER_ATTRIB(Index);
705 IMPL_BOOLEAN_ATTRIB(isDefault);
707 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
708 if (!qualifiedName.hasNamespaceURI()) {
709 if (XMLString::equals(qualifiedName.getLocalPart(),INDEX_ATTRIB_NAME)) {
713 else if (XMLString::equals(qualifiedName.getLocalPart(),ISDEFAULT_ATTRIB_NAME)) {
718 EndpointTypeImpl::setAttribute(qualifiedName, value, ID);
722 void marshallAttributes(DOMElement* domElement) const {
723 MARSHALL_INTEGER_ATTRIB(Index,INDEX,NULL);
724 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
725 EndpointTypeImpl::marshallAttributes(domElement);
729 class SAML_DLLLOCAL ArtifactResolutionServiceImpl : public virtual ArtifactResolutionService, public IndexedEndpointTypeImpl
732 virtual ~ArtifactResolutionServiceImpl() {}
734 ArtifactResolutionServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
735 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
737 ArtifactResolutionServiceImpl(const ArtifactResolutionServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
739 IMPL_XMLOBJECT_CLONE(ArtifactResolutionService);
740 IndexedEndpointType* cloneIndexedEndpointType() const {
741 return new ArtifactResolutionServiceImpl(*this);
743 EndpointType* cloneEndpointType() const {
744 return new ArtifactResolutionServiceImpl(*this);
748 class SAML_DLLLOCAL SingleLogoutServiceImpl : public virtual SingleLogoutService, public EndpointTypeImpl
751 virtual ~SingleLogoutServiceImpl() {}
753 SingleLogoutServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
754 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
756 SingleLogoutServiceImpl(const SingleLogoutServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
758 IMPL_XMLOBJECT_CLONE(SingleLogoutService);
759 EndpointType* cloneEndpointType() const {
760 return new SingleLogoutServiceImpl(*this);
764 class SAML_DLLLOCAL ManageNameIDServiceImpl : public virtual ManageNameIDService, public EndpointTypeImpl
767 virtual ~ManageNameIDServiceImpl() {}
769 ManageNameIDServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
770 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
772 ManageNameIDServiceImpl(const ManageNameIDServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
774 IMPL_XMLOBJECT_CLONE(ManageNameIDService);
775 EndpointType* cloneEndpointType() const {
776 return new ManageNameIDServiceImpl(*this);
780 class SAML_DLLLOCAL SingleSignOnServiceImpl : public virtual SingleSignOnService, public EndpointTypeImpl
783 virtual ~SingleSignOnServiceImpl() {}
785 SingleSignOnServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
786 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
788 SingleSignOnServiceImpl(const SingleSignOnServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
790 IMPL_XMLOBJECT_CLONE(SingleSignOnService);
791 EndpointType* cloneEndpointType() const {
792 return new SingleSignOnServiceImpl(*this);
796 class SAML_DLLLOCAL NameIDMappingServiceImpl : public virtual NameIDMappingService, public EndpointTypeImpl
799 virtual ~NameIDMappingServiceImpl() {}
801 NameIDMappingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
802 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
804 NameIDMappingServiceImpl(const NameIDMappingServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
806 IMPL_XMLOBJECT_CLONE(NameIDMappingService);
807 EndpointType* cloneEndpointType() const {
808 return new NameIDMappingServiceImpl(*this);
812 class SAML_DLLLOCAL AssertionIDRequestServiceImpl : public virtual AssertionIDRequestService, public EndpointTypeImpl
815 virtual ~AssertionIDRequestServiceImpl() {}
817 AssertionIDRequestServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
818 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
820 AssertionIDRequestServiceImpl(const AssertionIDRequestServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
822 IMPL_XMLOBJECT_CLONE(AssertionIDRequestService);
823 EndpointType* cloneEndpointType() const {
824 return new AssertionIDRequestServiceImpl(*this);
828 class SAML_DLLLOCAL AssertionConsumerServiceImpl : public virtual AssertionConsumerService, public IndexedEndpointTypeImpl
831 virtual ~AssertionConsumerServiceImpl() {}
833 AssertionConsumerServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
834 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
836 AssertionConsumerServiceImpl(const AssertionConsumerServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
838 IMPL_XMLOBJECT_CLONE(AssertionConsumerService);
839 EndpointType* cloneEndpointType() const {
840 return new AssertionConsumerServiceImpl(*this);
842 IndexedEndpointType* cloneIndexedEndpointType() const {
843 return new AssertionConsumerServiceImpl(*this);
847 class SAML_DLLLOCAL AuthnQueryServiceImpl : public virtual AuthnQueryService, public EndpointTypeImpl
850 virtual ~AuthnQueryServiceImpl() {}
852 AuthnQueryServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
853 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
855 AuthnQueryServiceImpl(const AuthnQueryServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
857 IMPL_XMLOBJECT_CLONE(AuthnQueryService);
858 EndpointType* cloneEndpointType() const {
859 return new AuthnQueryServiceImpl(*this);
863 class SAML_DLLLOCAL AuthzServiceImpl : public virtual AuthzService, public EndpointTypeImpl
866 virtual ~AuthzServiceImpl() {}
868 AuthzServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
869 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
871 AuthzServiceImpl(const AuthzServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
873 IMPL_XMLOBJECT_CLONE(AuthzService);
874 EndpointType* cloneEndpointType() const {
875 return new AuthzServiceImpl(*this);
879 class SAML_DLLLOCAL AttributeServiceImpl : public virtual AttributeService, public EndpointTypeImpl
882 virtual ~AttributeServiceImpl() {}
884 AttributeServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
885 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
887 AttributeServiceImpl(const AttributeServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
889 IMPL_XMLOBJECT_CLONE(AttributeService);
890 EndpointType* cloneEndpointType() const {
891 return new AttributeServiceImpl(*this);
895 class SAML_DLLLOCAL RoleDescriptorImpl : public virtual RoleDescriptor,
896 public virtual SignableObject,
897 public AbstractComplexElement,
898 public AbstractAttributeExtensibleXMLObject,
899 public AbstractDOMCachingXMLObject,
900 public AbstractXMLObjectMarshaller,
901 public AbstractXMLObjectUnmarshaller
904 m_ID=m_ProtocolSupportEnumeration=m_ErrorURL=NULL;
905 m_ValidUntil=m_CacheDuration=NULL;
906 m_children.push_back(NULL);
907 m_children.push_back(NULL);
908 m_children.push_back(NULL);
909 m_children.push_back(NULL);
913 m_pos_Signature=m_children.begin();
914 m_pos_Extensions=m_pos_Signature;
916 m_pos_Organization=m_pos_Extensions;
917 ++m_pos_Organization;
918 m_pos_ContactPerson=m_pos_Organization;
919 ++m_pos_ContactPerson;
923 list<XMLObject*>::iterator m_pos_ContactPerson;
925 RoleDescriptorImpl() {
930 virtual ~RoleDescriptorImpl() {
931 XMLString::release(&m_ID);
932 XMLString::release(&m_ProtocolSupportEnumeration);
933 XMLString::release(&m_ErrorURL);
935 delete m_CacheDuration;
938 RoleDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
939 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
943 RoleDescriptorImpl(const RoleDescriptorImpl& src)
944 : AbstractXMLObject(src), AbstractComplexElement(src),
945 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
948 setProtocolSupportEnumeration(src.getProtocolSupportEnumeration());
949 setErrorURL(src.getErrorURL());
950 setValidUntil(src.getValidUntil());
951 setCacheDuration(src.getCacheDuration());
952 if (src.getSignature())
953 setSignature(src.getSignature()->cloneSignature());
954 if (src.getExtensions())
955 setExtensions(src.getExtensions()->cloneExtensions());
956 if (src.getOrganization())
957 setOrganization(src.getOrganization()->cloneOrganization());
959 VectorOf(KeyDescriptor) v=getKeyDescriptors();
960 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
962 v.push_back((*i)->cloneKeyDescriptor());
965 VectorOf(ContactPerson) w=getContactPersons();
966 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
968 w.push_back((*j)->cloneContactPerson());
973 //IMPL_TYPED_CHILD(Signature);
974 // Need customized setter.
976 Signature* m_Signature;
977 list<XMLObject*>::iterator m_pos_Signature;
979 Signature* getSignature() const {
983 void setSignature(Signature* sig) {
984 prepareForAssignment(m_Signature,sig);
985 *m_pos_Signature=m_Signature=sig;
986 // Sync content reference back up.
988 m_Signature->setContentReference(new opensaml::ContentReference(*this));
992 IMPL_STRING_ATTRIB(ProtocolSupportEnumeration);
993 IMPL_STRING_ATTRIB(ErrorURL);
994 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
995 IMPL_DURATION_ATTRIB(CacheDuration,0);
996 IMPL_TYPED_CHILD(Extensions);
997 IMPL_TYPED_CHILDREN(KeyDescriptor,m_pos_Organization);
998 IMPL_TYPED_CHILD(Organization);
999 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
1001 bool hasSupport(const XMLCh* protocol) const {
1002 if (!protocol || !*protocol)
1004 if (m_ProtocolSupportEnumeration) {
1005 // Look for first character.
1006 unsigned int len=XMLString::stringLen(protocol);
1008 int index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
1010 // Only possible match is if it's the first character or a space comes before it.
1011 if (index==0 || m_ProtocolSupportEnumeration[index-1]==chSpace) {
1012 // See if rest of protocol string is present.
1013 if (0==XMLString::compareNString(m_ProtocolSupportEnumeration+index+1,protocol+1,len-1)) {
1014 // Only possible match is if it's the last character or a space comes after it.
1015 if (m_ProtocolSupportEnumeration[index+len]==chNull || m_ProtocolSupportEnumeration[index+len]==chSpace)
1021 // Move past last search and start again.
1026 // Move past last search and start again.
1029 index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
1035 void addSupport(const XMLCh* protocol) {
1036 if (hasSupport(protocol))
1038 if (m_ProtocolSupportEnumeration && *m_ProtocolSupportEnumeration) {
1039 #ifdef HAVE_GOOD_STL
1040 xstring pse(m_ProtocolSupportEnumeration);
1041 pse = pse + chSpace + protocol;
1042 setProtocolSupportEnumeration(pse.c_str());
1044 auto_ptr_char temp(m_ProtocolSupportEnumeration);
1045 auto_ptr_char temp2(protocol);
1046 string pse(temp.get());
1047 pse = pse + ' ' + temp2.get();
1048 auto_ptr_XMLCh temp3(pse.c_str());
1049 setProtocolSupportEnumeration(temp3.get());
1053 setProtocolSupportEnumeration(protocol);
1057 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1058 if (!qualifiedName.hasNamespaceURI()) {
1059 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
1063 else if (XMLString::equals(qualifiedName.getLocalPart(),PROTOCOLSUPPORTENUMERATION_ATTRIB_NAME)) {
1064 setProtocolSupportEnumeration(value);
1067 else if (XMLString::equals(qualifiedName.getLocalPart(),ERRORURL_ATTRIB_NAME)) {
1071 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
1072 setValidUntil(value);
1075 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
1076 setCacheDuration(value);
1080 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1084 void marshallAttributes(DOMElement* domElement) const {
1085 MARSHALL_ID_ATTRIB(ID,ID,NULL);
1086 MARSHALL_STRING_ATTRIB(ProtocolSupportEnumeration,PROTOCOLSUPPORTENUMERATION,NULL);
1087 MARSHALL_STRING_ATTRIB(ErrorURL,ERRORURL,NULL);
1088 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
1089 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
1090 marshallExtensionAttributes(domElement);
1093 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1094 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
1095 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
1096 PROC_TYPED_CHILDREN(KeyDescriptor,SAML20MD_NS,false);
1097 PROC_TYPED_CHILD(Organization,SAML20MD_NS,false);
1098 PROC_TYPED_CHILDREN(ContactPerson,SAML20MD_NS,false);
1099 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1102 void processAttribute(const DOMAttr* attribute) {
1103 PROC_ID_ATTRIB(ID,ID,NULL);
1104 unmarshallExtensionAttribute(attribute);
1108 class SAML_DLLLOCAL RoleDescriptorTypeImpl : public virtual RoleDescriptorType, public RoleDescriptorImpl
1111 virtual ~RoleDescriptorTypeImpl() {}
1113 RoleDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1114 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1117 RoleDescriptorTypeImpl(const RoleDescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1118 VectorOf(XMLObject) v=getUnknownXMLObjects();
1119 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
1120 v.push_back((*i)->clone());
1123 IMPL_XMLOBJECT_CLONE(RoleDescriptorType);
1124 RoleDescriptor* cloneRoleDescriptor() const {
1125 return new RoleDescriptorTypeImpl(*this);
1128 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
1131 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1132 getUnknownXMLObjects().push_back(childXMLObject);
1136 class SAML_DLLLOCAL SSODescriptorTypeImpl : public virtual SSODescriptorType, public RoleDescriptorImpl
1139 m_children.push_back(NULL);
1140 m_children.push_back(NULL);
1141 m_children.push_back(NULL);
1142 m_children.push_back(NULL);
1143 m_pos_ArtifactResolutionService=m_pos_ContactPerson;
1144 ++m_pos_ArtifactResolutionService;
1145 m_pos_SingleLogoutService=m_pos_ArtifactResolutionService;
1146 ++m_pos_SingleLogoutService;
1147 m_pos_ManageNameIDService=m_pos_SingleLogoutService;
1148 ++m_pos_ManageNameIDService;
1149 m_pos_NameIDFormat=m_pos_ManageNameIDService;
1150 ++m_pos_NameIDFormat;
1154 list<XMLObject*>::iterator m_pos_ArtifactResolutionService;
1155 list<XMLObject*>::iterator m_pos_SingleLogoutService;
1156 list<XMLObject*>::iterator m_pos_ManageNameIDService;
1157 list<XMLObject*>::iterator m_pos_NameIDFormat;
1159 SSODescriptorTypeImpl() {
1164 virtual ~SSODescriptorTypeImpl() {}
1166 SSODescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1167 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1171 SSODescriptorTypeImpl(const SSODescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1173 VectorOf(ArtifactResolutionService) v=getArtifactResolutionServices();
1174 for (vector<ArtifactResolutionService*>::const_iterator i=src.m_ArtifactResolutionServices.begin(); i!=src.m_ArtifactResolutionServices.end(); i++) {
1176 v.push_back((*i)->cloneArtifactResolutionService());
1179 VectorOf(SingleLogoutService) w=getSingleLogoutServices();
1180 for (vector<SingleLogoutService*>::const_iterator j=src.m_SingleLogoutServices.begin(); j!=src.m_SingleLogoutServices.end(); j++) {
1182 w.push_back((*j)->cloneSingleLogoutService());
1185 VectorOf(ManageNameIDService) x=getManageNameIDServices();
1186 for (vector<ManageNameIDService*>::const_iterator k=src.m_ManageNameIDServices.begin(); k!=src.m_ManageNameIDServices.end(); k++) {
1188 x.push_back((*k)->cloneManageNameIDService());
1191 VectorOf(NameIDFormat) y=getNameIDFormats();
1192 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1194 y.push_back((*m)->cloneNameIDFormat());
1199 IMPL_TYPED_CHILDREN(ArtifactResolutionService,m_pos_ArtifactResolutionService);
1200 IMPL_TYPED_CHILDREN(SingleLogoutService,m_pos_SingleLogoutService);
1201 IMPL_TYPED_CHILDREN(ManageNameIDService,m_pos_ManageNameIDService);
1202 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1205 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1206 PROC_TYPED_CHILDREN(ArtifactResolutionService,SAML20MD_NS,false);
1207 PROC_TYPED_CHILDREN(SingleLogoutService,SAML20MD_NS,false);
1208 PROC_TYPED_CHILDREN(ManageNameIDService,SAML20MD_NS,false);
1209 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1210 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1214 class SAML_DLLLOCAL IDPSSODescriptorImpl : public virtual IDPSSODescriptor, public SSODescriptorTypeImpl
1216 list<XMLObject*>::iterator m_pos_SingleSignOnService;
1217 list<XMLObject*>::iterator m_pos_NameIDMappingService;
1218 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1219 list<XMLObject*>::iterator m_pos_AttributeProfile;
1222 m_WantAuthnRequestsSigned=XML_BOOL_NULL;
1223 m_children.push_back(NULL);
1224 m_children.push_back(NULL);
1225 m_children.push_back(NULL);
1226 m_children.push_back(NULL);
1227 m_pos_SingleSignOnService=m_pos_NameIDFormat;
1228 ++m_pos_SingleSignOnService;
1229 m_pos_NameIDMappingService=m_pos_SingleSignOnService;
1230 ++m_pos_NameIDMappingService;
1231 m_pos_AssertionIDRequestService=m_pos_NameIDMappingService;
1232 ++m_pos_AssertionIDRequestService;
1233 m_pos_AttributeProfile=m_pos_AssertionIDRequestService;
1234 ++m_pos_AttributeProfile;
1238 virtual ~IDPSSODescriptorImpl() {}
1240 IDPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1241 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1245 IDPSSODescriptorImpl(const IDPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1247 WantAuthnRequestsSigned(src.m_WantAuthnRequestsSigned);
1248 VectorOf(SingleSignOnService) v=getSingleSignOnServices();
1249 for (vector<SingleSignOnService*>::const_iterator i=src.m_SingleSignOnServices.begin(); i!=src.m_SingleSignOnServices.end(); i++) {
1251 v.push_back((*i)->cloneSingleSignOnService());
1254 VectorOf(NameIDMappingService) w=getNameIDMappingServices();
1255 for (vector<NameIDMappingService*>::const_iterator j=src.m_NameIDMappingServices.begin(); j!=src.m_NameIDMappingServices.end(); j++) {
1257 w.push_back((*j)->cloneNameIDMappingService());
1260 VectorOf(AssertionIDRequestService) x=getAssertionIDRequestServices();
1261 for (vector<AssertionIDRequestService*>::const_iterator k=src.m_AssertionIDRequestServices.begin(); k!=src.m_AssertionIDRequestServices.end(); k++) {
1263 x.push_back((*k)->cloneAssertionIDRequestService());
1266 VectorOf(AttributeProfile) y=getAttributeProfiles();
1267 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1269 y.push_back((*m)->cloneAttributeProfile());
1272 VectorOf(Attribute) z=getAttributes();
1273 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1275 z.push_back((*n)->cloneAttribute());
1280 IMPL_XMLOBJECT_CLONE(IDPSSODescriptor);
1281 SSODescriptorType* cloneSSODescriptorType() const {
1282 return new IDPSSODescriptorImpl(*this);
1284 RoleDescriptor* cloneRoleDescriptor() const {
1285 return new IDPSSODescriptorImpl(*this);
1288 IMPL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned);
1289 IMPL_TYPED_CHILDREN(SingleSignOnService,m_pos_SingleSignOnService);
1290 IMPL_TYPED_CHILDREN(NameIDMappingService,m_pos_NameIDMappingService);
1291 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1292 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1293 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1295 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1296 if (!qualifiedName.hasNamespaceURI()) {
1297 if (XMLString::equals(qualifiedName.getLocalPart(),WANTAUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1298 setWantAuthnRequestsSigned(value);
1302 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1306 void marshallAttributes(DOMElement* domElement) const {
1307 MARSHALL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned,WANTAUTHNREQUESTSSIGNED,NULL);
1308 RoleDescriptorImpl::marshallAttributes(domElement);
1311 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1312 PROC_TYPED_CHILDREN(SingleSignOnService,SAML20MD_NS,false);
1313 PROC_TYPED_CHILDREN(NameIDMappingService,SAML20MD_NS,false);
1314 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1315 PROC_TYPED_CHILDREN(AttributeProfile,SAML20MD_NS,false);
1316 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
1317 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1321 class SAML_DLLLOCAL RequestedAttributeImpl : public virtual RequestedAttribute,
1322 public AbstractComplexElement,
1323 public AbstractAttributeExtensibleXMLObject,
1324 public AbstractDOMCachingXMLObject,
1325 public AbstractXMLObjectMarshaller,
1326 public AbstractXMLObjectUnmarshaller
1329 m_Name=m_NameFormat=m_FriendlyName=NULL;
1330 m_isRequired=XML_BOOL_NULL;
1333 virtual ~RequestedAttributeImpl() {
1334 XMLString::release(&m_Name);
1335 XMLString::release(&m_NameFormat);
1336 XMLString::release(&m_FriendlyName);
1339 RequestedAttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1340 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1344 RequestedAttributeImpl(const RequestedAttributeImpl& src)
1345 : AbstractXMLObject(src), AbstractComplexElement(src),
1346 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1348 setName(src.getName());
1349 setNameFormat(src.getNameFormat());
1350 setFriendlyName(src.getFriendlyName());
1351 isRequired(src.m_isRequired);
1352 VectorOf(XMLObject) v=getAttributeValues();
1353 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
1355 v.push_back((*i)->clone());
1360 IMPL_XMLOBJECT_CLONE(RequestedAttribute);
1361 Attribute* cloneAttribute() const {
1362 return new RequestedAttributeImpl(*this);
1365 IMPL_STRING_ATTRIB(Name);
1366 IMPL_STRING_ATTRIB(NameFormat);
1367 IMPL_STRING_ATTRIB(FriendlyName);
1368 IMPL_BOOLEAN_ATTRIB(isRequired);
1369 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
1371 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1372 if (!qualifiedName.hasNamespaceURI()) {
1373 if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) {
1377 else if (XMLString::equals(qualifiedName.getLocalPart(),NAMEFORMAT_ATTRIB_NAME)) {
1378 setNameFormat(value);
1381 else if (XMLString::equals(qualifiedName.getLocalPart(),FRIENDLYNAME_ATTRIB_NAME)) {
1382 setFriendlyName(value);
1385 else if (XMLString::equals(qualifiedName.getLocalPart(),ISREQUIRED_ATTRIB_NAME)) {
1386 setisRequired(value);
1390 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1394 void marshallAttributes(DOMElement* domElement) const {
1395 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
1396 MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,NULL);
1397 MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,NULL);
1398 MARSHALL_BOOLEAN_ATTRIB(isRequired,ISREQUIRED,NULL);
1399 marshallExtensionAttributes(domElement);
1402 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1403 getAttributeValues().push_back(childXMLObject);
1406 void processAttribute(const DOMAttr* attribute) {
1407 unmarshallExtensionAttribute(attribute);
1411 class SAML_DLLLOCAL AttributeConsumingServiceImpl : public virtual AttributeConsumingService,
1412 public AbstractComplexElement,
1413 public AbstractDOMCachingXMLObject,
1414 public AbstractXMLObjectMarshaller,
1415 public AbstractXMLObjectUnmarshaller
1417 list<XMLObject*>::iterator m_pos_ServiceDescription;
1418 list<XMLObject*>::iterator m_pos_RequestedAttribute;
1422 m_isDefault=XML_BOOL_NULL;
1423 m_children.push_back(NULL);
1424 m_children.push_back(NULL);
1425 m_pos_ServiceDescription=m_children.begin();
1426 m_pos_RequestedAttribute=m_pos_ServiceDescription;
1427 ++m_pos_RequestedAttribute;
1431 virtual ~AttributeConsumingServiceImpl() {
1432 XMLString::release(&m_Index);
1435 AttributeConsumingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1436 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1440 AttributeConsumingServiceImpl(const AttributeConsumingServiceImpl& src)
1441 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1443 setIndex(src.m_Index);
1444 isDefault(src.m_isDefault);
1445 VectorOf(ServiceName) v=getServiceNames();
1446 for (vector<ServiceName*>::const_iterator i=src.m_ServiceNames.begin(); i!=src.m_ServiceNames.end(); i++) {
1448 v.push_back((*i)->cloneServiceName());
1451 VectorOf(ServiceDescription) w=getServiceDescriptions();
1452 for (vector<ServiceDescription*>::const_iterator j=src.m_ServiceDescriptions.begin(); j!=src.m_ServiceDescriptions.end(); j++) {
1454 w.push_back((*j)->cloneServiceDescription());
1457 VectorOf(RequestedAttribute) x=getRequestedAttributes();
1458 for (vector<RequestedAttribute*>::const_iterator k=src.m_RequestedAttributes.begin(); k!=src.m_RequestedAttributes.end(); k++) {
1460 x.push_back((*k)->cloneRequestedAttribute());
1465 IMPL_XMLOBJECT_CLONE(AttributeConsumingService);
1466 IMPL_INTEGER_ATTRIB(Index);
1467 IMPL_BOOLEAN_ATTRIB(isDefault);
1468 IMPL_TYPED_CHILDREN(ServiceName,m_pos_ServiceDescription);
1469 IMPL_TYPED_CHILDREN(ServiceDescription,m_pos_RequestedAttribute);
1470 IMPL_TYPED_CHILDREN(RequestedAttribute,m_children.end());
1473 void marshallAttributes(DOMElement* domElement) const {
1474 MARSHALL_INTEGER_ATTRIB(Index,INDEX,NULL);
1475 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
1478 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1479 PROC_TYPED_CHILDREN(ServiceName,SAML20MD_NS,false);
1480 PROC_TYPED_CHILDREN(ServiceDescription,SAML20MD_NS,false);
1481 PROC_TYPED_CHILDREN(RequestedAttribute,SAML20MD_NS,false);
1482 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1485 void processAttribute(const DOMAttr* attribute) {
1486 PROC_INTEGER_ATTRIB(Index,INDEX,NULL);
1487 PROC_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
1488 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1492 class SAML_DLLLOCAL SPSSODescriptorImpl : public virtual SPSSODescriptor, public SSODescriptorTypeImpl
1494 list<XMLObject*>::iterator m_pos_AssertionConsumerService;
1497 m_AuthnRequestsSigned=XML_BOOL_NULL;
1498 m_WantAssertionsSigned=XML_BOOL_NULL;
1499 m_children.push_back(NULL);
1500 m_pos_AssertionConsumerService=m_pos_NameIDFormat;
1501 ++m_pos_AssertionConsumerService;
1505 virtual ~SPSSODescriptorImpl() {}
1507 SPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1508 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1512 SPSSODescriptorImpl(const SPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1514 AuthnRequestsSigned(src.m_AuthnRequestsSigned);
1515 WantAssertionsSigned(src.m_WantAssertionsSigned);
1516 VectorOf(AssertionConsumerService) v=getAssertionConsumerServices();
1517 for (vector<AssertionConsumerService*>::const_iterator i=src.m_AssertionConsumerServices.begin(); i!=src.m_AssertionConsumerServices.end(); i++) {
1519 v.push_back((*i)->cloneAssertionConsumerService());
1522 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1523 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1525 w.push_back((*j)->cloneAttributeConsumingService());
1530 IMPL_XMLOBJECT_CLONE(SPSSODescriptor);
1531 SSODescriptorType* cloneSSODescriptorType() const {
1532 return cloneSPSSODescriptor();
1534 RoleDescriptor* cloneRoleDescriptor() const {
1535 return cloneSPSSODescriptor();
1538 IMPL_BOOLEAN_ATTRIB(AuthnRequestsSigned);
1539 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1540 IMPL_TYPED_CHILDREN(AssertionConsumerService,m_pos_AssertionConsumerService);
1541 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1543 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1544 if (!qualifiedName.hasNamespaceURI()) {
1545 if (XMLString::equals(qualifiedName.getLocalPart(),AUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1546 setAuthnRequestsSigned(value);
1549 else if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1550 setWantAssertionsSigned(value);
1554 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1558 void marshallAttributes(DOMElement* domElement) const {
1559 MARSHALL_BOOLEAN_ATTRIB(AuthnRequestsSigned,AUTHNREQUESTSSIGNED,NULL);
1560 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,NULL);
1561 RoleDescriptorImpl::marshallAttributes(domElement);
1564 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1565 PROC_TYPED_CHILDREN(AssertionConsumerService,SAML20MD_NS,false);
1566 PROC_TYPED_CHILDREN(AttributeConsumingService,SAML20MD_NS,false);
1567 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1571 class SAML_DLLLOCAL AuthnAuthorityDescriptorImpl : public virtual AuthnAuthorityDescriptor, public RoleDescriptorImpl
1573 list<XMLObject*>::iterator m_pos_AuthnQueryService;
1574 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1577 m_children.push_back(NULL);
1578 m_children.push_back(NULL);
1579 m_pos_AuthnQueryService=m_pos_ContactPerson;
1580 ++m_pos_AuthnQueryService;
1581 m_pos_AssertionIDRequestService=m_pos_AuthnQueryService;
1582 ++m_pos_AssertionIDRequestService;
1586 virtual ~AuthnAuthorityDescriptorImpl() {}
1588 AuthnAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1589 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1593 AuthnAuthorityDescriptorImpl(const AuthnAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1595 VectorOf(AuthnQueryService) v=getAuthnQueryServices();
1596 for (vector<AuthnQueryService*>::const_iterator i=src.m_AuthnQueryServices.begin(); i!=src.m_AuthnQueryServices.end(); i++) {
1598 v.push_back((*i)->cloneAuthnQueryService());
1601 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1602 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1604 w.push_back((*j)->cloneAssertionIDRequestService());
1607 VectorOf(NameIDFormat) x=getNameIDFormats();
1608 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1610 x.push_back((*k)->cloneNameIDFormat());
1615 IMPL_XMLOBJECT_CLONE(AuthnAuthorityDescriptor);
1616 RoleDescriptor* cloneRoleDescriptor() const {
1617 return cloneAuthnAuthorityDescriptor();
1620 IMPL_TYPED_CHILDREN(AuthnQueryService,m_pos_AuthnQueryService);
1621 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1622 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1625 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1626 PROC_TYPED_CHILDREN(AuthnQueryService,SAML20MD_NS,false);
1627 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1628 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1629 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1633 class SAML_DLLLOCAL PDPDescriptorImpl : public virtual PDPDescriptor, public RoleDescriptorImpl
1635 list<XMLObject*>::iterator m_pos_AuthzService;
1636 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1639 m_children.push_back(NULL);
1640 m_children.push_back(NULL);
1641 m_pos_AuthzService=m_pos_ContactPerson;
1642 ++m_pos_AuthzService;
1643 m_pos_AssertionIDRequestService=m_pos_AuthzService;
1644 ++m_pos_AssertionIDRequestService;
1648 virtual ~PDPDescriptorImpl() {}
1650 PDPDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1651 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1655 PDPDescriptorImpl(const PDPDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1657 VectorOf(AuthzService) v=getAuthzServices();
1658 for (vector<AuthzService*>::const_iterator i=src.m_AuthzServices.begin(); i!=src.m_AuthzServices.end(); i++) {
1660 v.push_back((*i)->cloneAuthzService());
1663 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1664 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1666 w.push_back((*j)->cloneAssertionIDRequestService());
1669 VectorOf(NameIDFormat) x=getNameIDFormats();
1670 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1672 x.push_back((*k)->cloneNameIDFormat());
1677 IMPL_XMLOBJECT_CLONE(PDPDescriptor);
1678 RoleDescriptor* cloneRoleDescriptor() const {
1679 return clonePDPDescriptor();
1682 IMPL_TYPED_CHILDREN(AuthzService,m_pos_AuthzService);
1683 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1684 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1687 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1688 PROC_TYPED_CHILDREN(AuthzService,SAML20MD_NS,false);
1689 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1690 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1691 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1695 class SAML_DLLLOCAL AttributeAuthorityDescriptorImpl : public virtual AttributeAuthorityDescriptor, public RoleDescriptorImpl
1697 list<XMLObject*>::iterator m_pos_AttributeService;
1698 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1699 list<XMLObject*>::iterator m_pos_NameIDFormat;
1700 list<XMLObject*>::iterator m_pos_AttributeProfile;
1703 m_children.push_back(NULL);
1704 m_children.push_back(NULL);
1705 m_children.push_back(NULL);
1706 m_children.push_back(NULL);
1707 m_pos_AttributeService=m_pos_ContactPerson;
1708 ++m_pos_AttributeService;
1709 m_pos_AssertionIDRequestService=m_pos_AttributeService;
1710 ++m_pos_AssertionIDRequestService;
1711 m_pos_NameIDFormat=m_pos_AssertionIDRequestService;
1712 ++m_pos_NameIDFormat;
1713 m_pos_AttributeProfile=m_pos_NameIDFormat;
1714 ++m_pos_AttributeProfile;
1718 virtual ~AttributeAuthorityDescriptorImpl() {}
1720 AttributeAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1721 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1725 AttributeAuthorityDescriptorImpl(const AttributeAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1727 VectorOf(AttributeService) v=getAttributeServices();
1728 for (vector<AttributeService*>::const_iterator i=src.m_AttributeServices.begin(); i!=src.m_AttributeServices.end(); i++) {
1730 v.push_back((*i)->cloneAttributeService());
1733 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1734 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1736 w.push_back((*j)->cloneAssertionIDRequestService());
1739 VectorOf(NameIDFormat) x=getNameIDFormats();
1740 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1742 x.push_back((*k)->cloneNameIDFormat());
1745 VectorOf(AttributeProfile) y=getAttributeProfiles();
1746 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1748 y.push_back((*m)->cloneAttributeProfile());
1751 VectorOf(Attribute) z=getAttributes();
1752 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1754 z.push_back((*n)->cloneAttribute());
1759 IMPL_XMLOBJECT_CLONE(AttributeAuthorityDescriptor);
1760 RoleDescriptor* cloneRoleDescriptor() const {
1761 return cloneAttributeAuthorityDescriptor();
1764 IMPL_TYPED_CHILDREN(AttributeService,m_pos_AttributeService);
1765 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1766 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1767 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1768 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1771 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1772 PROC_TYPED_CHILDREN(AttributeService,SAML20MD_NS,false);
1773 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1774 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1775 PROC_TYPED_CHILDREN(AttributeProfile,SAML20MD_NS,false);
1776 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
1777 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1781 class SAML_DLLLOCAL QueryDescriptorTypeImpl : public virtual QueryDescriptorType, public RoleDescriptorImpl
1784 m_WantAssertionsSigned=XML_BOOL_NULL;
1785 m_children.push_back(NULL);
1786 m_pos_NameIDFormat=m_pos_ContactPerson;
1787 ++m_pos_NameIDFormat;
1791 list<XMLObject*>::iterator m_pos_NameIDFormat;
1793 QueryDescriptorTypeImpl() {
1798 virtual ~QueryDescriptorTypeImpl() {}
1800 QueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1801 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1805 QueryDescriptorTypeImpl(const QueryDescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1807 WantAssertionsSigned(src.m_WantAssertionsSigned);
1808 VectorOf(NameIDFormat) y=getNameIDFormats();
1809 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1811 y.push_back((*m)->cloneNameIDFormat());
1816 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1817 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1819 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1820 if (!qualifiedName.hasNamespaceURI()) {
1821 if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1822 setWantAssertionsSigned(value);
1826 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1830 void marshallAttributes(DOMElement* domElement) const {
1831 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,NULL);
1832 RoleDescriptorImpl::marshallAttributes(domElement);
1835 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1836 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1837 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1841 class SAML_DLLLOCAL AuthnQueryDescriptorTypeImpl : public virtual AuthnQueryDescriptorType, public QueryDescriptorTypeImpl
1844 virtual ~AuthnQueryDescriptorTypeImpl() {}
1846 AuthnQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1847 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1849 AuthnQueryDescriptorTypeImpl(const AuthnQueryDescriptorTypeImpl& src) : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {}
1851 IMPL_XMLOBJECT_CLONE(AuthnQueryDescriptorType);
1852 QueryDescriptorType* cloneQueryDescriptorType() const {
1853 return new AuthnQueryDescriptorTypeImpl(*this);
1855 RoleDescriptor* cloneRoleDescriptor() const {
1856 return new AuthnQueryDescriptorTypeImpl(*this);
1860 class SAML_DLLLOCAL AttributeQueryDescriptorTypeImpl : public virtual AttributeQueryDescriptorType, public QueryDescriptorTypeImpl
1863 virtual ~AttributeQueryDescriptorTypeImpl() {}
1865 AttributeQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1866 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1868 AttributeQueryDescriptorTypeImpl(const AttributeQueryDescriptorTypeImpl& src)
1869 : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1870 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1871 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1873 w.push_back((*j)->cloneAttributeConsumingService());
1878 IMPL_XMLOBJECT_CLONE(AttributeQueryDescriptorType);
1879 QueryDescriptorType* cloneQueryDescriptorType() const {
1880 return new AttributeQueryDescriptorTypeImpl(*this);
1882 RoleDescriptor* cloneRoleDescriptor() const {
1883 return new AttributeQueryDescriptorTypeImpl(*this);
1886 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1889 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1890 PROC_TYPED_CHILDREN(AttributeConsumingService,SAML20MD_NS,false);
1891 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1895 class SAML_DLLLOCAL AuthzDecisionQueryDescriptorTypeImpl : public virtual AuthzDecisionQueryDescriptorType, public QueryDescriptorTypeImpl
1898 virtual ~AuthzDecisionQueryDescriptorTypeImpl() {}
1900 AuthzDecisionQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1901 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1903 AuthzDecisionQueryDescriptorTypeImpl(const AuthzDecisionQueryDescriptorTypeImpl& src)
1904 : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1905 VectorOf(ActionNamespace) w=getActionNamespaces();
1906 for (vector<ActionNamespace*>::const_iterator j=src.m_ActionNamespaces.begin(); j!=src.m_ActionNamespaces.end(); j++) {
1908 w.push_back((*j)->cloneActionNamespace());
1913 IMPL_XMLOBJECT_CLONE(AuthzDecisionQueryDescriptorType);
1914 QueryDescriptorType* cloneQueryDescriptorType() const {
1915 return new AuthzDecisionQueryDescriptorTypeImpl(*this);
1917 RoleDescriptor* cloneRoleDescriptor() const {
1918 return new AuthzDecisionQueryDescriptorTypeImpl(*this);
1921 IMPL_TYPED_CHILDREN(ActionNamespace,m_children.end());
1924 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1925 PROC_TYPED_CHILDREN(ActionNamespace,samlconstants::SAML20MD_QUERY_EXT_NS,false);
1926 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1930 class SAML_DLLLOCAL AffiliationDescriptorImpl : public virtual AffiliationDescriptor,
1931 public virtual SignableObject,
1932 public AbstractComplexElement,
1933 public AbstractAttributeExtensibleXMLObject,
1934 public AbstractDOMCachingXMLObject,
1935 public AbstractXMLObjectMarshaller,
1936 public AbstractXMLObjectUnmarshaller
1938 list<XMLObject*>::iterator m_pos_AffiliateMember;
1941 m_ID=m_AffiliationOwnerID=NULL;
1942 m_ValidUntil=m_CacheDuration=NULL;
1943 m_children.push_back(NULL);
1944 m_children.push_back(NULL);
1945 m_children.push_back(NULL);
1948 m_pos_Signature=m_children.begin();
1949 m_pos_Extensions=m_pos_Signature;
1951 m_pos_AffiliateMember=m_pos_Extensions;
1952 ++m_pos_AffiliateMember;
1956 virtual ~AffiliationDescriptorImpl() {
1957 XMLString::release(&m_ID);
1958 XMLString::release(&m_AffiliationOwnerID);
1959 delete m_ValidUntil;
1960 delete m_CacheDuration;
1963 AffiliationDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1964 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1968 AffiliationDescriptorImpl(const AffiliationDescriptorImpl& src)
1969 : AbstractXMLObject(src), AbstractComplexElement(src),
1970 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1973 setAffiliationOwnerID(src.getAffiliationOwnerID());
1974 setValidUntil(src.getValidUntil());
1975 setCacheDuration(src.getCacheDuration());
1976 if (src.getSignature())
1977 setSignature(src.getSignature()->cloneSignature());
1978 if (src.getExtensions())
1979 setExtensions(src.getExtensions()->cloneExtensions());
1981 VectorOf(KeyDescriptor) v=getKeyDescriptors();
1982 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
1984 v.push_back((*i)->cloneKeyDescriptor());
1987 VectorOf(AffiliateMember) w=getAffiliateMembers();
1988 for (vector<AffiliateMember*>::const_iterator j=src.m_AffiliateMembers.begin(); j!=src.m_AffiliateMembers.end(); j++) {
1990 w.push_back((*j)->cloneAffiliateMember());
1995 IMPL_XMLOBJECT_CLONE(AffiliationDescriptor);
1997 //IMPL_TYPED_CHILD(Signature);
1998 // Need customized setter.
2000 Signature* m_Signature;
2001 list<XMLObject*>::iterator m_pos_Signature;
2003 Signature* getSignature() const {
2007 void setSignature(Signature* sig) {
2008 prepareForAssignment(m_Signature,sig);
2009 *m_pos_Signature=m_Signature=sig;
2010 // Sync content reference back up.
2012 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2016 IMPL_STRING_ATTRIB(AffiliationOwnerID);
2017 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2018 IMPL_DURATION_ATTRIB(CacheDuration,0);
2019 IMPL_TYPED_CHILD(Extensions);
2020 IMPL_TYPED_CHILDREN(AffiliateMember,m_pos_AffiliateMember);
2021 IMPL_TYPED_CHILDREN(KeyDescriptor,m_children.end());
2023 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
2024 if (!qualifiedName.hasNamespaceURI()) {
2025 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
2029 else if (XMLString::equals(qualifiedName.getLocalPart(),AFFILIATIONOWNERID_ATTRIB_NAME)) {
2030 setAffiliationOwnerID(value);
2033 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
2034 setValidUntil(value);
2037 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
2038 setCacheDuration(value);
2042 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
2046 void marshallAttributes(DOMElement* domElement) const {
2047 MARSHALL_ID_ATTRIB(ID,ID,NULL);
2048 MARSHALL_STRING_ATTRIB(AffiliationOwnerID,AFFILIATIONOWNERID,NULL);
2049 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2050 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2051 marshallExtensionAttributes(domElement);
2054 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2055 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2056 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2057 PROC_TYPED_CHILDREN(AffiliateMember,SAML20MD_NS,false);
2058 PROC_TYPED_CHILDREN(KeyDescriptor,SAML20MD_NS,false);
2059 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2062 void processAttribute(const DOMAttr* attribute) {
2063 PROC_ID_ATTRIB(ID,ID,NULL);
2064 unmarshallExtensionAttribute(attribute);
2068 class SAML_DLLLOCAL EntityDescriptorImpl : public virtual EntityDescriptor,
2069 public virtual SignableObject,
2070 public AbstractComplexElement,
2071 public AbstractAttributeExtensibleXMLObject,
2072 public AbstractDOMCachingXMLObject,
2073 public AbstractXMLObjectMarshaller,
2074 public AbstractXMLObjectUnmarshaller
2076 list<XMLObject*>::iterator m_pos_ContactPerson;
2079 m_ID=m_EntityID=NULL;
2080 m_ValidUntil=m_CacheDuration=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);
2085 m_children.push_back(NULL);
2088 m_AffiliationDescriptor=NULL;
2089 m_Organization=NULL;
2090 m_pos_Signature=m_children.begin();
2091 m_pos_Extensions=m_pos_Signature;
2093 m_pos_AffiliationDescriptor=m_pos_Extensions;
2094 ++m_pos_AffiliationDescriptor;
2095 m_pos_Organization=m_pos_AffiliationDescriptor;
2096 ++m_pos_Organization;
2097 m_pos_ContactPerson=m_pos_Organization;
2098 ++m_pos_ContactPerson;
2102 virtual ~EntityDescriptorImpl() {
2103 XMLString::release(&m_ID);
2104 XMLString::release(&m_EntityID);
2105 delete m_ValidUntil;
2106 delete m_CacheDuration;
2109 EntityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
2110 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2114 EntityDescriptorImpl(const EntityDescriptorImpl& src)
2115 : AbstractXMLObject(src), AbstractComplexElement(src),
2116 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
2119 setEntityID(src.getEntityID());
2120 setValidUntil(src.getValidUntil());
2121 setCacheDuration(src.getCacheDuration());
2122 if (src.getSignature())
2123 setSignature(src.getSignature()->cloneSignature());
2124 if (src.getExtensions())
2125 setExtensions(src.getExtensions()->cloneExtensions());
2126 if (src.getAffiliationDescriptor())
2127 setAffiliationDescriptor(src.getAffiliationDescriptor()->cloneAffiliationDescriptor());
2128 if (src.getOrganization())
2129 setOrganization(src.getOrganization()->cloneOrganization());
2131 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2133 IDPSSODescriptor* idp=dynamic_cast<IDPSSODescriptor*>(*i);
2135 getIDPSSODescriptors().push_back(idp->cloneIDPSSODescriptor());
2139 SPSSODescriptor* sp=dynamic_cast<SPSSODescriptor*>(*i);
2141 getSPSSODescriptors().push_back(sp->cloneSPSSODescriptor());
2145 AuthnAuthorityDescriptor* authn=dynamic_cast<AuthnAuthorityDescriptor*>(*i);
2147 getAuthnAuthorityDescriptors().push_back(authn->cloneAuthnAuthorityDescriptor());
2151 AttributeAuthorityDescriptor* attr=dynamic_cast<AttributeAuthorityDescriptor*>(*i);
2153 getAttributeAuthorityDescriptors().push_back(attr->cloneAttributeAuthorityDescriptor());
2157 PDPDescriptor* pdp=dynamic_cast<PDPDescriptor*>(*i);
2159 getPDPDescriptors().push_back(pdp->clonePDPDescriptor());
2163 AuthnQueryDescriptorType* authnq=dynamic_cast<AuthnQueryDescriptorType*>(*i);
2165 getAuthnQueryDescriptorTypes().push_back(authnq->cloneAuthnQueryDescriptorType());
2169 AttributeQueryDescriptorType* attrq=dynamic_cast<AttributeQueryDescriptorType*>(*i);
2171 getAttributeQueryDescriptorTypes().push_back(attrq->cloneAttributeQueryDescriptorType());
2175 AuthzDecisionQueryDescriptorType* authzq=dynamic_cast<AuthzDecisionQueryDescriptorType*>(*i);
2177 getAuthzDecisionQueryDescriptorTypes().push_back(authzq->cloneAuthzDecisionQueryDescriptorType());
2181 RoleDescriptor* role=dynamic_cast<RoleDescriptor*>(*i);
2183 getRoleDescriptors().push_back(role->cloneRoleDescriptor());
2189 VectorOf(ContactPerson) v=getContactPersons();
2190 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
2192 v.push_back((*j)->cloneContactPerson());
2195 VectorOf(AdditionalMetadataLocation) w=getAdditionalMetadataLocations();
2196 for (vector<AdditionalMetadataLocation*>::const_iterator k=src.m_AdditionalMetadataLocations.begin(); k!=src.m_AdditionalMetadataLocations.end(); k++) {
2198 w.push_back((*k)->cloneAdditionalMetadataLocation());
2203 IMPL_XMLOBJECT_CLONE(EntityDescriptor);
2205 //IMPL_TYPED_CHILD(Signature);
2206 // Need customized setter.
2208 Signature* m_Signature;
2209 list<XMLObject*>::iterator m_pos_Signature;
2211 Signature* getSignature() const {
2215 void setSignature(Signature* sig) {
2216 prepareForAssignment(m_Signature,sig);
2217 *m_pos_Signature=m_Signature=sig;
2218 // Sync content reference back up.
2220 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2224 IMPL_STRING_ATTRIB(EntityID);
2225 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2226 IMPL_DURATION_ATTRIB(CacheDuration,0);
2227 IMPL_TYPED_CHILD(Extensions);
2228 IMPL_TYPED_CHILDREN(RoleDescriptor,m_pos_AffiliationDescriptor);
2229 IMPL_TYPED_CHILDREN(IDPSSODescriptor,m_pos_AffiliationDescriptor);
2230 IMPL_TYPED_CHILDREN(SPSSODescriptor,m_pos_AffiliationDescriptor);
2231 IMPL_TYPED_CHILDREN(AuthnAuthorityDescriptor,m_pos_AffiliationDescriptor);
2232 IMPL_TYPED_CHILDREN(AttributeAuthorityDescriptor,m_pos_AffiliationDescriptor);
2233 IMPL_TYPED_CHILDREN(PDPDescriptor,m_pos_AffiliationDescriptor);
2234 IMPL_TYPED_CHILDREN(AuthnQueryDescriptorType,m_pos_AffiliationDescriptor);
2235 IMPL_TYPED_CHILDREN(AttributeQueryDescriptorType,m_pos_AffiliationDescriptor);
2236 IMPL_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,m_pos_AffiliationDescriptor);
2237 IMPL_TYPED_CHILD(AffiliationDescriptor);
2238 IMPL_TYPED_CHILD(Organization);
2239 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
2240 IMPL_TYPED_CHILDREN(AdditionalMetadataLocation,m_children.end());
2242 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
2243 if (!qualifiedName.hasNamespaceURI()) {
2244 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
2248 else if (XMLString::equals(qualifiedName.getLocalPart(),ENTITYID_ATTRIB_NAME)) {
2252 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
2253 setValidUntil(value);
2256 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
2257 setCacheDuration(value);
2261 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
2264 const RoleDescriptor* getRoleDescriptor(const xmltooling::QName& qname, const XMLCh* protocol) const {
2265 // Check for "known" elements/types.
2266 if (qname == IDPSSODescriptor::ELEMENT_QNAME)
2267 return find_if(m_IDPSSODescriptors, isValidForProtocol(protocol));
2268 if (qname == SPSSODescriptor::ELEMENT_QNAME)
2269 return find_if(m_SPSSODescriptors, isValidForProtocol(protocol));
2270 if (qname == AuthnAuthorityDescriptor::ELEMENT_QNAME)
2271 return find_if(m_AuthnAuthorityDescriptors, isValidForProtocol(protocol));
2272 if (qname == AttributeAuthorityDescriptor::ELEMENT_QNAME)
2273 return find_if(m_AttributeAuthorityDescriptors, isValidForProtocol(protocol));
2274 if (qname == PDPDescriptor::ELEMENT_QNAME)
2275 return find_if(m_PDPDescriptors, isValidForProtocol(protocol));
2276 if (qname == AuthnQueryDescriptorType::TYPE_QNAME)
2277 return find_if(m_AuthnQueryDescriptorTypes, isValidForProtocol(protocol));
2278 if (qname == AttributeQueryDescriptorType::TYPE_QNAME)
2279 return find_if(m_AttributeQueryDescriptorTypes, isValidForProtocol(protocol));
2280 if (qname == AuthzDecisionQueryDescriptorType::TYPE_QNAME)
2281 return find_if(m_AuthzDecisionQueryDescriptorTypes, isValidForProtocol(protocol));
2283 vector<RoleDescriptor*>::const_iterator i =
2284 find_if(m_RoleDescriptors.begin(), m_RoleDescriptors.end(), ofTypeValidForProtocol(qname,protocol));
2285 return (i!=m_RoleDescriptors.end()) ? *i : NULL;
2289 void marshallAttributes(DOMElement* domElement) const {
2290 MARSHALL_ID_ATTRIB(ID,ID,NULL);
2291 MARSHALL_STRING_ATTRIB(EntityID,ENTITYID,NULL);
2292 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2293 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2294 marshallExtensionAttributes(domElement);
2297 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2298 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2299 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2300 PROC_TYPED_CHILDREN(IDPSSODescriptor,SAML20MD_NS,false);
2301 PROC_TYPED_CHILDREN(SPSSODescriptor,SAML20MD_NS,false);
2302 PROC_TYPED_CHILDREN(AuthnAuthorityDescriptor,SAML20MD_NS,false);
2303 PROC_TYPED_CHILDREN(AttributeAuthorityDescriptor,SAML20MD_NS,false);
2304 PROC_TYPED_CHILDREN(PDPDescriptor,SAML20MD_NS,false);
2305 PROC_TYPED_CHILDREN(AuthnQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2306 PROC_TYPED_CHILDREN(AttributeQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2307 PROC_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2308 PROC_TYPED_CHILDREN(RoleDescriptor,SAML20MD_NS,false);
2309 PROC_TYPED_CHILD(AffiliationDescriptor,SAML20MD_NS,false);
2310 PROC_TYPED_CHILD(Organization,SAML20MD_NS,false);
2311 PROC_TYPED_CHILDREN(ContactPerson,SAML20MD_NS,false);
2312 PROC_TYPED_CHILDREN(AdditionalMetadataLocation,SAML20MD_NS,false);
2313 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2316 void processAttribute(const DOMAttr* attribute) {
2317 PROC_ID_ATTRIB(ID,ID,NULL);
2318 unmarshallExtensionAttribute(attribute);
2322 class SAML_DLLLOCAL EntitiesDescriptorImpl : public virtual EntitiesDescriptor,
2323 public virtual SignableObject,
2324 public AbstractComplexElement,
2325 public AbstractDOMCachingXMLObject,
2326 public AbstractXMLObjectMarshaller,
2327 public AbstractXMLObjectUnmarshaller
2331 m_ValidUntil=m_CacheDuration=NULL;
2332 m_children.push_back(NULL);
2333 m_children.push_back(NULL);
2336 m_pos_Signature=m_children.begin();
2337 m_pos_Extensions=m_pos_Signature;
2342 virtual ~EntitiesDescriptorImpl() {
2343 XMLString::release(&m_ID);
2344 XMLString::release(&m_Name);
2345 delete m_ValidUntil;
2346 delete m_CacheDuration;
2349 EntitiesDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
2350 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2354 EntitiesDescriptorImpl(const EntitiesDescriptorImpl& src)
2355 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2358 setName(src.getName());
2359 setValidUntil(src.getValidUntil());
2360 setCacheDuration(src.getCacheDuration());
2361 if (src.getSignature())
2362 setSignature(src.getSignature()->cloneSignature());
2363 if (src.getExtensions())
2364 setExtensions(src.getExtensions()->cloneExtensions());
2366 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2368 EntityDescriptor* e=dynamic_cast<EntityDescriptor*>(*i);
2370 getEntityDescriptors().push_back(e->cloneEntityDescriptor());
2374 EntitiesDescriptor* es=dynamic_cast<EntitiesDescriptor*>(*i);
2376 getEntitiesDescriptors().push_back(es->cloneEntitiesDescriptor());
2383 IMPL_XMLOBJECT_CLONE(EntitiesDescriptor);
2385 //IMPL_TYPED_CHILD(Signature);
2386 // Need customized setter.
2388 Signature* m_Signature;
2389 list<XMLObject*>::iterator m_pos_Signature;
2391 Signature* getSignature() const {
2395 void setSignature(Signature* sig) {
2396 prepareForAssignment(m_Signature,sig);
2397 *m_pos_Signature=m_Signature=sig;
2398 // Sync content reference back up.
2400 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2404 IMPL_STRING_ATTRIB(Name);
2405 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2406 IMPL_DURATION_ATTRIB(CacheDuration,0);
2407 IMPL_TYPED_CHILD(Extensions);
2408 IMPL_TYPED_CHILDREN(EntityDescriptor,m_children.end());
2409 IMPL_TYPED_CHILDREN(EntitiesDescriptor,m_children.end());
2412 void marshallAttributes(DOMElement* domElement) const {
2413 MARSHALL_ID_ATTRIB(ID,ID,NULL);
2414 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
2415 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2416 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2419 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2420 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2421 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2422 PROC_TYPED_CHILDREN(EntityDescriptor,SAML20MD_NS,false);
2423 PROC_TYPED_CHILDREN(EntitiesDescriptor,SAML20MD_NS,false);
2424 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2427 void processAttribute(const DOMAttr* attribute) {
2428 PROC_ID_ATTRIB(ID,ID,NULL);
2429 PROC_STRING_ATTRIB(Name,NAME,NULL);
2430 PROC_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2431 PROC_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2438 #if defined (_MSC_VER)
2439 #pragma warning( pop )
2442 IMPL_ELEMENT_QNAME(IDPSSODescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2443 IMPL_ELEMENT_QNAME(SPSSODescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2444 IMPL_ELEMENT_QNAME(AuthnAuthorityDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2445 IMPL_ELEMENT_QNAME(AttributeAuthorityDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2446 IMPL_ELEMENT_QNAME(PDPDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2447 IMPL_TYPE_QNAME(AuthnQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2448 IMPL_TYPE_QNAME(AttributeQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2449 IMPL_TYPE_QNAME(AuthzDecisionQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2451 // Builder Implementations
2453 IMPL_XMLOBJECTBUILDER(AdditionalMetadataLocation);
2454 IMPL_XMLOBJECTBUILDER(AffiliateMember);
2455 IMPL_XMLOBJECTBUILDER(AffiliationDescriptor);
2456 IMPL_XMLOBJECTBUILDER(ArtifactResolutionService);
2457 IMPL_XMLOBJECTBUILDER(AssertionConsumerService);
2458 IMPL_XMLOBJECTBUILDER(AssertionIDRequestService);
2459 IMPL_XMLOBJECTBUILDER(AttributeAuthorityDescriptor);
2460 IMPL_XMLOBJECTBUILDER(AttributeConsumingService);
2461 IMPL_XMLOBJECTBUILDER(AttributeProfile);
2462 IMPL_XMLOBJECTBUILDER(AttributeQueryDescriptorType);
2463 IMPL_XMLOBJECTBUILDER(AttributeService);
2464 IMPL_XMLOBJECTBUILDER(AuthnAuthorityDescriptor);
2465 IMPL_XMLOBJECTBUILDER(AuthnQueryDescriptorType);
2466 IMPL_XMLOBJECTBUILDER(AuthnQueryService);
2467 IMPL_XMLOBJECTBUILDER(AuthzDecisionQueryDescriptorType);
2468 IMPL_XMLOBJECTBUILDER(AuthzService);
2469 IMPL_XMLOBJECTBUILDER(Company);
2470 IMPL_XMLOBJECTBUILDER(ContactPerson);
2471 IMPL_XMLOBJECTBUILDER(EmailAddress);
2472 IMPL_XMLOBJECTBUILDER(EndpointType);
2473 IMPL_XMLOBJECTBUILDER(EntitiesDescriptor);
2474 IMPL_XMLOBJECTBUILDER(EntityDescriptor);
2475 IMPL_XMLOBJECTBUILDER(Extensions);
2476 IMPL_XMLOBJECTBUILDER(GivenName);
2477 IMPL_XMLOBJECTBUILDER(IDPSSODescriptor);
2478 IMPL_XMLOBJECTBUILDER(IndexedEndpointType);
2479 IMPL_XMLOBJECTBUILDER(KeyDescriptor);
2480 IMPL_XMLOBJECTBUILDER(localizedNameType);
2481 IMPL_XMLOBJECTBUILDER(localizedURIType);
2482 IMPL_XMLOBJECTBUILDER(ManageNameIDService);
2483 IMPL_XMLOBJECTBUILDER(NameIDFormat);
2484 IMPL_XMLOBJECTBUILDER(NameIDMappingService);
2485 IMPL_XMLOBJECTBUILDER(Organization);
2486 IMPL_XMLOBJECTBUILDER(OrganizationName);
2487 IMPL_XMLOBJECTBUILDER(OrganizationDisplayName);
2488 IMPL_XMLOBJECTBUILDER(OrganizationURL);
2489 IMPL_XMLOBJECTBUILDER(PDPDescriptor);
2490 IMPL_XMLOBJECTBUILDER(RequestedAttribute);
2491 IMPL_XMLOBJECTBUILDER(ServiceDescription);
2492 IMPL_XMLOBJECTBUILDER(ServiceName);
2493 IMPL_XMLOBJECTBUILDER(SingleLogoutService);
2494 IMPL_XMLOBJECTBUILDER(SingleSignOnService);
2495 IMPL_XMLOBJECTBUILDER(SPSSODescriptor);
2496 IMPL_XMLOBJECTBUILDER(SurName);
2497 IMPL_XMLOBJECTBUILDER(TelephoneNumber);
2499 IMPL_XMLOBJECTBUILDER(ActionNamespace);
2500 IMPL_XMLOBJECTBUILDER(SourceID);
2502 #ifdef HAVE_COVARIANT_RETURNS
2503 RoleDescriptor* RoleDescriptorBuilder::buildObject(
2505 xmltooling::XMLObject* RoleDescriptorBuilder::buildObject(
2507 const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType
2510 return new RoleDescriptorTypeImpl(nsURI,localName,prefix,schemaType);
2513 const XMLCh ActionNamespace::LOCAL_NAME[] = UNICODE_LITERAL_15(A,c,t,i,o,n,N,a,m,e,s,p,a,c,e);
2514 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);
2515 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);
2516 const XMLCh AdditionalMetadataLocation::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(n,a,m,e,s,p,a,c,e);
2517 const XMLCh AffiliateMember::LOCAL_NAME[] = UNICODE_LITERAL_15(A,f,f,i,l,i,a,t,e,M,e,m,b,e,r);
2518 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);
2519 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);
2520 const XMLCh AffiliationDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2521 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);
2522 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);
2523 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);
2524 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);
2525 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);
2526 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);
2527 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);
2528 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);
2529 const XMLCh AttributeConsumingService::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
2530 const XMLCh AttributeConsumingService::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
2531 const XMLCh AttributeProfile::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,P,r,o,f,i,l,e);
2532 const XMLCh AttributeQueryDescriptorType::LOCAL_NAME[] =UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2533 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);
2534 const XMLCh AttributeService::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,S,e,r,v,i,c,e);
2535 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);
2536 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);
2537 const XMLCh AuthnQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2538 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);
2539 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);
2540 const XMLCh AuthzDecisionQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2541 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);
2542 const XMLCh AuthzService::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,z,S,e,r,v,i,c,e);
2543 const XMLCh CacheableSAMLObject::CACHEDURATION_ATTRIB_NAME[] = UNICODE_LITERAL_13(c,a,c,h,e,D,u,r,a,t,i,o,n);
2544 const XMLCh Company::LOCAL_NAME[] = UNICODE_LITERAL_7(C,o,m,p,a,n,y);
2545 const XMLCh ContactPerson::LOCAL_NAME[] = UNICODE_LITERAL_13(C,o,n,t,a,c,t,P,e,r,s,o,n);
2546 const XMLCh ContactPerson::TYPE_NAME[] = UNICODE_LITERAL_11(C,o,n,t,a,c,t,T,y,p,e);
2547 const XMLCh ContactPerson::CONTACTTYPE_ATTRIB_NAME[] = UNICODE_LITERAL_11(c,o,n,t,a,c,t,T,y,p,e);
2548 const XMLCh ContactPerson::CONTACT_TECHNICAL[] = UNICODE_LITERAL_9(t,e,c,h,n,i,c,a,l);
2549 const XMLCh ContactPerson::CONTACT_SUPPORT[] = UNICODE_LITERAL_7(s,u,p,p,o,r,t);
2550 const XMLCh ContactPerson::CONTACT_ADMINISTRATIVE[] = UNICODE_LITERAL_14(a,d,m,i,n,i,s,t,r,a,t,i,v,e);
2551 const XMLCh ContactPerson::CONTACT_BILLING[] = UNICODE_LITERAL_7(b,i,l,l,i,n,g);
2552 const XMLCh ContactPerson::CONTACT_OTHER[] = UNICODE_LITERAL_5(o,t,h,e,r);
2553 const XMLCh EmailAddress::LOCAL_NAME[] = UNICODE_LITERAL_12(E,m,a,i,l,A,d,d,r,e,s,s);
2554 const XMLCh EndpointType::LOCAL_NAME[] = {chNull};
2555 const XMLCh EndpointType::TYPE_NAME[] = UNICODE_LITERAL_12(E,n,d,p,o,i,n,t,T,y,p,e);
2556 const XMLCh EndpointType::BINDING_ATTRIB_NAME[] = UNICODE_LITERAL_7(B,i,n,d,i,n,g);
2557 const XMLCh EndpointType::LOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_8(L,o,c,a,t,i,o,n);
2558 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);
2559 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);
2560 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);
2561 const XMLCh EntitiesDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2562 const XMLCh EntitiesDescriptor::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e);
2563 const XMLCh EntityDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,D,e,s,c,r,i,p,t,o,r);
2564 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);
2565 const XMLCh EntityDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2566 const XMLCh EntityDescriptor::ENTITYID_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,n,t,i,t,y,I,D);
2567 const XMLCh Extensions::LOCAL_NAME[] = UNICODE_LITERAL_10(E,x,t,e,n,s,i,o,n,s);
2568 const XMLCh Extensions::TYPE_NAME[] = UNICODE_LITERAL_14(E,x,t,e,n,s,i,o,n,s,T,y,p,e);
2569 const XMLCh GivenName::LOCAL_NAME[] = UNICODE_LITERAL_9(G,i,v,e,n,N,a,m,e);
2570 const XMLCh IDPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(I,D,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
2571 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);
2572 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);
2573 const XMLCh IndexedEndpointType::LOCAL_NAME[] = {chNull};
2574 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);
2575 const XMLCh IndexedEndpointType::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
2576 const XMLCh IndexedEndpointType::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
2577 const XMLCh KeyDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(K,e,y,D,e,s,c,r,i,p,t,o,r);
2578 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);
2579 const XMLCh KeyDescriptor::USE_ATTRIB_NAME[] = UNICODE_LITERAL_3(u,s,e);
2580 const XMLCh KeyDescriptor::KEYTYPE_ENCRYPTION[] = UNICODE_LITERAL_10(e,n,c,r,y,p,t,i,o,n);
2581 const XMLCh KeyDescriptor::KEYTYPE_SIGNING[] = UNICODE_LITERAL_7(s,i,g,n,i,n,g);
2582 const XMLCh localizedNameType::LOCAL_NAME[] = {chNull};
2583 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);
2584 const XMLCh localizedNameType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2585 const XMLCh localizedURIType::LOCAL_NAME[] = {chNull};
2586 const XMLCh localizedURIType::TYPE_NAME[] = UNICODE_LITERAL_16(l,o,c,a,l,i,z,e,d,U,R,I,T,y,p,e);
2587 const XMLCh localizedURIType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2588 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);
2589 const XMLCh NameIDFormat::LOCAL_NAME[] = UNICODE_LITERAL_12(N,a,m,e,I,D,F,o,r,m,a,t);
2590 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);
2591 const XMLCh Organization::LOCAL_NAME[] = UNICODE_LITERAL_12(O,r,g,a,n,i,z,a,t,i,o,n);
2592 const XMLCh Organization::TYPE_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,T,y,p,e);
2593 const XMLCh OrganizationName::LOCAL_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,N,a,m,e);
2594 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);
2595 const XMLCh OrganizationURL::LOCAL_NAME[] = UNICODE_LITERAL_15(O,r,g,a,n,i,z,a,t,i,o,n,U,R,L);
2596 const XMLCh PDPDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(P,D,P,D,e,s,c,r,i,p,t,o,r);
2597 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);
2598 const XMLCh QueryDescriptorType::LOCAL_NAME[] = {chNull};
2599 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);
2600 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);
2601 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);
2602 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);
2603 const XMLCh RequestedAttribute::ISREQUIRED_ATTRIB_NAME[] = UNICODE_LITERAL_10(i,s,R,e,q,u,i,r,e,d);
2604 const XMLCh RoleDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2605 const XMLCh RoleDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2606 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);
2607 const XMLCh RoleDescriptor::ERRORURL_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,r,r,o,r,U,R,L);
2608 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);
2609 const XMLCh ServiceName::LOCAL_NAME[] = UNICODE_LITERAL_11(S,e,r,v,i,c,e,N,a,m,e);
2610 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);
2611 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);
2612 const XMLCh SourceID::LOCAL_NAME[] = UNICODE_LITERAL_8(S,o,u,r,c,e,I,D);
2613 const XMLCh SPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_15(S,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
2614 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);
2615 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);
2616 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);
2617 const XMLCh SSODescriptorType::LOCAL_NAME[] = {chNull};
2618 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);
2619 const XMLCh SurName::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,r,N,a,m,e);
2620 const XMLCh TelephoneNumber::LOCAL_NAME[] = UNICODE_LITERAL_15(T,e,l,e,p,h,o,n,e,N,u,m,b,e,r);
2621 const XMLCh TimeBoundSAMLObject::VALIDUNTIL_ATTRIB_NAME[] = UNICODE_LITERAL_10(v,a,l,i,d,U,n,t,i,l);