2 * Copyright 2001-2006 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/AbstractChildlessElement.h>
28 #include <xmltooling/AbstractComplexElement.h>
29 #include <xmltooling/AbstractElementProxy.h>
30 #include <xmltooling/AbstractSimpleElement.h>
31 #include <xmltooling/impl/AnyElement.h>
32 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
33 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
34 #include <xmltooling/util/XMLHelper.h>
37 #include <xercesc/util/XMLUniDefs.hpp>
39 using namespace opensaml::saml2md;
40 using namespace opensaml::saml2;
41 using namespace opensaml;
42 using namespace xmlencryption;
43 using namespace xmlsignature;
44 using namespace xmltooling;
47 #if defined (_MSC_VER)
48 #pragma warning( push )
49 #pragma warning( disable : 4250 4251 )
55 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AffiliateMember);
56 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AttributeProfile);
57 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Company);
58 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,EmailAddress);
59 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,GivenName);
60 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,NameIDFormat);
61 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,SurName);
62 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,TelephoneNumber);
64 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,ActionNamespace);
65 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,SourceID);
67 class SAML_DLLLOCAL localizedNameTypeImpl : public virtual localizedNameType,
68 public AbstractSimpleElement,
69 public AbstractChildlessElement,
70 public AbstractDOMCachingXMLObject,
71 public AbstractXMLObjectMarshaller,
72 public AbstractXMLObjectUnmarshaller
79 localizedNameTypeImpl() {
84 virtual ~localizedNameTypeImpl() {
85 XMLString::release(&m_Lang);
88 localizedNameTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
89 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
93 localizedNameTypeImpl(const localizedNameTypeImpl& src)
94 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
96 setLang(src.getLang());
99 IMPL_XMLOBJECT_CLONE(localizedNameType);
100 IMPL_XMLOBJECT_CONTENT;
101 IMPL_STRING_ATTRIB(Lang);
104 void marshallAttributes(DOMElement* domElement) const {
105 MARSHALL_STRING_ATTRIB(Lang,LANG,XMLConstants::XML_NS);
108 void processAttribute(const DOMAttr* attribute) {
109 PROC_STRING_ATTRIB(Lang,LANG,XMLConstants::XML_NS);
110 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
114 class SAML_DLLLOCAL localizedURITypeImpl : public virtual localizedURIType,
115 public AbstractSimpleElement,
116 public AbstractChildlessElement,
117 public AbstractDOMCachingXMLObject,
118 public AbstractXMLObjectMarshaller,
119 public AbstractXMLObjectUnmarshaller
126 localizedURITypeImpl() {
131 virtual ~localizedURITypeImpl() {
132 XMLString::release(&m_Lang);
135 localizedURITypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
136 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
140 localizedURITypeImpl(const localizedURITypeImpl& src)
141 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
143 setLang(src.getLang());
146 IMPL_XMLOBJECT_CLONE(localizedURIType);
147 IMPL_XMLOBJECT_CONTENT;
148 IMPL_STRING_ATTRIB(Lang);
151 void marshallAttributes(DOMElement* domElement) const {
152 MARSHALL_STRING_ATTRIB(Lang,LANG,XMLConstants::XML_NS);
155 void processAttribute(const DOMAttr* attribute) {
156 PROC_STRING_ATTRIB(Lang,LANG,XMLConstants::XML_NS);
157 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
161 class SAML_DLLLOCAL OrganizationNameImpl : public virtual OrganizationName, public localizedNameTypeImpl
164 virtual ~OrganizationNameImpl() {}
166 OrganizationNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
167 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
169 OrganizationNameImpl(const OrganizationNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
171 IMPL_XMLOBJECT_CLONE(OrganizationName);
172 localizedNameType* clonelocalizedNameType() const {
173 return new OrganizationNameImpl(*this);
177 class SAML_DLLLOCAL OrganizationDisplayNameImpl : public virtual OrganizationDisplayName, public localizedNameTypeImpl
180 virtual ~OrganizationDisplayNameImpl() {}
182 OrganizationDisplayNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
183 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
185 OrganizationDisplayNameImpl(const OrganizationDisplayNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
187 IMPL_XMLOBJECT_CLONE(OrganizationDisplayName);
188 localizedNameType* clonelocalizedNameType() const {
189 return new OrganizationDisplayNameImpl(*this);
193 class SAML_DLLLOCAL OrganizationURLImpl : public virtual OrganizationURL, public localizedURITypeImpl
196 virtual ~OrganizationURLImpl() {}
198 OrganizationURLImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
199 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
201 OrganizationURLImpl(const OrganizationURLImpl& src) : AbstractXMLObject(src), localizedURITypeImpl(src) {}
203 IMPL_XMLOBJECT_CLONE(OrganizationURL);
204 localizedURIType* clonelocalizedURIType() const {
205 return new OrganizationURLImpl(*this);
209 class SAML_DLLLOCAL ServiceNameImpl : public virtual ServiceName, public localizedNameTypeImpl
212 virtual ~ServiceNameImpl() {}
214 ServiceNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
215 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
217 ServiceNameImpl(const ServiceNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
219 IMPL_XMLOBJECT_CLONE(ServiceName);
220 localizedNameType* clonelocalizedNameType() const {
221 return new ServiceNameImpl(*this);
225 class SAML_DLLLOCAL ServiceDescriptionImpl : public virtual ServiceDescription, public localizedNameTypeImpl
228 virtual ~ServiceDescriptionImpl() {}
230 ServiceDescriptionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
231 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
233 ServiceDescriptionImpl(const ServiceDescriptionImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
235 IMPL_XMLOBJECT_CLONE(ServiceDescription);
236 localizedNameType* clonelocalizedNameType() const {
237 return new ServiceDescriptionImpl(*this);
241 class SAML_DLLLOCAL ExtensionsImpl : public virtual Extensions,
242 public AbstractElementProxy,
243 public AbstractDOMCachingXMLObject,
244 public AbstractXMLObjectMarshaller,
245 public AbstractXMLObjectUnmarshaller
248 virtual ~ExtensionsImpl() {}
250 ExtensionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
251 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
254 ExtensionsImpl(const ExtensionsImpl& src)
255 : AbstractXMLObject(src), AbstractElementProxy(src), AbstractDOMCachingXMLObject(src) {
256 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
258 getXMLObjects().push_back((*i)->clone());
263 IMPL_XMLOBJECT_CLONE(Extensions);
266 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
268 const XMLCh* nsURI=root->getNamespaceURI();
269 if (!XMLString::equals(nsURI,SAMLConstants::SAML20MD_NS) && nsURI && *nsURI) {
270 getXMLObjects().push_back(childXMLObject);
274 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
278 class SAML_DLLLOCAL OrganizationImpl : public virtual Organization,
279 public AbstractComplexElement,
280 public AbstractAttributeExtensibleXMLObject,
281 public AbstractDOMCachingXMLObject,
282 public AbstractXMLObjectMarshaller,
283 public AbstractXMLObjectUnmarshaller
285 list<XMLObject*>::iterator m_pos_OrganizationDisplayName;
286 list<XMLObject*>::iterator m_pos_OrganizationURL;
289 m_children.push_back(NULL);
290 m_children.push_back(NULL);
291 m_children.push_back(NULL);
293 m_pos_Extensions=m_children.begin();
294 m_pos_OrganizationDisplayName=m_pos_Extensions;
295 ++m_pos_OrganizationDisplayName;
296 m_pos_OrganizationURL=m_pos_OrganizationDisplayName;
297 ++m_pos_OrganizationURL;
300 virtual ~OrganizationImpl() {}
302 OrganizationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
303 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
307 OrganizationImpl(const OrganizationImpl& src)
308 : AbstractXMLObject(src), AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
310 if (src.getExtensions())
311 setExtensions(src.getExtensions()->cloneExtensions());
312 VectorOf(OrganizationName) v=getOrganizationNames();
313 for (vector<OrganizationName*>::const_iterator i=src.m_OrganizationNames.begin(); i!=src.m_OrganizationNames.end(); i++) {
315 v.push_back((*i)->cloneOrganizationName());
318 VectorOf(OrganizationDisplayName) w=getOrganizationDisplayNames();
319 for (vector<OrganizationDisplayName*>::const_iterator j=src.m_OrganizationDisplayNames.begin(); j!=src.m_OrganizationDisplayNames.end(); j++) {
321 w.push_back((*j)->cloneOrganizationDisplayName());
324 VectorOf(OrganizationURL) x=getOrganizationURLs();
325 for (vector<OrganizationURL*>::const_iterator k=src.m_OrganizationURLs.begin(); k!=src.m_OrganizationURLs.end(); k++) {
327 x.push_back((*k)->cloneOrganizationURL());
332 IMPL_XMLOBJECT_CLONE(Organization);
333 IMPL_TYPED_CHILD(Extensions);
334 IMPL_TYPED_CHILDREN(OrganizationName,m_pos_OrganizationDisplayName);
335 IMPL_TYPED_CHILDREN(OrganizationDisplayName,m_pos_OrganizationURL);
336 IMPL_TYPED_CHILDREN(OrganizationURL,m_children.end());
339 void marshallAttributes(DOMElement* domElement) const {
340 marshallExtensionAttributes(domElement);
343 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
344 PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20MD_NS,false);
345 PROC_TYPED_CHILDREN(OrganizationName,SAMLConstants::SAML20MD_NS,false);
346 PROC_TYPED_CHILDREN(OrganizationDisplayName,SAMLConstants::SAML20MD_NS,false);
347 PROC_TYPED_CHILDREN(OrganizationURL,SAMLConstants::SAML20MD_NS,false);
348 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
351 void processAttribute(const DOMAttr* attribute) {
352 unmarshallExtensionAttribute(attribute);
356 class SAML_DLLLOCAL ContactPersonImpl : public virtual ContactPerson,
357 public AbstractComplexElement,
358 public AbstractAttributeExtensibleXMLObject,
359 public AbstractDOMCachingXMLObject,
360 public AbstractXMLObjectMarshaller,
361 public AbstractXMLObjectUnmarshaller
363 list<XMLObject*>::iterator m_pos_TelephoneNumber;
367 m_children.push_back(NULL);
368 m_children.push_back(NULL);
369 m_children.push_back(NULL);
370 m_children.push_back(NULL);
371 m_children.push_back(NULL);
376 m_pos_Extensions=m_children.begin();
377 m_pos_Company=m_pos_Extensions;
379 m_pos_GivenName=m_pos_Company;
381 m_pos_SurName=m_pos_GivenName;
383 m_pos_TelephoneNumber=m_pos_SurName;
384 ++m_pos_TelephoneNumber;
387 virtual ~ContactPersonImpl() {}
389 ContactPersonImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
390 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
394 ContactPersonImpl(const ContactPersonImpl& src)
395 : AbstractXMLObject(src), AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
397 if (src.getExtensions())
398 setExtensions(src.getExtensions()->cloneExtensions());
399 if (src.getCompany())
400 setCompany(src.getCompany()->cloneCompany());
401 if (src.getGivenName())
402 setGivenName(src.getGivenName()->cloneGivenName());
403 if (src.getSurName())
404 setSurName(src.getSurName()->cloneSurName());
406 VectorOf(EmailAddress) v=getEmailAddresss();
407 for (vector<EmailAddress*>::const_iterator i=src.m_EmailAddresss.begin(); i!=src.m_EmailAddresss.end(); i++) {
409 v.push_back((*i)->cloneEmailAddress());
412 VectorOf(TelephoneNumber) w=getTelephoneNumbers();
413 for (vector<TelephoneNumber*>::const_iterator j=src.m_TelephoneNumbers.begin(); j!=src.m_TelephoneNumbers.end(); j++) {
415 w.push_back((*j)->cloneTelephoneNumber());
420 IMPL_XMLOBJECT_CLONE(ContactPerson);
421 IMPL_STRING_ATTRIB(ContactType);
422 IMPL_TYPED_CHILD(Extensions);
423 IMPL_TYPED_CHILD(Company);
424 IMPL_TYPED_CHILD(GivenName);
425 IMPL_TYPED_CHILD(SurName);
426 IMPL_TYPED_CHILDREN(EmailAddress,m_pos_TelephoneNumber);
427 IMPL_TYPED_CHILDREN(TelephoneNumber,m_children.end());
429 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
430 if (!qualifiedName.hasNamespaceURI()) {
431 if (XMLString::equals(qualifiedName.getLocalPart(),CONTACTTYPE_ATTRIB_NAME)) {
432 setContactType(value);
436 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
440 void marshallAttributes(DOMElement* domElement) const {
441 MARSHALL_STRING_ATTRIB(ContactType,CONTACTTYPE,NULL);
442 marshallExtensionAttributes(domElement);
445 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
446 PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20MD_NS,false);
447 PROC_TYPED_CHILD(Company,SAMLConstants::SAML20MD_NS,false);
448 PROC_TYPED_CHILD(GivenName,SAMLConstants::SAML20MD_NS,false);
449 PROC_TYPED_CHILD(SurName,SAMLConstants::SAML20MD_NS,false);
450 PROC_TYPED_CHILDREN(EmailAddress,SAMLConstants::SAML20MD_NS,false);
451 PROC_TYPED_CHILDREN(TelephoneNumber,SAMLConstants::SAML20MD_NS,false);
452 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
455 void processAttribute(const DOMAttr* attribute) {
456 unmarshallExtensionAttribute(attribute);
460 class SAML_DLLLOCAL AdditionalMetadataLocationImpl : public virtual AdditionalMetadataLocation,
461 public AbstractSimpleElement,
462 public AbstractChildlessElement,
463 public AbstractDOMCachingXMLObject,
464 public AbstractXMLObjectMarshaller,
465 public AbstractXMLObjectUnmarshaller
472 virtual ~AdditionalMetadataLocationImpl() {
473 XMLString::release(&m_Namespace);
476 AdditionalMetadataLocationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
477 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
481 AdditionalMetadataLocationImpl(const AdditionalMetadataLocationImpl& src)
482 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
486 IMPL_XMLOBJECT_CLONE(AdditionalMetadataLocation);
487 IMPL_XMLOBJECT_CONTENT;
488 IMPL_STRING_ATTRIB(Namespace);
491 void marshallAttributes(DOMElement* domElement) const {
492 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
495 void processAttribute(const DOMAttr* attribute) {
496 PROC_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
497 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
501 class SAML_DLLLOCAL KeyDescriptorImpl : public virtual KeyDescriptor,
502 public AbstractComplexElement,
503 public AbstractDOMCachingXMLObject,
504 public AbstractXMLObjectMarshaller,
505 public AbstractXMLObjectUnmarshaller
510 m_children.push_back(NULL);
511 m_pos_KeyInfo=m_children.begin();
514 virtual ~KeyDescriptorImpl() {
515 XMLString::release(&m_Use);
518 KeyDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
519 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
523 KeyDescriptorImpl(const KeyDescriptorImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
525 setUse(src.getUse());
526 if (src.getKeyInfo())
527 setKeyInfo(src.getKeyInfo()->cloneKeyInfo());
528 VectorOf(EncryptionMethod) v=getEncryptionMethods();
529 for (vector<EncryptionMethod*>::const_iterator i=src.m_EncryptionMethods.begin(); i!=src.m_EncryptionMethods.end(); i++) {
531 v.push_back((*i)->cloneEncryptionMethod());
536 IMPL_XMLOBJECT_CLONE(KeyDescriptor);
537 IMPL_STRING_ATTRIB(Use);
538 IMPL_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature);
539 IMPL_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,m_children.end());
542 void marshallAttributes(DOMElement* domElement) const {
543 MARSHALL_STRING_ATTRIB(Use,USE,NULL);
546 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
547 PROC_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature,XMLConstants::XMLSIG_NS,false);
548 PROC_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,SAMLConstants::SAML20MD_NS,false);
549 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
552 void processAttribute(const DOMAttr* attribute) {
553 PROC_STRING_ATTRIB(Use,USE,NULL);
554 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
558 class SAML_DLLLOCAL EndpointTypeImpl : public virtual EndpointType,
559 public AbstractElementProxy,
560 public AbstractAttributeExtensibleXMLObject,
561 public AbstractDOMCachingXMLObject,
562 public AbstractXMLObjectMarshaller,
563 public AbstractXMLObjectUnmarshaller
566 m_Binding=m_Location=m_ResponseLocation=NULL;
575 virtual ~EndpointTypeImpl() {
576 XMLString::release(&m_Binding);
577 XMLString::release(&m_Location);
578 XMLString::release(&m_ResponseLocation);
581 EndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
582 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
585 EndpointTypeImpl(const EndpointTypeImpl& src)
586 : AbstractXMLObject(src), AbstractElementProxy(src),
587 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
588 setBinding(src.getBinding());
589 setLocation(src.getLocation());
590 setResponseLocation(src.getResponseLocation());
591 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
593 getXMLObjects().push_back((*i)->clone());
598 IMPL_XMLOBJECT_CLONE(EndpointType);
599 IMPL_STRING_ATTRIB(Binding);
600 IMPL_STRING_ATTRIB(Location);
601 IMPL_STRING_ATTRIB(ResponseLocation);
603 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
604 if (!qualifiedName.hasNamespaceURI()) {
605 if (XMLString::equals(qualifiedName.getLocalPart(),BINDING_ATTRIB_NAME)) {
609 else if (XMLString::equals(qualifiedName.getLocalPart(),LOCATION_ATTRIB_NAME)) {
613 else if (XMLString::equals(qualifiedName.getLocalPart(),RESPONSELOCATION_ATTRIB_NAME)) {
614 setResponseLocation(value);
618 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
621 void marshallAttributes(DOMElement* domElement) const {
622 MARSHALL_STRING_ATTRIB(Binding,BINDING,NULL);
623 MARSHALL_STRING_ATTRIB(Location,LOCATION,NULL);
624 MARSHALL_STRING_ATTRIB(ResponseLocation,RESPONSELOCATION,NULL);
625 marshallExtensionAttributes(domElement);
628 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
630 const XMLCh* nsURI=root->getNamespaceURI();
631 if (!XMLString::equals(nsURI,SAMLConstants::SAML20MD_NS) && nsURI && *nsURI) {
632 getXMLObjects().push_back(childXMLObject);
635 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
638 void processAttribute(const DOMAttr* attribute) {
639 unmarshallExtensionAttribute(attribute);
643 class SAML_DLLLOCAL IndexedEndpointTypeImpl : public virtual IndexedEndpointType, public EndpointTypeImpl
647 m_isDefault=XMLConstants::XML_BOOL_NULL;
651 IndexedEndpointTypeImpl() {
655 virtual ~IndexedEndpointTypeImpl() {
656 XMLString::release(&m_Index);
659 IndexedEndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
660 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
662 IndexedEndpointTypeImpl(const IndexedEndpointTypeImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {
663 setIndex(src.m_Index);
664 isDefault(src.m_isDefault);
667 IMPL_XMLOBJECT_CLONE(IndexedEndpointType);
668 EndpointType* cloneEndpointType() const {
669 return new IndexedEndpointTypeImpl(*this);
672 IMPL_INTEGER_ATTRIB(Index);
673 IMPL_BOOLEAN_ATTRIB(isDefault);
675 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
676 if (!qualifiedName.hasNamespaceURI()) {
677 if (XMLString::equals(qualifiedName.getLocalPart(),INDEX_ATTRIB_NAME)) {
681 else if (XMLString::equals(qualifiedName.getLocalPart(),ISDEFAULT_ATTRIB_NAME)) {
686 EndpointTypeImpl::setAttribute(qualifiedName, value, ID);
690 void marshallAttributes(DOMElement* domElement) const {
691 MARSHALL_INTEGER_ATTRIB(Index,INDEX,NULL);
692 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
693 EndpointTypeImpl::marshallAttributes(domElement);
697 class SAML_DLLLOCAL ArtifactResolutionServiceImpl : public virtual ArtifactResolutionService, public IndexedEndpointTypeImpl
700 virtual ~ArtifactResolutionServiceImpl() {}
702 ArtifactResolutionServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
703 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
705 ArtifactResolutionServiceImpl(const ArtifactResolutionServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
707 IMPL_XMLOBJECT_CLONE(ArtifactResolutionService);
708 IndexedEndpointType* cloneIndexedEndpointType() const {
709 return new ArtifactResolutionServiceImpl(*this);
711 EndpointType* cloneEndpointType() const {
712 return new ArtifactResolutionServiceImpl(*this);
716 class SAML_DLLLOCAL SingleLogoutServiceImpl : public virtual SingleLogoutService, public EndpointTypeImpl
719 virtual ~SingleLogoutServiceImpl() {}
721 SingleLogoutServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
722 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
724 SingleLogoutServiceImpl(const SingleLogoutServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
726 IMPL_XMLOBJECT_CLONE(SingleLogoutService);
727 EndpointType* cloneEndpointType() const {
728 return new SingleLogoutServiceImpl(*this);
732 class SAML_DLLLOCAL ManageNameIDServiceImpl : public virtual ManageNameIDService, public EndpointTypeImpl
735 virtual ~ManageNameIDServiceImpl() {}
737 ManageNameIDServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
738 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
740 ManageNameIDServiceImpl(const ManageNameIDServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
742 IMPL_XMLOBJECT_CLONE(ManageNameIDService);
743 EndpointType* cloneEndpointType() const {
744 return new ManageNameIDServiceImpl(*this);
748 class SAML_DLLLOCAL SingleSignOnServiceImpl : public virtual SingleSignOnService, public EndpointTypeImpl
751 virtual ~SingleSignOnServiceImpl() {}
753 SingleSignOnServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
754 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
756 SingleSignOnServiceImpl(const SingleSignOnServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
758 IMPL_XMLOBJECT_CLONE(SingleSignOnService);
759 EndpointType* cloneEndpointType() const {
760 return new SingleSignOnServiceImpl(*this);
764 class SAML_DLLLOCAL NameIDMappingServiceImpl : public virtual NameIDMappingService, public EndpointTypeImpl
767 virtual ~NameIDMappingServiceImpl() {}
769 NameIDMappingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
770 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
772 NameIDMappingServiceImpl(const NameIDMappingServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
774 IMPL_XMLOBJECT_CLONE(NameIDMappingService);
775 EndpointType* cloneEndpointType() const {
776 return new NameIDMappingServiceImpl(*this);
780 class SAML_DLLLOCAL AssertionIDRequestServiceImpl : public virtual AssertionIDRequestService, public EndpointTypeImpl
783 virtual ~AssertionIDRequestServiceImpl() {}
785 AssertionIDRequestServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
786 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
788 AssertionIDRequestServiceImpl(const AssertionIDRequestServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
790 IMPL_XMLOBJECT_CLONE(AssertionIDRequestService);
791 EndpointType* cloneEndpointType() const {
792 return new AssertionIDRequestServiceImpl(*this);
796 class SAML_DLLLOCAL AssertionConsumerServiceImpl : public virtual AssertionConsumerService, public IndexedEndpointTypeImpl
799 virtual ~AssertionConsumerServiceImpl() {}
801 AssertionConsumerServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
802 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
804 AssertionConsumerServiceImpl(const AssertionConsumerServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
806 IMPL_XMLOBJECT_CLONE(AssertionConsumerService);
807 EndpointType* cloneEndpointType() const {
808 return new AssertionConsumerServiceImpl(*this);
810 IndexedEndpointType* cloneIndexedEndpointType() const {
811 return new AssertionConsumerServiceImpl(*this);
815 class SAML_DLLLOCAL AuthnQueryServiceImpl : public virtual AuthnQueryService, public EndpointTypeImpl
818 virtual ~AuthnQueryServiceImpl() {}
820 AuthnQueryServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
821 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
823 AuthnQueryServiceImpl(const AuthnQueryServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
825 IMPL_XMLOBJECT_CLONE(AuthnQueryService);
826 EndpointType* cloneEndpointType() const {
827 return new AuthnQueryServiceImpl(*this);
831 class SAML_DLLLOCAL AuthzServiceImpl : public virtual AuthzService, public EndpointTypeImpl
834 virtual ~AuthzServiceImpl() {}
836 AuthzServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
837 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
839 AuthzServiceImpl(const AuthzServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
841 IMPL_XMLOBJECT_CLONE(AuthzService);
842 EndpointType* cloneEndpointType() const {
843 return new AuthzServiceImpl(*this);
847 class SAML_DLLLOCAL AttributeServiceImpl : public virtual AttributeService, public EndpointTypeImpl
850 virtual ~AttributeServiceImpl() {}
852 AttributeServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
853 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
855 AttributeServiceImpl(const AttributeServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
857 IMPL_XMLOBJECT_CLONE(AttributeService);
858 EndpointType* cloneEndpointType() const {
859 return new AttributeServiceImpl(*this);
863 class SAML_DLLLOCAL RoleDescriptorImpl : public virtual RoleDescriptor,
864 public virtual SignableObject,
865 public AbstractComplexElement,
866 public AbstractAttributeExtensibleXMLObject,
867 public AbstractDOMCachingXMLObject,
868 public AbstractXMLObjectMarshaller,
869 public AbstractXMLObjectUnmarshaller
872 m_ID=m_ProtocolSupportEnumeration=m_ErrorURL=NULL;
873 m_ValidUntil=m_CacheDuration=NULL;
874 m_children.push_back(NULL);
875 m_children.push_back(NULL);
876 m_children.push_back(NULL);
877 m_children.push_back(NULL);
881 m_pos_Signature=m_children.begin();
882 m_pos_Extensions=m_pos_Signature;
884 m_pos_Organization=m_pos_Extensions;
885 ++m_pos_Organization;
886 m_pos_ContactPerson=m_pos_Organization;
887 ++m_pos_ContactPerson;
891 list<XMLObject*>::iterator m_pos_ContactPerson;
893 RoleDescriptorImpl() {
898 virtual ~RoleDescriptorImpl() {
899 XMLString::release(&m_ID);
900 XMLString::release(&m_ProtocolSupportEnumeration);
901 XMLString::release(&m_ErrorURL);
903 delete m_CacheDuration;
906 RoleDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
907 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
911 RoleDescriptorImpl(const RoleDescriptorImpl& src)
912 : AbstractXMLObject(src), AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
915 setProtocolSupportEnumeration(src.getProtocolSupportEnumeration());
916 setErrorURL(src.getErrorURL());
917 setValidUntil(src.getValidUntil());
918 setCacheDuration(src.getCacheDuration());
919 if (src.getSignature())
920 setSignature(src.getSignature()->cloneSignature());
921 if (src.getExtensions())
922 setExtensions(src.getExtensions()->cloneExtensions());
923 if (src.getOrganization())
924 setOrganization(src.getOrganization()->cloneOrganization());
926 VectorOf(KeyDescriptor) v=getKeyDescriptors();
927 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
929 v.push_back((*i)->cloneKeyDescriptor());
932 VectorOf(ContactPerson) w=getContactPersons();
933 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
935 w.push_back((*j)->cloneContactPerson());
940 //IMPL_TYPED_CHILD(Signature);
941 // Need customized setter.
943 Signature* m_Signature;
944 list<XMLObject*>::iterator m_pos_Signature;
946 Signature* getSignature() const {
950 void setSignature(Signature* sig) {
951 prepareForAssignment(m_Signature,sig);
952 *m_pos_Signature=m_Signature=sig;
953 // Sync content reference back up.
955 m_Signature->setContentReference(new opensaml::ContentReference(*this));
959 IMPL_STRING_ATTRIB(ProtocolSupportEnumeration);
960 IMPL_STRING_ATTRIB(ErrorURL);
961 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
962 IMPL_DATETIME_ATTRIB(CacheDuration,0);
963 IMPL_TYPED_CHILD(Extensions);
964 IMPL_TYPED_CHILDREN(KeyDescriptor,m_pos_Organization);
965 IMPL_TYPED_CHILD(Organization);
966 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
968 bool hasSupport(const XMLCh* protocol) const {
969 if (m_ProtocolSupportEnumeration) {
970 // Look for first character.
971 unsigned int len=XMLString::stringLen(protocol);
973 int index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
975 // Only possible match is if it's the first character or a space comes before it.
976 if (index==0 || m_ProtocolSupportEnumeration[index-1]==chSpace) {
977 // See if rest of protocol string is present.
978 if (0==XMLString::compareNString(m_ProtocolSupportEnumeration+index+1,protocol+1,len-1)) {
979 // Only possible match is if it's the last character or a space comes after it.
980 if (m_ProtocolSupportEnumeration[index+len]==chNull || m_ProtocolSupportEnumeration[index+len]==chSpace)
986 // Move past last search and start again.
991 // Move past last search and start again.
994 index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
1000 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1001 if (!qualifiedName.hasNamespaceURI()) {
1002 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
1006 else if (XMLString::equals(qualifiedName.getLocalPart(),PROTOCOLSUPPORTENUMERATION_ATTRIB_NAME)) {
1007 setProtocolSupportEnumeration(value);
1010 else if (XMLString::equals(qualifiedName.getLocalPart(),ERRORURL_ATTRIB_NAME)) {
1014 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
1015 setValidUntil(value);
1018 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
1019 setCacheDuration(value);
1023 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1027 void marshallAttributes(DOMElement* domElement) const {
1028 MARSHALL_ID_ATTRIB(ID,ID,NULL);
1029 MARSHALL_STRING_ATTRIB(ProtocolSupportEnumeration,PROTOCOLSUPPORTENUMERATION,NULL);
1030 MARSHALL_STRING_ATTRIB(ErrorURL,ERRORURL,NULL);
1031 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
1032 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
1033 marshallExtensionAttributes(domElement);
1036 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1037 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLConstants::XMLSIG_NS,false);
1038 PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20MD_NS,false);
1039 PROC_TYPED_CHILDREN(KeyDescriptor,SAMLConstants::SAML20MD_NS,false);
1040 PROC_TYPED_CHILD(Organization,SAMLConstants::SAML20MD_NS,false);
1041 PROC_TYPED_CHILDREN(ContactPerson,SAMLConstants::SAML20MD_NS,false);
1042 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1045 void processAttribute(const DOMAttr* attribute) {
1046 PROC_ID_ATTRIB(ID,ID,NULL);
1047 unmarshallExtensionAttribute(attribute);
1051 class SAML_DLLLOCAL SSODescriptorTypeImpl : public virtual SSODescriptorType, public RoleDescriptorImpl
1054 m_children.push_back(NULL);
1055 m_children.push_back(NULL);
1056 m_children.push_back(NULL);
1057 m_children.push_back(NULL);
1058 m_pos_ArtifactResolutionService=m_pos_ContactPerson;
1059 ++m_pos_ArtifactResolutionService;
1060 m_pos_SingleLogoutService=m_pos_ArtifactResolutionService;
1061 ++m_pos_SingleLogoutService;
1062 m_pos_ManageNameIDService=m_pos_SingleLogoutService;
1063 ++m_pos_ManageNameIDService;
1064 m_pos_NameIDFormat=m_pos_ManageNameIDService;
1065 ++m_pos_NameIDFormat;
1069 list<XMLObject*>::iterator m_pos_ArtifactResolutionService;
1070 list<XMLObject*>::iterator m_pos_SingleLogoutService;
1071 list<XMLObject*>::iterator m_pos_ManageNameIDService;
1072 list<XMLObject*>::iterator m_pos_NameIDFormat;
1074 SSODescriptorTypeImpl() {
1079 virtual ~SSODescriptorTypeImpl() {}
1081 SSODescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1082 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1086 SSODescriptorTypeImpl(const SSODescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1088 VectorOf(ArtifactResolutionService) v=getArtifactResolutionServices();
1089 for (vector<ArtifactResolutionService*>::const_iterator i=src.m_ArtifactResolutionServices.begin(); i!=src.m_ArtifactResolutionServices.end(); i++) {
1091 v.push_back((*i)->cloneArtifactResolutionService());
1094 VectorOf(SingleLogoutService) w=getSingleLogoutServices();
1095 for (vector<SingleLogoutService*>::const_iterator j=src.m_SingleLogoutServices.begin(); j!=src.m_SingleLogoutServices.end(); j++) {
1097 w.push_back((*j)->cloneSingleLogoutService());
1100 VectorOf(ManageNameIDService) x=getManageNameIDServices();
1101 for (vector<ManageNameIDService*>::const_iterator k=src.m_ManageNameIDServices.begin(); k!=src.m_ManageNameIDServices.end(); k++) {
1103 x.push_back((*k)->cloneManageNameIDService());
1106 VectorOf(NameIDFormat) y=getNameIDFormats();
1107 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1109 y.push_back((*m)->cloneNameIDFormat());
1114 IMPL_TYPED_CHILDREN(ArtifactResolutionService,m_pos_ArtifactResolutionService);
1115 IMPL_TYPED_CHILDREN(SingleLogoutService,m_pos_SingleLogoutService);
1116 IMPL_TYPED_CHILDREN(ManageNameIDService,m_pos_ManageNameIDService);
1117 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1120 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1121 PROC_TYPED_CHILDREN(ArtifactResolutionService,SAMLConstants::SAML20MD_NS,false);
1122 PROC_TYPED_CHILDREN(SingleLogoutService,SAMLConstants::SAML20MD_NS,false);
1123 PROC_TYPED_CHILDREN(ManageNameIDService,SAMLConstants::SAML20MD_NS,false);
1124 PROC_TYPED_CHILDREN(NameIDFormat,SAMLConstants::SAML20MD_NS,false);
1125 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1129 class SAML_DLLLOCAL IDPSSODescriptorImpl : public virtual IDPSSODescriptor, public SSODescriptorTypeImpl
1131 list<XMLObject*>::iterator m_pos_SingleSignOnService;
1132 list<XMLObject*>::iterator m_pos_NameIDMappingService;
1133 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1134 list<XMLObject*>::iterator m_pos_AttributeProfile;
1137 m_WantAuthnRequestsSigned=XMLConstants::XML_BOOL_NULL;
1138 m_children.push_back(NULL);
1139 m_children.push_back(NULL);
1140 m_children.push_back(NULL);
1141 m_children.push_back(NULL);
1142 m_pos_SingleSignOnService=m_pos_NameIDFormat;
1143 ++m_pos_SingleSignOnService;
1144 m_pos_NameIDMappingService=m_pos_SingleSignOnService;
1145 ++m_pos_NameIDMappingService;
1146 m_pos_AssertionIDRequestService=m_pos_NameIDMappingService;
1147 ++m_pos_AssertionIDRequestService;
1148 m_pos_AttributeProfile=m_pos_AssertionIDRequestService;
1149 ++m_pos_AttributeProfile;
1153 virtual ~IDPSSODescriptorImpl() {}
1155 IDPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1156 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1160 IDPSSODescriptorImpl(const IDPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1162 WantAuthnRequestsSigned(src.m_WantAuthnRequestsSigned);
1163 VectorOf(SingleSignOnService) v=getSingleSignOnServices();
1164 for (vector<SingleSignOnService*>::const_iterator i=src.m_SingleSignOnServices.begin(); i!=src.m_SingleSignOnServices.end(); i++) {
1166 v.push_back((*i)->cloneSingleSignOnService());
1169 VectorOf(NameIDMappingService) w=getNameIDMappingServices();
1170 for (vector<NameIDMappingService*>::const_iterator j=src.m_NameIDMappingServices.begin(); j!=src.m_NameIDMappingServices.end(); j++) {
1172 w.push_back((*j)->cloneNameIDMappingService());
1175 VectorOf(AssertionIDRequestService) x=getAssertionIDRequestServices();
1176 for (vector<AssertionIDRequestService*>::const_iterator k=src.m_AssertionIDRequestServices.begin(); k!=src.m_AssertionIDRequestServices.end(); k++) {
1178 x.push_back((*k)->cloneAssertionIDRequestService());
1181 VectorOf(AttributeProfile) y=getAttributeProfiles();
1182 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1184 y.push_back((*m)->cloneAttributeProfile());
1187 VectorOf(Attribute) z=getAttributes();
1188 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1190 z.push_back((*n)->cloneAttribute());
1195 IMPL_XMLOBJECT_CLONE(IDPSSODescriptor);
1196 SSODescriptorType* cloneSSODescriptorType() const {
1197 return new IDPSSODescriptorImpl(*this);
1199 RoleDescriptor* cloneRoleDescriptor() const {
1200 return new IDPSSODescriptorImpl(*this);
1203 IMPL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned);
1204 IMPL_TYPED_CHILDREN(SingleSignOnService,m_pos_SingleSignOnService);
1205 IMPL_TYPED_CHILDREN(NameIDMappingService,m_pos_NameIDMappingService);
1206 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1207 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1208 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1210 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1211 if (!qualifiedName.hasNamespaceURI()) {
1212 if (XMLString::equals(qualifiedName.getLocalPart(),WANTAUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1213 setWantAuthnRequestsSigned(value);
1217 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1221 void marshallAttributes(DOMElement* domElement) const {
1222 MARSHALL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned,WANTAUTHNREQUESTSSIGNED,NULL);
1223 RoleDescriptorImpl::marshallAttributes(domElement);
1226 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1227 PROC_TYPED_CHILDREN(SingleSignOnService,SAMLConstants::SAML20MD_NS,false);
1228 PROC_TYPED_CHILDREN(NameIDMappingService,SAMLConstants::SAML20MD_NS,false);
1229 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAMLConstants::SAML20MD_NS,false);
1230 PROC_TYPED_CHILDREN(AttributeProfile,SAMLConstants::SAML20MD_NS,false);
1231 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAMLConstants::SAML20_NS,false);
1232 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1236 class SAML_DLLLOCAL RequestedAttributeImpl : public virtual RequestedAttribute,
1237 public AbstractComplexElement,
1238 public AbstractAttributeExtensibleXMLObject,
1239 public AbstractDOMCachingXMLObject,
1240 public AbstractXMLObjectMarshaller,
1241 public AbstractXMLObjectUnmarshaller
1244 m_Name=m_NameFormat=m_FriendlyName=NULL;
1245 m_isRequired=XMLConstants::XML_BOOL_NULL;
1248 virtual ~RequestedAttributeImpl() {
1249 XMLString::release(&m_Name);
1250 XMLString::release(&m_NameFormat);
1251 XMLString::release(&m_FriendlyName);
1254 RequestedAttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1255 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1259 RequestedAttributeImpl(const RequestedAttributeImpl& src)
1260 : AbstractXMLObject(src), AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1262 setName(src.getName());
1263 setNameFormat(src.getNameFormat());
1264 setFriendlyName(src.getFriendlyName());
1265 isRequired(src.m_isRequired);
1266 VectorOf(XMLObject) v=getAttributeValues();
1267 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
1269 v.push_back((*i)->clone());
1274 IMPL_XMLOBJECT_CLONE(RequestedAttribute);
1275 Attribute* cloneAttribute() const {
1276 return new RequestedAttributeImpl(*this);
1279 IMPL_STRING_ATTRIB(Name);
1280 IMPL_STRING_ATTRIB(NameFormat);
1281 IMPL_STRING_ATTRIB(FriendlyName);
1282 IMPL_BOOLEAN_ATTRIB(isRequired);
1283 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
1285 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1286 if (!qualifiedName.hasNamespaceURI()) {
1287 if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) {
1291 else if (XMLString::equals(qualifiedName.getLocalPart(),NAMEFORMAT_ATTRIB_NAME)) {
1292 setNameFormat(value);
1295 else if (XMLString::equals(qualifiedName.getLocalPart(),FRIENDLYNAME_ATTRIB_NAME)) {
1296 setFriendlyName(value);
1299 else if (XMLString::equals(qualifiedName.getLocalPart(),ISREQUIRED_ATTRIB_NAME)) {
1300 setisRequired(value);
1304 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1308 void marshallAttributes(DOMElement* domElement) const {
1309 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
1310 MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,NULL);
1311 MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,NULL);
1312 MARSHALL_BOOLEAN_ATTRIB(isRequired,ISREQUIRED,NULL);
1313 marshallExtensionAttributes(domElement);
1316 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1317 getAttributeValues().push_back(childXMLObject);
1320 void processAttribute(const DOMAttr* attribute) {
1321 unmarshallExtensionAttribute(attribute);
1325 class SAML_DLLLOCAL AttributeConsumingServiceImpl : public virtual AttributeConsumingService,
1326 public AbstractComplexElement,
1327 public AbstractDOMCachingXMLObject,
1328 public AbstractXMLObjectMarshaller,
1329 public AbstractXMLObjectUnmarshaller
1331 list<XMLObject*>::iterator m_pos_ServiceDescription;
1332 list<XMLObject*>::iterator m_pos_RequestedAttribute;
1336 m_isDefault=XMLConstants::XML_BOOL_NULL;
1337 m_children.push_back(NULL);
1338 m_children.push_back(NULL);
1339 m_pos_ServiceDescription=m_children.begin();
1340 m_pos_RequestedAttribute=m_pos_ServiceDescription;
1341 ++m_pos_RequestedAttribute;
1345 virtual ~AttributeConsumingServiceImpl() {
1346 XMLString::release(&m_Index);
1349 AttributeConsumingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1350 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1354 AttributeConsumingServiceImpl(const AttributeConsumingServiceImpl& src)
1355 : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
1357 setIndex(src.m_Index);
1358 isDefault(src.m_isDefault);
1359 VectorOf(ServiceName) v=getServiceNames();
1360 for (vector<ServiceName*>::const_iterator i=src.m_ServiceNames.begin(); i!=src.m_ServiceNames.end(); i++) {
1362 v.push_back((*i)->cloneServiceName());
1365 VectorOf(ServiceDescription) w=getServiceDescriptions();
1366 for (vector<ServiceDescription*>::const_iterator j=src.m_ServiceDescriptions.begin(); j!=src.m_ServiceDescriptions.end(); j++) {
1368 w.push_back((*j)->cloneServiceDescription());
1371 VectorOf(RequestedAttribute) x=getRequestedAttributes();
1372 for (vector<RequestedAttribute*>::const_iterator k=src.m_RequestedAttributes.begin(); k!=src.m_RequestedAttributes.end(); k++) {
1374 x.push_back((*k)->cloneRequestedAttribute());
1379 IMPL_XMLOBJECT_CLONE(AttributeConsumingService);
1380 IMPL_INTEGER_ATTRIB(Index);
1381 IMPL_BOOLEAN_ATTRIB(isDefault);
1382 IMPL_TYPED_CHILDREN(ServiceName,m_pos_ServiceDescription);
1383 IMPL_TYPED_CHILDREN(ServiceDescription,m_pos_RequestedAttribute);
1384 IMPL_TYPED_CHILDREN(RequestedAttribute,m_children.end());
1387 void marshallAttributes(DOMElement* domElement) const {
1388 MARSHALL_INTEGER_ATTRIB(Index,INDEX,NULL);
1389 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
1392 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1393 PROC_TYPED_CHILDREN(ServiceName,SAMLConstants::SAML20MD_NS,false);
1394 PROC_TYPED_CHILDREN(ServiceDescription,SAMLConstants::SAML20MD_NS,false);
1395 PROC_TYPED_CHILDREN(RequestedAttribute,SAMLConstants::SAML20MD_NS,false);
1396 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1399 void processAttribute(const DOMAttr* attribute) {
1400 PROC_INTEGER_ATTRIB(Index,INDEX,NULL);
1401 PROC_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
1402 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1406 class SAML_DLLLOCAL SPSSODescriptorImpl : public virtual SPSSODescriptor, public SSODescriptorTypeImpl
1408 list<XMLObject*>::iterator m_pos_AssertionConsumerService;
1411 m_AuthnRequestsSigned=XMLConstants::XML_BOOL_NULL;
1412 m_WantAssertionsSigned=XMLConstants::XML_BOOL_NULL;
1413 m_children.push_back(NULL);
1414 m_pos_AssertionConsumerService=m_pos_NameIDFormat;
1415 ++m_pos_AssertionConsumerService;
1419 virtual ~SPSSODescriptorImpl() {}
1421 SPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1422 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1426 SPSSODescriptorImpl(const SPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1428 AuthnRequestsSigned(src.m_AuthnRequestsSigned);
1429 WantAssertionsSigned(src.m_WantAssertionsSigned);
1430 VectorOf(AssertionConsumerService) v=getAssertionConsumerServices();
1431 for (vector<AssertionConsumerService*>::const_iterator i=src.m_AssertionConsumerServices.begin(); i!=src.m_AssertionConsumerServices.end(); i++) {
1433 v.push_back((*i)->cloneAssertionConsumerService());
1436 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1437 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1439 w.push_back((*j)->cloneAttributeConsumingService());
1444 IMPL_XMLOBJECT_CLONE(SPSSODescriptor);
1445 SSODescriptorType* cloneSSODescriptorType() const {
1446 return cloneSPSSODescriptor();
1448 RoleDescriptor* cloneRoleDescriptor() const {
1449 return cloneSPSSODescriptor();
1452 IMPL_BOOLEAN_ATTRIB(AuthnRequestsSigned);
1453 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1454 IMPL_TYPED_CHILDREN(AssertionConsumerService,m_pos_AssertionConsumerService);
1455 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1457 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1458 if (!qualifiedName.hasNamespaceURI()) {
1459 if (XMLString::equals(qualifiedName.getLocalPart(),AUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1460 setAuthnRequestsSigned(value);
1463 else if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1464 setWantAssertionsSigned(value);
1468 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1472 void marshallAttributes(DOMElement* domElement) const {
1473 MARSHALL_BOOLEAN_ATTRIB(AuthnRequestsSigned,AUTHNREQUESTSSIGNED,NULL);
1474 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,NULL);
1475 RoleDescriptorImpl::marshallAttributes(domElement);
1478 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1479 PROC_TYPED_CHILDREN(AssertionConsumerService,SAMLConstants::SAML20MD_NS,false);
1480 PROC_TYPED_CHILDREN(AttributeConsumingService,SAMLConstants::SAML20MD_NS,false);
1481 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1485 class SAML_DLLLOCAL AuthnAuthorityDescriptorImpl : public virtual AuthnAuthorityDescriptor, public RoleDescriptorImpl
1487 list<XMLObject*>::iterator m_pos_AuthnQueryService;
1488 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1491 m_children.push_back(NULL);
1492 m_children.push_back(NULL);
1493 m_pos_AuthnQueryService=m_pos_ContactPerson;
1494 ++m_pos_AuthnQueryService;
1495 m_pos_AssertionIDRequestService=m_pos_AuthnQueryService;
1496 ++m_pos_AssertionIDRequestService;
1500 virtual ~AuthnAuthorityDescriptorImpl() {}
1502 AuthnAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1503 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1507 AuthnAuthorityDescriptorImpl(const AuthnAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1509 VectorOf(AuthnQueryService) v=getAuthnQueryServices();
1510 for (vector<AuthnQueryService*>::const_iterator i=src.m_AuthnQueryServices.begin(); i!=src.m_AuthnQueryServices.end(); i++) {
1512 v.push_back((*i)->cloneAuthnQueryService());
1515 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1516 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1518 w.push_back((*j)->cloneAssertionIDRequestService());
1521 VectorOf(NameIDFormat) x=getNameIDFormats();
1522 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1524 x.push_back((*k)->cloneNameIDFormat());
1529 IMPL_XMLOBJECT_CLONE(AuthnAuthorityDescriptor);
1530 RoleDescriptor* cloneRoleDescriptor() const {
1531 return cloneAuthnAuthorityDescriptor();
1534 IMPL_TYPED_CHILDREN(AuthnQueryService,m_pos_AuthnQueryService);
1535 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1536 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1539 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1540 PROC_TYPED_CHILDREN(AuthnQueryService,SAMLConstants::SAML20MD_NS,false);
1541 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAMLConstants::SAML20MD_NS,false);
1542 PROC_TYPED_CHILDREN(NameIDFormat,SAMLConstants::SAML20MD_NS,false);
1543 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1547 class SAML_DLLLOCAL PDPDescriptorImpl : public virtual PDPDescriptor, public RoleDescriptorImpl
1549 list<XMLObject*>::iterator m_pos_AuthzService;
1550 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1553 m_children.push_back(NULL);
1554 m_children.push_back(NULL);
1555 m_pos_AuthzService=m_pos_ContactPerson;
1556 ++m_pos_AuthzService;
1557 m_pos_AssertionIDRequestService=m_pos_AuthzService;
1558 ++m_pos_AssertionIDRequestService;
1562 virtual ~PDPDescriptorImpl() {}
1564 PDPDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1565 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1569 PDPDescriptorImpl(const PDPDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1571 VectorOf(AuthzService) v=getAuthzServices();
1572 for (vector<AuthzService*>::const_iterator i=src.m_AuthzServices.begin(); i!=src.m_AuthzServices.end(); i++) {
1574 v.push_back((*i)->cloneAuthzService());
1577 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1578 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1580 w.push_back((*j)->cloneAssertionIDRequestService());
1583 VectorOf(NameIDFormat) x=getNameIDFormats();
1584 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1586 x.push_back((*k)->cloneNameIDFormat());
1591 IMPL_XMLOBJECT_CLONE(PDPDescriptor);
1592 RoleDescriptor* cloneRoleDescriptor() const {
1593 return clonePDPDescriptor();
1596 IMPL_TYPED_CHILDREN(AuthzService,m_pos_AuthzService);
1597 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1598 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1601 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1602 PROC_TYPED_CHILDREN(AuthzService,SAMLConstants::SAML20MD_NS,false);
1603 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAMLConstants::SAML20MD_NS,false);
1604 PROC_TYPED_CHILDREN(NameIDFormat,SAMLConstants::SAML20MD_NS,false);
1605 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1609 class SAML_DLLLOCAL AttributeAuthorityDescriptorImpl : public virtual AttributeAuthorityDescriptor, public RoleDescriptorImpl
1611 list<XMLObject*>::iterator m_pos_AttributeService;
1612 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1613 list<XMLObject*>::iterator m_pos_NameIDFormat;
1614 list<XMLObject*>::iterator m_pos_AttributeProfile;
1617 m_children.push_back(NULL);
1618 m_children.push_back(NULL);
1619 m_children.push_back(NULL);
1620 m_children.push_back(NULL);
1621 m_pos_AttributeService=m_pos_ContactPerson;
1622 ++m_pos_AttributeService;
1623 m_pos_AssertionIDRequestService=m_pos_AttributeService;
1624 ++m_pos_AssertionIDRequestService;
1625 m_pos_NameIDFormat=m_pos_AssertionIDRequestService;
1626 ++m_pos_NameIDFormat;
1627 m_pos_AttributeProfile=m_pos_NameIDFormat;
1628 ++m_pos_AttributeProfile;
1632 virtual ~AttributeAuthorityDescriptorImpl() {}
1634 AttributeAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1635 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1639 AttributeAuthorityDescriptorImpl(const AttributeAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1641 VectorOf(AttributeService) v=getAttributeServices();
1642 for (vector<AttributeService*>::const_iterator i=src.m_AttributeServices.begin(); i!=src.m_AttributeServices.end(); i++) {
1644 v.push_back((*i)->cloneAttributeService());
1647 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1648 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1650 w.push_back((*j)->cloneAssertionIDRequestService());
1653 VectorOf(NameIDFormat) x=getNameIDFormats();
1654 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1656 x.push_back((*k)->cloneNameIDFormat());
1659 VectorOf(AttributeProfile) y=getAttributeProfiles();
1660 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1662 y.push_back((*m)->cloneAttributeProfile());
1665 VectorOf(Attribute) z=getAttributes();
1666 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1668 z.push_back((*n)->cloneAttribute());
1673 IMPL_XMLOBJECT_CLONE(AttributeAuthorityDescriptor);
1674 RoleDescriptor* cloneRoleDescriptor() const {
1675 return cloneAttributeAuthorityDescriptor();
1678 IMPL_TYPED_CHILDREN(AttributeService,m_pos_AttributeService);
1679 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1680 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1681 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1682 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1685 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1686 PROC_TYPED_CHILDREN(AttributeService,SAMLConstants::SAML20MD_NS,false);
1687 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAMLConstants::SAML20MD_NS,false);
1688 PROC_TYPED_CHILDREN(NameIDFormat,SAMLConstants::SAML20MD_NS,false);
1689 PROC_TYPED_CHILDREN(AttributeProfile,SAMLConstants::SAML20MD_NS,false);
1690 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAMLConstants::SAML20_NS,false);
1691 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1695 class SAML_DLLLOCAL QueryDescriptorTypeImpl : public virtual QueryDescriptorType, public RoleDescriptorImpl
1698 m_WantAssertionsSigned=XMLConstants::XML_BOOL_NULL;
1699 m_children.push_back(NULL);
1700 m_pos_NameIDFormat=m_pos_ContactPerson;
1701 ++m_pos_NameIDFormat;
1705 list<XMLObject*>::iterator m_pos_NameIDFormat;
1707 QueryDescriptorTypeImpl() {
1712 virtual ~QueryDescriptorTypeImpl() {}
1714 QueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1715 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1719 QueryDescriptorTypeImpl(const QueryDescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1721 WantAssertionsSigned(src.m_WantAssertionsSigned);
1722 VectorOf(NameIDFormat) y=getNameIDFormats();
1723 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1725 y.push_back((*m)->cloneNameIDFormat());
1730 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1731 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1733 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1734 if (!qualifiedName.hasNamespaceURI()) {
1735 if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1736 setWantAssertionsSigned(value);
1740 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1744 void marshallAttributes(DOMElement* domElement) const {
1745 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,NULL);
1746 RoleDescriptorImpl::marshallAttributes(domElement);
1749 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1750 PROC_TYPED_CHILDREN(NameIDFormat,SAMLConstants::SAML20MD_NS,false);
1751 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1755 class SAML_DLLLOCAL AuthnQueryDescriptorTypeImpl : public virtual AuthnQueryDescriptorType, public QueryDescriptorTypeImpl
1758 virtual ~AuthnQueryDescriptorTypeImpl() {}
1760 AuthnQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1761 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1763 AuthnQueryDescriptorTypeImpl(const AuthnQueryDescriptorTypeImpl& src) : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {}
1765 IMPL_XMLOBJECT_CLONE(AuthnQueryDescriptorType);
1766 QueryDescriptorType* cloneQueryDescriptorType() const {
1767 return new AuthnQueryDescriptorTypeImpl(*this);
1769 RoleDescriptor* cloneRoleDescriptor() const {
1770 return new AuthnQueryDescriptorTypeImpl(*this);
1774 class SAML_DLLLOCAL AttributeQueryDescriptorTypeImpl : public virtual AttributeQueryDescriptorType, public QueryDescriptorTypeImpl
1777 virtual ~AttributeQueryDescriptorTypeImpl() {}
1779 AttributeQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1780 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1782 AttributeQueryDescriptorTypeImpl(const AttributeQueryDescriptorTypeImpl& src)
1783 : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1784 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1785 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1787 w.push_back((*j)->cloneAttributeConsumingService());
1792 IMPL_XMLOBJECT_CLONE(AttributeQueryDescriptorType);
1793 QueryDescriptorType* cloneQueryDescriptorType() const {
1794 return new AttributeQueryDescriptorTypeImpl(*this);
1796 RoleDescriptor* cloneRoleDescriptor() const {
1797 return new AttributeQueryDescriptorTypeImpl(*this);
1800 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1803 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1804 PROC_TYPED_CHILDREN(AttributeConsumingService,SAMLConstants::SAML20MD_NS,false);
1805 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1809 class SAML_DLLLOCAL AuthzDecisionQueryDescriptorTypeImpl : public virtual AuthzDecisionQueryDescriptorType, public QueryDescriptorTypeImpl
1812 virtual ~AuthzDecisionQueryDescriptorTypeImpl() {}
1814 AuthzDecisionQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1815 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1817 AuthzDecisionQueryDescriptorTypeImpl(const AuthzDecisionQueryDescriptorTypeImpl& src)
1818 : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1819 VectorOf(ActionNamespace) w=getActionNamespaces();
1820 for (vector<ActionNamespace*>::const_iterator j=src.m_ActionNamespaces.begin(); j!=src.m_ActionNamespaces.end(); j++) {
1822 w.push_back((*j)->cloneActionNamespace());
1827 IMPL_XMLOBJECT_CLONE(AuthzDecisionQueryDescriptorType);
1828 QueryDescriptorType* cloneQueryDescriptorType() const {
1829 return new AuthzDecisionQueryDescriptorTypeImpl(*this);
1831 RoleDescriptor* cloneRoleDescriptor() const {
1832 return new AuthzDecisionQueryDescriptorTypeImpl(*this);
1835 IMPL_TYPED_CHILDREN(ActionNamespace,m_children.end());
1838 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1839 PROC_TYPED_CHILDREN(ActionNamespace,SAMLConstants::SAML20MD_QUERY_EXT_NS,false);
1840 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1844 class SAML_DLLLOCAL AffiliationDescriptorImpl : public virtual AffiliationDescriptor,
1845 public virtual SignableObject,
1846 public AbstractComplexElement,
1847 public AbstractAttributeExtensibleXMLObject,
1848 public AbstractDOMCachingXMLObject,
1849 public AbstractXMLObjectMarshaller,
1850 public AbstractXMLObjectUnmarshaller
1852 list<XMLObject*>::iterator m_pos_AffiliateMember;
1855 m_ID=m_AffiliationOwnerID=NULL;
1856 m_ValidUntil=m_CacheDuration=NULL;
1857 m_children.push_back(NULL);
1858 m_children.push_back(NULL);
1859 m_children.push_back(NULL);
1862 m_pos_Signature=m_children.begin();
1863 m_pos_Extensions=m_pos_Signature;
1865 m_pos_AffiliateMember=m_pos_Extensions;
1866 ++m_pos_AffiliateMember;
1870 virtual ~AffiliationDescriptorImpl() {
1871 XMLString::release(&m_ID);
1872 XMLString::release(&m_AffiliationOwnerID);
1873 delete m_ValidUntil;
1874 delete m_CacheDuration;
1877 AffiliationDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1878 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1882 AffiliationDescriptorImpl(const AffiliationDescriptorImpl& src)
1883 : AbstractXMLObject(src), AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1886 setAffiliationOwnerID(src.getAffiliationOwnerID());
1887 setValidUntil(src.getValidUntil());
1888 setCacheDuration(src.getCacheDuration());
1889 if (src.getSignature())
1890 setSignature(src.getSignature()->cloneSignature());
1891 if (src.getExtensions())
1892 setExtensions(src.getExtensions()->cloneExtensions());
1894 VectorOf(KeyDescriptor) v=getKeyDescriptors();
1895 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
1897 v.push_back((*i)->cloneKeyDescriptor());
1900 VectorOf(AffiliateMember) w=getAffiliateMembers();
1901 for (vector<AffiliateMember*>::const_iterator j=src.m_AffiliateMembers.begin(); j!=src.m_AffiliateMembers.end(); j++) {
1903 w.push_back((*j)->cloneAffiliateMember());
1908 IMPL_XMLOBJECT_CLONE(AffiliationDescriptor);
1910 //IMPL_TYPED_CHILD(Signature);
1911 // Need customized setter.
1913 Signature* m_Signature;
1914 list<XMLObject*>::iterator m_pos_Signature;
1916 Signature* getSignature() const {
1920 void setSignature(Signature* sig) {
1921 prepareForAssignment(m_Signature,sig);
1922 *m_pos_Signature=m_Signature=sig;
1923 // Sync content reference back up.
1925 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1929 IMPL_STRING_ATTRIB(AffiliationOwnerID);
1930 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
1931 IMPL_DATETIME_ATTRIB(CacheDuration,0);
1932 IMPL_TYPED_CHILD(Extensions);
1933 IMPL_TYPED_CHILDREN(AffiliateMember,m_pos_AffiliateMember);
1934 IMPL_TYPED_CHILDREN(KeyDescriptor,m_children.end());
1936 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1937 if (!qualifiedName.hasNamespaceURI()) {
1938 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
1942 else if (XMLString::equals(qualifiedName.getLocalPart(),AFFILIATIONOWNERID_ATTRIB_NAME)) {
1943 setAffiliationOwnerID(value);
1946 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
1947 setValidUntil(value);
1950 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
1951 setCacheDuration(value);
1955 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1959 void marshallAttributes(DOMElement* domElement) const {
1960 MARSHALL_ID_ATTRIB(ID,ID,NULL);
1961 MARSHALL_STRING_ATTRIB(AffiliationOwnerID,AFFILIATIONOWNERID,NULL);
1962 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
1963 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
1964 marshallExtensionAttributes(domElement);
1967 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1968 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLConstants::XMLSIG_NS,false);
1969 PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20MD_NS,false);
1970 PROC_TYPED_CHILDREN(AffiliateMember,SAMLConstants::SAML20MD_NS,false);
1971 PROC_TYPED_CHILDREN(KeyDescriptor,SAMLConstants::SAML20MD_NS,false);
1972 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1975 void processAttribute(const DOMAttr* attribute) {
1976 PROC_ID_ATTRIB(ID,ID,NULL);
1977 unmarshallExtensionAttribute(attribute);
1981 class SAML_DLLLOCAL EntityDescriptorImpl : public virtual EntityDescriptor,
1982 public virtual SignableObject,
1983 public AbstractComplexElement,
1984 public AbstractAttributeExtensibleXMLObject,
1985 public AbstractDOMCachingXMLObject,
1986 public AbstractXMLObjectMarshaller,
1987 public AbstractXMLObjectUnmarshaller
1989 list<XMLObject*>::iterator m_pos_ContactPerson;
1992 m_ID=m_EntityID=NULL;
1993 m_ValidUntil=m_CacheDuration=NULL;
1994 m_children.push_back(NULL);
1995 m_children.push_back(NULL);
1996 m_children.push_back(NULL);
1997 m_children.push_back(NULL);
1998 m_children.push_back(NULL);
2001 m_AffiliationDescriptor=NULL;
2002 m_Organization=NULL;
2003 m_pos_Signature=m_children.begin();
2004 m_pos_Extensions=m_pos_Signature;
2006 m_pos_AffiliationDescriptor=m_pos_Extensions;
2007 ++m_pos_AffiliationDescriptor;
2008 m_pos_Organization=m_pos_AffiliationDescriptor;
2009 ++m_pos_Organization;
2010 m_pos_ContactPerson=m_pos_Organization;
2011 ++m_pos_ContactPerson;
2015 virtual ~EntityDescriptorImpl() {
2016 XMLString::release(&m_ID);
2017 XMLString::release(&m_EntityID);
2018 delete m_ValidUntil;
2019 delete m_CacheDuration;
2022 EntityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
2023 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2027 EntityDescriptorImpl(const EntityDescriptorImpl& src)
2028 : AbstractXMLObject(src), AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
2031 setEntityID(src.getEntityID());
2032 setValidUntil(src.getValidUntil());
2033 setCacheDuration(src.getCacheDuration());
2034 if (src.getSignature())
2035 setSignature(src.getSignature()->cloneSignature());
2036 if (src.getExtensions())
2037 setExtensions(src.getExtensions()->cloneExtensions());
2038 if (src.getAffiliationDescriptor())
2039 setAffiliationDescriptor(src.getAffiliationDescriptor()->cloneAffiliationDescriptor());
2040 if (src.getOrganization())
2041 setOrganization(src.getOrganization()->cloneOrganization());
2043 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2045 IDPSSODescriptor* idp=dynamic_cast<IDPSSODescriptor*>(*i);
2047 getIDPSSODescriptors().push_back(idp->cloneIDPSSODescriptor());
2051 SPSSODescriptor* sp=dynamic_cast<SPSSODescriptor*>(*i);
2053 getSPSSODescriptors().push_back(sp->cloneSPSSODescriptor());
2057 AuthnAuthorityDescriptor* authn=dynamic_cast<AuthnAuthorityDescriptor*>(*i);
2059 getAuthnAuthorityDescriptors().push_back(authn->cloneAuthnAuthorityDescriptor());
2063 AttributeAuthorityDescriptor* attr=dynamic_cast<AttributeAuthorityDescriptor*>(*i);
2065 getAttributeAuthorityDescriptors().push_back(attr->cloneAttributeAuthorityDescriptor());
2069 PDPDescriptor* pdp=dynamic_cast<PDPDescriptor*>(*i);
2071 getPDPDescriptors().push_back(pdp->clonePDPDescriptor());
2075 AuthnQueryDescriptorType* authnq=dynamic_cast<AuthnQueryDescriptorType*>(*i);
2077 getAuthnQueryDescriptorTypes().push_back(authnq->cloneAuthnQueryDescriptorType());
2081 AttributeQueryDescriptorType* attrq=dynamic_cast<AttributeQueryDescriptorType*>(*i);
2083 getAttributeQueryDescriptorTypes().push_back(attrq->cloneAttributeQueryDescriptorType());
2087 AuthzDecisionQueryDescriptorType* authzq=dynamic_cast<AuthzDecisionQueryDescriptorType*>(*i);
2089 getAuthzDecisionQueryDescriptorTypes().push_back(authzq->cloneAuthzDecisionQueryDescriptorType());
2093 RoleDescriptor* role=dynamic_cast<RoleDescriptor*>(*i);
2095 getRoleDescriptors().push_back(role->cloneRoleDescriptor());
2101 VectorOf(ContactPerson) v=getContactPersons();
2102 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
2104 v.push_back((*j)->cloneContactPerson());
2107 VectorOf(AdditionalMetadataLocation) w=getAdditionalMetadataLocations();
2108 for (vector<AdditionalMetadataLocation*>::const_iterator k=src.m_AdditionalMetadataLocations.begin(); k!=src.m_AdditionalMetadataLocations.end(); k++) {
2110 w.push_back((*k)->cloneAdditionalMetadataLocation());
2115 IMPL_XMLOBJECT_CLONE(EntityDescriptor);
2117 //IMPL_TYPED_CHILD(Signature);
2118 // Need customized setter.
2120 Signature* m_Signature;
2121 list<XMLObject*>::iterator m_pos_Signature;
2123 Signature* getSignature() const {
2127 void setSignature(Signature* sig) {
2128 prepareForAssignment(m_Signature,sig);
2129 *m_pos_Signature=m_Signature=sig;
2130 // Sync content reference back up.
2132 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2136 IMPL_STRING_ATTRIB(EntityID);
2137 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2138 IMPL_DATETIME_ATTRIB(CacheDuration,0);
2139 IMPL_TYPED_CHILD(Extensions);
2140 IMPL_TYPED_CHILDREN(RoleDescriptor,m_pos_AffiliationDescriptor);
2141 IMPL_TYPED_CHILDREN(IDPSSODescriptor,m_pos_AffiliationDescriptor);
2142 IMPL_TYPED_CHILDREN(SPSSODescriptor,m_pos_AffiliationDescriptor);
2143 IMPL_TYPED_CHILDREN(AuthnAuthorityDescriptor,m_pos_AffiliationDescriptor);
2144 IMPL_TYPED_CHILDREN(AttributeAuthorityDescriptor,m_pos_AffiliationDescriptor);
2145 IMPL_TYPED_CHILDREN(PDPDescriptor,m_pos_AffiliationDescriptor);
2146 IMPL_TYPED_CHILDREN(AuthnQueryDescriptorType,m_pos_AffiliationDescriptor);
2147 IMPL_TYPED_CHILDREN(AttributeQueryDescriptorType,m_pos_AffiliationDescriptor);
2148 IMPL_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,m_pos_AffiliationDescriptor);
2149 IMPL_TYPED_CHILD(AffiliationDescriptor);
2150 IMPL_TYPED_CHILD(Organization);
2151 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
2152 IMPL_TYPED_CHILDREN(AdditionalMetadataLocation,m_children.end());
2154 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
2155 if (!qualifiedName.hasNamespaceURI()) {
2156 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
2160 else if (XMLString::equals(qualifiedName.getLocalPart(),ENTITYID_ATTRIB_NAME)) {
2164 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
2165 setValidUntil(value);
2168 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
2169 setCacheDuration(value);
2173 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
2176 const IDPSSODescriptor* getIDPSSODescriptor(const XMLCh* protocol) const {
2177 for (vector<IDPSSODescriptor*>::const_iterator i=m_IDPSSODescriptors.begin(); i!=m_IDPSSODescriptors.end(); i++) {
2178 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2184 const SPSSODescriptor* getSPSSODescriptor(const XMLCh* protocol) const {
2185 for (vector<SPSSODescriptor*>::const_iterator i=m_SPSSODescriptors.begin(); i!=m_SPSSODescriptors.end(); i++) {
2186 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2192 const AuthnAuthorityDescriptor* getAuthnAuthorityDescriptor(const XMLCh* protocol) const {
2193 for (vector<AuthnAuthorityDescriptor*>::const_iterator i=m_AuthnAuthorityDescriptors.begin(); i!=m_AuthnAuthorityDescriptors.end(); i++) {
2194 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2200 const AttributeAuthorityDescriptor* getAttributeAuthorityDescriptor(const XMLCh* protocol) const {
2201 for (vector<AttributeAuthorityDescriptor*>::const_iterator i=m_AttributeAuthorityDescriptors.begin(); i!=m_AttributeAuthorityDescriptors.end(); i++) {
2202 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2208 const PDPDescriptor* getPDPDescriptor(const XMLCh* protocol) const {
2209 for (vector<PDPDescriptor*>::const_iterator i=m_PDPDescriptors.begin(); i!=m_PDPDescriptors.end(); i++) {
2210 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2216 const AuthnQueryDescriptorType* getAuthnQueryDescriptorType(const XMLCh* protocol) const {
2217 for (vector<AuthnQueryDescriptorType*>::const_iterator i=m_AuthnQueryDescriptorTypes.begin(); i!=m_AuthnQueryDescriptorTypes.end(); i++) {
2218 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2224 const AttributeQueryDescriptorType* getAttributeQueryDescriptorType(const XMLCh* protocol) const {
2225 for (vector<AttributeQueryDescriptorType*>::const_iterator i=m_AttributeQueryDescriptorTypes.begin(); i!=m_AttributeQueryDescriptorTypes.end(); i++) {
2226 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2232 const AuthzDecisionQueryDescriptorType* getAuthzDecisionQueryDescriptorType(const XMLCh* protocol) const {
2233 for (vector<AuthzDecisionQueryDescriptorType*>::const_iterator i=m_AuthzDecisionQueryDescriptorTypes.begin(); i!=m_AuthzDecisionQueryDescriptorTypes.end(); i++) {
2234 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2240 const RoleDescriptor* getRoleDescriptor(xmltooling::QName& qname, const XMLCh* protocol) const {
2241 for (vector<RoleDescriptor*>::const_iterator i=m_RoleDescriptors.begin(); i!=m_RoleDescriptors.end(); i++) {
2242 if ((*i)->getSchemaType() && qname==(*((*i)->getSchemaType())) && (*i)->hasSupport(protocol) && (*i)->isValid())
2249 void marshallAttributes(DOMElement* domElement) const {
2250 MARSHALL_ID_ATTRIB(ID,ID,NULL);
2251 MARSHALL_STRING_ATTRIB(EntityID,ENTITYID,NULL);
2252 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2253 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2254 marshallExtensionAttributes(domElement);
2257 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2258 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLConstants::XMLSIG_NS,false);
2259 PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20MD_NS,false);
2260 PROC_TYPED_CHILDREN(IDPSSODescriptor,SAMLConstants::SAML20MD_NS,false);
2261 PROC_TYPED_CHILDREN(SPSSODescriptor,SAMLConstants::SAML20MD_NS,false);
2262 PROC_TYPED_CHILDREN(AuthnAuthorityDescriptor,SAMLConstants::SAML20MD_NS,false);
2263 PROC_TYPED_CHILDREN(AttributeAuthorityDescriptor,SAMLConstants::SAML20MD_NS,false);
2264 PROC_TYPED_CHILDREN(PDPDescriptor,SAMLConstants::SAML20MD_NS,false);
2265 PROC_TYPED_CHILDREN(AuthnQueryDescriptorType,SAMLConstants::SAML20MD_QUERY_EXT_NS,false);
2266 PROC_TYPED_CHILDREN(AttributeQueryDescriptorType,SAMLConstants::SAML20MD_QUERY_EXT_NS,false);
2267 PROC_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,SAMLConstants::SAML20MD_QUERY_EXT_NS,false);
2268 PROC_TYPED_CHILDREN(RoleDescriptor,SAMLConstants::SAML20MD_NS,false);
2269 PROC_TYPED_CHILD(AffiliationDescriptor,SAMLConstants::SAML20MD_NS,false);
2270 PROC_TYPED_CHILD(Organization,SAMLConstants::SAML20MD_NS,false);
2271 PROC_TYPED_CHILDREN(ContactPerson,SAMLConstants::SAML20MD_NS,false);
2272 PROC_TYPED_CHILDREN(AdditionalMetadataLocation,SAMLConstants::SAML20MD_NS,false);
2273 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2276 void processAttribute(const DOMAttr* attribute) {
2277 PROC_ID_ATTRIB(ID,ID,NULL);
2278 unmarshallExtensionAttribute(attribute);
2282 class SAML_DLLLOCAL EntitiesDescriptorImpl : public virtual EntitiesDescriptor,
2283 public virtual SignableObject,
2284 public AbstractComplexElement,
2285 public AbstractDOMCachingXMLObject,
2286 public AbstractXMLObjectMarshaller,
2287 public AbstractXMLObjectUnmarshaller
2291 m_ValidUntil=m_CacheDuration=NULL;
2292 m_children.push_back(NULL);
2293 m_children.push_back(NULL);
2296 m_pos_Signature=m_children.begin();
2297 m_pos_Extensions=m_pos_Signature;
2302 virtual ~EntitiesDescriptorImpl() {
2303 XMLString::release(&m_ID);
2304 XMLString::release(&m_Name);
2305 delete m_ValidUntil;
2306 delete m_CacheDuration;
2309 EntitiesDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
2310 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2314 EntitiesDescriptorImpl(const EntitiesDescriptorImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
2317 setName(src.getName());
2318 setValidUntil(src.getValidUntil());
2319 setCacheDuration(src.getCacheDuration());
2320 if (src.getSignature())
2321 setSignature(src.getSignature()->cloneSignature());
2322 if (src.getExtensions())
2323 setExtensions(src.getExtensions()->cloneExtensions());
2325 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2327 EntityDescriptor* e=dynamic_cast<EntityDescriptor*>(*i);
2329 getEntityDescriptors().push_back(e->cloneEntityDescriptor());
2333 EntitiesDescriptor* es=dynamic_cast<EntitiesDescriptor*>(*i);
2335 getEntitiesDescriptors().push_back(es->cloneEntitiesDescriptor());
2342 IMPL_XMLOBJECT_CLONE(EntitiesDescriptor);
2344 //IMPL_TYPED_CHILD(Signature);
2345 // Need customized setter.
2347 Signature* m_Signature;
2348 list<XMLObject*>::iterator m_pos_Signature;
2350 Signature* getSignature() const {
2354 void setSignature(Signature* sig) {
2355 prepareForAssignment(m_Signature,sig);
2356 *m_pos_Signature=m_Signature=sig;
2357 // Sync content reference back up.
2359 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2363 IMPL_STRING_ATTRIB(Name);
2364 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2365 IMPL_DATETIME_ATTRIB(CacheDuration,0);
2366 IMPL_TYPED_CHILD(Extensions);
2367 IMPL_TYPED_CHILDREN(EntityDescriptor,m_children.end());
2368 IMPL_TYPED_CHILDREN(EntitiesDescriptor,m_children.end());
2371 void marshallAttributes(DOMElement* domElement) const {
2372 MARSHALL_ID_ATTRIB(ID,ID,NULL);
2373 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
2374 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2375 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2378 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2379 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLConstants::XMLSIG_NS,false);
2380 PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20MD_NS,false);
2381 PROC_TYPED_CHILDREN(EntityDescriptor,SAMLConstants::SAML20MD_NS,false);
2382 PROC_TYPED_CHILDREN(EntitiesDescriptor,SAMLConstants::SAML20MD_NS,false);
2383 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2386 void processAttribute(const DOMAttr* attribute) {
2387 PROC_ID_ATTRIB(ID,ID,NULL);
2388 PROC_STRING_ATTRIB(Name,NAME,NULL);
2389 PROC_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2390 PROC_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2397 #if defined (_MSC_VER)
2398 #pragma warning( pop )
2401 // Builder Implementations
2403 IMPL_XMLOBJECTBUILDER(AdditionalMetadataLocation);
2404 IMPL_XMLOBJECTBUILDER(AffiliateMember);
2405 IMPL_XMLOBJECTBUILDER(AffiliationDescriptor);
2406 IMPL_XMLOBJECTBUILDER(ArtifactResolutionService);
2407 IMPL_XMLOBJECTBUILDER(AssertionConsumerService);
2408 IMPL_XMLOBJECTBUILDER(AssertionIDRequestService);
2409 IMPL_XMLOBJECTBUILDER(AttributeAuthorityDescriptor);
2410 IMPL_XMLOBJECTBUILDER(AttributeConsumingService);
2411 IMPL_XMLOBJECTBUILDER(AttributeProfile);
2412 IMPL_XMLOBJECTBUILDER(AttributeQueryDescriptorType);
2413 IMPL_XMLOBJECTBUILDER(AttributeService);
2414 IMPL_XMLOBJECTBUILDER(AuthnAuthorityDescriptor);
2415 IMPL_XMLOBJECTBUILDER(AuthnQueryDescriptorType);
2416 IMPL_XMLOBJECTBUILDER(AuthnQueryService);
2417 IMPL_XMLOBJECTBUILDER(AuthzDecisionQueryDescriptorType);
2418 IMPL_XMLOBJECTBUILDER(AuthzService);
2419 IMPL_XMLOBJECTBUILDER(Company);
2420 IMPL_XMLOBJECTBUILDER(ContactPerson);
2421 IMPL_XMLOBJECTBUILDER(EmailAddress);
2422 IMPL_XMLOBJECTBUILDER(EndpointType);
2423 IMPL_XMLOBJECTBUILDER(EntitiesDescriptor);
2424 IMPL_XMLOBJECTBUILDER(EntityDescriptor);
2425 IMPL_XMLOBJECTBUILDER(Extensions);
2426 IMPL_XMLOBJECTBUILDER(GivenName);
2427 IMPL_XMLOBJECTBUILDER(IDPSSODescriptor);
2428 IMPL_XMLOBJECTBUILDER(IndexedEndpointType);
2429 IMPL_XMLOBJECTBUILDER(KeyDescriptor);
2430 IMPL_XMLOBJECTBUILDER(localizedNameType);
2431 IMPL_XMLOBJECTBUILDER(localizedURIType);
2432 IMPL_XMLOBJECTBUILDER(ManageNameIDService);
2433 IMPL_XMLOBJECTBUILDER(NameIDFormat);
2434 IMPL_XMLOBJECTBUILDER(NameIDMappingService);
2435 IMPL_XMLOBJECTBUILDER(Organization);
2436 IMPL_XMLOBJECTBUILDER(OrganizationName);
2437 IMPL_XMLOBJECTBUILDER(OrganizationDisplayName);
2438 IMPL_XMLOBJECTBUILDER(OrganizationURL);
2439 IMPL_XMLOBJECTBUILDER(PDPDescriptor);
2440 IMPL_XMLOBJECTBUILDER(RequestedAttribute);
2441 IMPL_XMLOBJECTBUILDER(ServiceDescription);
2442 IMPL_XMLOBJECTBUILDER(ServiceName);
2443 IMPL_XMLOBJECTBUILDER(SingleLogoutService);
2444 IMPL_XMLOBJECTBUILDER(SingleSignOnService);
2445 IMPL_XMLOBJECTBUILDER(SPSSODescriptor);
2446 IMPL_XMLOBJECTBUILDER(SurName);
2447 IMPL_XMLOBJECTBUILDER(TelephoneNumber);
2449 IMPL_XMLOBJECTBUILDER(ActionNamespace);
2450 IMPL_XMLOBJECTBUILDER(SourceID);
2452 const XMLCh ActionNamespace::LOCAL_NAME[] = UNICODE_LITERAL_15(A,c,t,i,o,n,N,a,m,e,s,p,a,c,e);
2453 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);
2454 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);
2455 const XMLCh AdditionalMetadataLocation::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(n,a,m,e,s,p,a,c,e);
2456 const XMLCh AffiliateMember::LOCAL_NAME[] = UNICODE_LITERAL_15(A,f,f,i,l,i,a,t,e,M,e,m,b,e,r);
2457 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);
2458 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);
2459 const XMLCh AffiliationDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2460 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);
2461 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);
2462 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);
2463 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);
2464 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);
2465 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);
2466 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);
2467 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);
2468 const XMLCh AttributeConsumingService::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
2469 const XMLCh AttributeConsumingService::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
2470 const XMLCh AttributeProfile::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,P,r,o,f,i,l,e);
2471 const XMLCh AttributeQueryDescriptorType::LOCAL_NAME[] =UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2472 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);
2473 const XMLCh AttributeService::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,S,e,r,v,i,c,e);
2474 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);
2475 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);
2476 const XMLCh AuthnQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2477 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);
2478 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);
2479 const XMLCh AuthzDecisionQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2480 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);
2481 const XMLCh AuthzService::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,z,S,e,r,v,i,c,e);
2482 const XMLCh CacheableSAMLObject::CACHEDURATION_ATTRIB_NAME[] = UNICODE_LITERAL_13(c,a,c,h,e,D,u,r,a,t,i,o,n);
2483 const XMLCh Company::LOCAL_NAME[] = UNICODE_LITERAL_7(C,o,m,p,a,n,y);
2484 const XMLCh ContactPerson::LOCAL_NAME[] = UNICODE_LITERAL_13(C,o,n,t,a,c,t,P,e,r,s,o,n);
2485 const XMLCh ContactPerson::TYPE_NAME[] = UNICODE_LITERAL_11(C,o,n,t,a,c,t,T,y,p,e);
2486 const XMLCh ContactPerson::CONTACTTYPE_ATTRIB_NAME[] = UNICODE_LITERAL_11(c,o,n,t,a,c,t,T,y,p,e);
2487 const XMLCh ContactPerson::CONTACT_TECHNICAL[] = UNICODE_LITERAL_9(t,e,c,h,n,i,c,a,l);
2488 const XMLCh ContactPerson::CONTACT_SUPPORT[] = UNICODE_LITERAL_7(s,u,p,p,o,r,t);
2489 const XMLCh ContactPerson::CONTACT_ADMINISTRATIVE[] = UNICODE_LITERAL_14(a,d,m,i,n,i,s,t,r,a,t,i,v,e);
2490 const XMLCh ContactPerson::CONTACT_BILLING[] = UNICODE_LITERAL_7(b,i,l,l,i,n,g);
2491 const XMLCh ContactPerson::CONTACT_OTHER[] = UNICODE_LITERAL_5(o,t,h,e,r);
2492 const XMLCh EmailAddress::LOCAL_NAME[] = UNICODE_LITERAL_12(E,m,a,i,l,A,d,d,r,e,s,s);
2493 const XMLCh EndpointType::LOCAL_NAME[] = {chNull};
2494 const XMLCh EndpointType::TYPE_NAME[] = UNICODE_LITERAL_12(E,n,d,p,o,i,n,t,T,y,p,e);
2495 const XMLCh EndpointType::BINDING_ATTRIB_NAME[] = UNICODE_LITERAL_7(B,i,n,d,i,n,g);
2496 const XMLCh EndpointType::LOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_8(L,o,c,a,t,i,o,n);
2497 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);
2498 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);
2499 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);
2500 const XMLCh EntitiesDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2501 const XMLCh EntitiesDescriptor::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e);
2502 const XMLCh EntityDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,D,e,s,c,r,i,p,t,o,r);
2503 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);
2504 const XMLCh EntityDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2505 const XMLCh EntityDescriptor::ENTITYID_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,n,t,i,t,y,I,D);
2506 const XMLCh Extensions::LOCAL_NAME[] = UNICODE_LITERAL_10(E,x,t,e,n,s,i,o,n,s);
2507 const XMLCh Extensions::TYPE_NAME[] = UNICODE_LITERAL_14(E,x,t,e,n,s,i,o,n,s,T,y,p,e);
2508 const XMLCh GivenName::LOCAL_NAME[] = UNICODE_LITERAL_9(G,i,v,e,n,N,a,m,e);
2509 const XMLCh IDPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(I,D,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
2510 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);
2511 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);
2512 const XMLCh IndexedEndpointType::LOCAL_NAME[] = {chNull};
2513 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);
2514 const XMLCh IndexedEndpointType::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
2515 const XMLCh IndexedEndpointType::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
2516 const XMLCh KeyDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(K,e,y,D,e,s,c,r,i,p,t,o,r);
2517 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);
2518 const XMLCh KeyDescriptor::USE_ATTRIB_NAME[] = UNICODE_LITERAL_3(u,s,e);
2519 const XMLCh KeyDescriptor::KEYTYPE_ENCRYPTION[] = UNICODE_LITERAL_10(e,n,c,r,y,p,t,i,o,n);
2520 const XMLCh KeyDescriptor::KEYTYPE_SIGNING[] = UNICODE_LITERAL_7(s,i,g,n,i,n,g);
2521 const XMLCh localizedNameType::LOCAL_NAME[] = {chNull};
2522 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);
2523 const XMLCh localizedNameType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2524 const XMLCh localizedURIType::LOCAL_NAME[] = {chNull};
2525 const XMLCh localizedURIType::TYPE_NAME[] = UNICODE_LITERAL_16(l,o,c,a,l,i,z,e,d,U,R,I,T,y,p,e);
2526 const XMLCh localizedURIType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2527 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);
2528 const XMLCh NameIDFormat::LOCAL_NAME[] = UNICODE_LITERAL_12(N,a,m,e,I,D,F,o,r,m,a,t);
2529 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);
2530 const XMLCh Organization::LOCAL_NAME[] = UNICODE_LITERAL_12(O,r,g,a,n,i,z,a,t,i,o,n);
2531 const XMLCh Organization::TYPE_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,T,y,p,e);
2532 const XMLCh OrganizationName::LOCAL_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,N,a,m,e);
2533 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);
2534 const XMLCh OrganizationURL::LOCAL_NAME[] = UNICODE_LITERAL_15(O,r,g,a,n,i,z,a,t,i,o,n,U,R,L);
2535 const XMLCh PDPDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(P,D,P,D,e,s,c,r,i,p,t,o,r);
2536 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);
2537 const XMLCh QueryDescriptorType::LOCAL_NAME[] = {chNull};
2538 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);
2539 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);
2540 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);
2541 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);
2542 const XMLCh RequestedAttribute::ISREQUIRED_ATTRIB_NAME[] = UNICODE_LITERAL_10(i,s,R,e,q,u,i,r,e,d);
2543 const XMLCh RoleDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2544 const XMLCh RoleDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2545 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);
2546 const XMLCh RoleDescriptor::ERRORURL_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,r,r,o,r,U,R,L);
2547 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);
2548 const XMLCh ServiceName::LOCAL_NAME[] = UNICODE_LITERAL_11(S,e,r,v,i,c,e,N,a,m,e);
2549 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);
2550 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);
2551 const XMLCh SourceID::LOCAL_NAME[] = UNICODE_LITERAL_8(S,o,u,r,c,e,I,D);
2552 const XMLCh SPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_15(S,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
2553 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);
2554 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);
2555 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);
2556 const XMLCh SSODescriptorType::LOCAL_NAME[] = {chNull};
2557 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);
2558 const XMLCh SurName::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,r,N,a,m,e);
2559 const XMLCh TelephoneNumber::LOCAL_NAME[] = UNICODE_LITERAL_15(T,e,l,e,p,h,o,n,e,N,u,m,b,e,r);
2560 const XMLCh TimeBoundSAMLObject::VALIDUNTIL_ATTRIB_NAME[] = UNICODE_LITERAL_10(v,a,l,i,d,U,n,t,i,l);