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 // Take care of wildcard.
341 for (map<QName,XMLCh*>::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) {
342 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart());
343 if (i->first.hasPrefix())
344 attr->setPrefix(i->first.getPrefix());
345 attr->setNodeValue(i->second);
346 domElement->setAttributeNode(attr);
350 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
351 PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20MD_NS,false);
352 PROC_TYPED_CHILDREN(OrganizationName,SAMLConstants::SAML20MD_NS,false);
353 PROC_TYPED_CHILDREN(OrganizationDisplayName,SAMLConstants::SAML20MD_NS,false);
354 PROC_TYPED_CHILDREN(OrganizationURL,SAMLConstants::SAML20MD_NS,false);
355 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
358 void processAttribute(const DOMAttr* attribute) {
359 QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix());
360 setAttribute(q,attribute->getNodeValue());
364 class SAML_DLLLOCAL ContactPersonImpl : public virtual ContactPerson,
365 public AbstractComplexElement,
366 public AbstractAttributeExtensibleXMLObject,
367 public AbstractDOMCachingXMLObject,
368 public AbstractXMLObjectMarshaller,
369 public AbstractXMLObjectUnmarshaller
371 list<XMLObject*>::iterator m_pos_TelephoneNumber;
375 m_children.push_back(NULL);
376 m_children.push_back(NULL);
377 m_children.push_back(NULL);
378 m_children.push_back(NULL);
379 m_children.push_back(NULL);
384 m_pos_Extensions=m_children.begin();
385 m_pos_Company=m_pos_Extensions;
387 m_pos_GivenName=m_pos_Company;
389 m_pos_SurName=m_pos_GivenName;
391 m_pos_TelephoneNumber=m_pos_SurName;
392 ++m_pos_TelephoneNumber;
395 virtual ~ContactPersonImpl() {}
397 ContactPersonImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
398 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
402 ContactPersonImpl(const ContactPersonImpl& src)
403 : AbstractXMLObject(src), AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
405 if (src.getExtensions())
406 setExtensions(src.getExtensions()->cloneExtensions());
407 if (src.getCompany())
408 setCompany(src.getCompany()->cloneCompany());
409 if (src.getGivenName())
410 setGivenName(src.getGivenName()->cloneGivenName());
411 if (src.getSurName())
412 setSurName(src.getSurName()->cloneSurName());
414 VectorOf(EmailAddress) v=getEmailAddresss();
415 for (vector<EmailAddress*>::const_iterator i=src.m_EmailAddresss.begin(); i!=src.m_EmailAddresss.end(); i++) {
417 v.push_back((*i)->cloneEmailAddress());
420 VectorOf(TelephoneNumber) w=getTelephoneNumbers();
421 for (vector<TelephoneNumber*>::const_iterator j=src.m_TelephoneNumbers.begin(); j!=src.m_TelephoneNumbers.end(); j++) {
423 w.push_back((*j)->cloneTelephoneNumber());
428 IMPL_XMLOBJECT_CLONE(ContactPerson);
429 IMPL_STRING_ATTRIB(ContactType);
430 IMPL_TYPED_CHILD(Extensions);
431 IMPL_TYPED_CHILD(Company);
432 IMPL_TYPED_CHILD(GivenName);
433 IMPL_TYPED_CHILD(SurName);
434 IMPL_TYPED_CHILDREN(EmailAddress,m_pos_TelephoneNumber);
435 IMPL_TYPED_CHILDREN(TelephoneNumber,m_children.end());
437 void setAttribute(QName& qualifiedName, const XMLCh* value) {
438 if (!qualifiedName.hasNamespaceURI()) {
439 if (XMLString::equals(qualifiedName.getLocalPart(),CONTACTTYPE_ATTRIB_NAME)) {
440 setContactType(value);
444 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value);
448 void marshallAttributes(DOMElement* domElement) const {
449 MARSHALL_STRING_ATTRIB(ContactType,CONTACTTYPE,NULL);
451 // Take care of wildcard.
452 for (map<QName,XMLCh*>::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) {
453 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart());
454 if (i->first.hasPrefix())
455 attr->setPrefix(i->first.getPrefix());
456 attr->setNodeValue(i->second);
457 domElement->setAttributeNode(attr);
461 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
462 PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20MD_NS,false);
463 PROC_TYPED_CHILD(Company,SAMLConstants::SAML20MD_NS,false);
464 PROC_TYPED_CHILD(GivenName,SAMLConstants::SAML20MD_NS,false);
465 PROC_TYPED_CHILD(SurName,SAMLConstants::SAML20MD_NS,false);
466 PROC_TYPED_CHILDREN(EmailAddress,SAMLConstants::SAML20MD_NS,false);
467 PROC_TYPED_CHILDREN(TelephoneNumber,SAMLConstants::SAML20MD_NS,false);
468 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
471 void processAttribute(const DOMAttr* attribute) {
472 QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix());
473 setAttribute(q,attribute->getNodeValue());
477 class SAML_DLLLOCAL AdditionalMetadataLocationImpl : public virtual AdditionalMetadataLocation,
478 public AbstractSimpleElement,
479 public AbstractChildlessElement,
480 public AbstractDOMCachingXMLObject,
481 public AbstractXMLObjectMarshaller,
482 public AbstractXMLObjectUnmarshaller
489 virtual ~AdditionalMetadataLocationImpl() {
490 XMLString::release(&m_Namespace);
493 AdditionalMetadataLocationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
494 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
498 AdditionalMetadataLocationImpl(const AdditionalMetadataLocationImpl& src)
499 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
503 IMPL_XMLOBJECT_CLONE(AdditionalMetadataLocation);
504 IMPL_XMLOBJECT_CONTENT;
505 IMPL_STRING_ATTRIB(Namespace);
508 void marshallAttributes(DOMElement* domElement) const {
509 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
512 void processAttribute(const DOMAttr* attribute) {
513 PROC_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
514 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
518 class SAML_DLLLOCAL KeyDescriptorImpl : public virtual KeyDescriptor,
519 public AbstractComplexElement,
520 public AbstractDOMCachingXMLObject,
521 public AbstractXMLObjectMarshaller,
522 public AbstractXMLObjectUnmarshaller
527 m_children.push_back(NULL);
528 m_pos_KeyInfo=m_children.begin();
531 virtual ~KeyDescriptorImpl() {
532 XMLString::release(&m_Use);
535 KeyDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
536 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
540 KeyDescriptorImpl(const KeyDescriptorImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
542 setUse(src.getUse());
543 if (src.getKeyInfo())
544 setKeyInfo(src.getKeyInfo()->cloneKeyInfo());
545 VectorOf(EncryptionMethod) v=getEncryptionMethods();
546 for (vector<EncryptionMethod*>::const_iterator i=src.m_EncryptionMethods.begin(); i!=src.m_EncryptionMethods.end(); i++) {
548 v.push_back((*i)->cloneEncryptionMethod());
553 IMPL_XMLOBJECT_CLONE(KeyDescriptor);
554 IMPL_STRING_ATTRIB(Use);
555 IMPL_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature);
556 IMPL_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,m_children.end());
559 void marshallAttributes(DOMElement* domElement) const {
560 MARSHALL_STRING_ATTRIB(Use,USE,NULL);
563 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
564 PROC_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature,XMLConstants::XMLSIG_NS,false);
565 PROC_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,SAMLConstants::SAML20MD_NS,false);
566 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
569 void processAttribute(const DOMAttr* attribute) {
570 PROC_STRING_ATTRIB(Use,USE,NULL);
571 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
575 class SAML_DLLLOCAL EndpointTypeImpl : public virtual EndpointType,
576 public AbstractElementProxy,
577 public AbstractAttributeExtensibleXMLObject,
578 public AbstractDOMCachingXMLObject,
579 public AbstractXMLObjectMarshaller,
580 public AbstractXMLObjectUnmarshaller
583 m_Binding=m_Location=m_ResponseLocation=NULL;
592 virtual ~EndpointTypeImpl() {
593 XMLString::release(&m_Binding);
594 XMLString::release(&m_Location);
595 XMLString::release(&m_ResponseLocation);
598 EndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
599 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
602 EndpointTypeImpl(const EndpointTypeImpl& src)
603 : AbstractXMLObject(src), AbstractElementProxy(src),
604 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
605 setBinding(src.getBinding());
606 setLocation(src.getLocation());
607 setResponseLocation(src.getResponseLocation());
608 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
610 getXMLObjects().push_back((*i)->clone());
615 IMPL_XMLOBJECT_CLONE(EndpointType);
616 IMPL_STRING_ATTRIB(Binding);
617 IMPL_STRING_ATTRIB(Location);
618 IMPL_STRING_ATTRIB(ResponseLocation);
620 void setAttribute(QName& qualifiedName, const XMLCh* value) {
621 if (!qualifiedName.hasNamespaceURI()) {
622 if (XMLString::equals(qualifiedName.getLocalPart(),BINDING_ATTRIB_NAME)) {
626 else if (XMLString::equals(qualifiedName.getLocalPart(),LOCATION_ATTRIB_NAME)) {
630 else if (XMLString::equals(qualifiedName.getLocalPart(),RESPONSELOCATION_ATTRIB_NAME)) {
631 setResponseLocation(value);
635 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value);
638 void marshallAttributes(DOMElement* domElement) const {
639 MARSHALL_STRING_ATTRIB(Binding,BINDING,NULL);
640 MARSHALL_STRING_ATTRIB(Location,LOCATION,NULL);
641 MARSHALL_STRING_ATTRIB(ResponseLocation,RESPONSELOCATION,NULL);
643 // Take care of wildcard.
644 for (map<QName,XMLCh*>::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) {
645 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart());
646 if (i->first.hasPrefix())
647 attr->setPrefix(i->first.getPrefix());
648 attr->setNodeValue(i->second);
649 domElement->setAttributeNode(attr);
653 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
655 const XMLCh* nsURI=root->getNamespaceURI();
656 if (!XMLString::equals(nsURI,SAMLConstants::SAML20MD_NS) && nsURI && *nsURI) {
657 getXMLObjects().push_back(childXMLObject);
661 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
664 void processAttribute(const DOMAttr* attribute) {
665 QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix());
666 setAttribute(q,attribute->getNodeValue());
670 class SAML_DLLLOCAL IndexedEndpointTypeImpl : public virtual IndexedEndpointType, public EndpointTypeImpl
674 m_isDefault=XMLConstants::XML_BOOL_NULL;
678 IndexedEndpointTypeImpl() {
682 virtual ~IndexedEndpointTypeImpl() {
683 XMLString::release(&m_Index);
686 IndexedEndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
687 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
689 IndexedEndpointTypeImpl(const IndexedEndpointTypeImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {
690 setIndex(src.m_Index);
691 isDefault(src.m_isDefault);
694 IMPL_XMLOBJECT_CLONE(IndexedEndpointType);
695 EndpointType* cloneEndpointType() const {
696 return new IndexedEndpointTypeImpl(*this);
699 IMPL_INTEGER_ATTRIB(Index);
700 IMPL_BOOLEAN_ATTRIB(isDefault);
702 void setAttribute(QName& qualifiedName, const XMLCh* value) {
703 if (!qualifiedName.hasNamespaceURI()) {
704 if (XMLString::equals(qualifiedName.getLocalPart(),INDEX_ATTRIB_NAME)) {
708 else if (XMLString::equals(qualifiedName.getLocalPart(),ISDEFAULT_ATTRIB_NAME)) {
713 EndpointTypeImpl::setAttribute(qualifiedName, value);
717 void marshallAttributes(DOMElement* domElement) const {
718 MARSHALL_INTEGER_ATTRIB(Index,INDEX,NULL);
719 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
720 EndpointTypeImpl::marshallAttributes(domElement);
724 class SAML_DLLLOCAL ArtifactResolutionServiceImpl : public virtual ArtifactResolutionService, public IndexedEndpointTypeImpl
727 virtual ~ArtifactResolutionServiceImpl() {}
729 ArtifactResolutionServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
730 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
732 ArtifactResolutionServiceImpl(const ArtifactResolutionServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
734 IMPL_XMLOBJECT_CLONE(ArtifactResolutionService);
735 IndexedEndpointType* cloneIndexedEndpointType() const {
736 return new ArtifactResolutionServiceImpl(*this);
738 EndpointType* cloneEndpointType() const {
739 return new ArtifactResolutionServiceImpl(*this);
743 class SAML_DLLLOCAL SingleLogoutServiceImpl : public virtual SingleLogoutService, public EndpointTypeImpl
746 virtual ~SingleLogoutServiceImpl() {}
748 SingleLogoutServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
749 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
751 SingleLogoutServiceImpl(const SingleLogoutServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
753 IMPL_XMLOBJECT_CLONE(SingleLogoutService);
754 EndpointType* cloneEndpointType() const {
755 return new SingleLogoutServiceImpl(*this);
759 class SAML_DLLLOCAL ManageNameIDServiceImpl : public virtual ManageNameIDService, public EndpointTypeImpl
762 virtual ~ManageNameIDServiceImpl() {}
764 ManageNameIDServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
765 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
767 ManageNameIDServiceImpl(const ManageNameIDServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
769 IMPL_XMLOBJECT_CLONE(ManageNameIDService);
770 EndpointType* cloneEndpointType() const {
771 return new ManageNameIDServiceImpl(*this);
775 class SAML_DLLLOCAL SingleSignOnServiceImpl : public virtual SingleSignOnService, public EndpointTypeImpl
778 virtual ~SingleSignOnServiceImpl() {}
780 SingleSignOnServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
781 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
783 SingleSignOnServiceImpl(const SingleSignOnServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
785 IMPL_XMLOBJECT_CLONE(SingleSignOnService);
786 EndpointType* cloneEndpointType() const {
787 return new SingleSignOnServiceImpl(*this);
791 class SAML_DLLLOCAL NameIDMappingServiceImpl : public virtual NameIDMappingService, public EndpointTypeImpl
794 virtual ~NameIDMappingServiceImpl() {}
796 NameIDMappingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
797 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
799 NameIDMappingServiceImpl(const NameIDMappingServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
801 IMPL_XMLOBJECT_CLONE(NameIDMappingService);
802 EndpointType* cloneEndpointType() const {
803 return new NameIDMappingServiceImpl(*this);
807 class SAML_DLLLOCAL AssertionIDRequestServiceImpl : public virtual AssertionIDRequestService, public EndpointTypeImpl
810 virtual ~AssertionIDRequestServiceImpl() {}
812 AssertionIDRequestServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
813 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
815 AssertionIDRequestServiceImpl(const AssertionIDRequestServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
817 IMPL_XMLOBJECT_CLONE(AssertionIDRequestService);
818 EndpointType* cloneEndpointType() const {
819 return new AssertionIDRequestServiceImpl(*this);
823 class SAML_DLLLOCAL AssertionConsumerServiceImpl : public virtual AssertionConsumerService, public IndexedEndpointTypeImpl
826 virtual ~AssertionConsumerServiceImpl() {}
828 AssertionConsumerServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
829 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
831 AssertionConsumerServiceImpl(const AssertionConsumerServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
833 IMPL_XMLOBJECT_CLONE(AssertionConsumerService);
834 EndpointType* cloneEndpointType() const {
835 return new AssertionConsumerServiceImpl(*this);
837 IndexedEndpointType* cloneIndexedEndpointType() const {
838 return new AssertionConsumerServiceImpl(*this);
842 class SAML_DLLLOCAL AuthnQueryServiceImpl : public virtual AuthnQueryService, public EndpointTypeImpl
845 virtual ~AuthnQueryServiceImpl() {}
847 AuthnQueryServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
848 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
850 AuthnQueryServiceImpl(const AuthnQueryServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
852 IMPL_XMLOBJECT_CLONE(AuthnQueryService);
853 EndpointType* cloneEndpointType() const {
854 return new AuthnQueryServiceImpl(*this);
858 class SAML_DLLLOCAL AuthzServiceImpl : public virtual AuthzService, public EndpointTypeImpl
861 virtual ~AuthzServiceImpl() {}
863 AuthzServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
864 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
866 AuthzServiceImpl(const AuthzServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
868 IMPL_XMLOBJECT_CLONE(AuthzService);
869 EndpointType* cloneEndpointType() const {
870 return new AuthzServiceImpl(*this);
874 class SAML_DLLLOCAL AttributeServiceImpl : public virtual AttributeService, public EndpointTypeImpl
877 virtual ~AttributeServiceImpl() {}
879 AttributeServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
880 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
882 AttributeServiceImpl(const AttributeServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
884 IMPL_XMLOBJECT_CLONE(AttributeService);
885 EndpointType* cloneEndpointType() const {
886 return new AttributeServiceImpl(*this);
890 class SAML_DLLLOCAL RoleDescriptorImpl : public virtual RoleDescriptor,
891 public virtual SignableObject,
892 public AbstractComplexElement,
893 public AbstractAttributeExtensibleXMLObject,
894 public AbstractDOMCachingXMLObject,
895 public AbstractXMLObjectMarshaller,
896 public AbstractXMLObjectUnmarshaller
899 m_ID=m_ProtocolSupportEnumeration=m_ErrorURL=NULL;
900 m_ValidUntil=m_CacheDuration=NULL;
901 m_children.push_back(NULL);
902 m_children.push_back(NULL);
903 m_children.push_back(NULL);
904 m_children.push_back(NULL);
908 m_pos_Signature=m_children.begin();
909 m_pos_Extensions=m_pos_Signature;
911 m_pos_Organization=m_pos_Extensions;
912 ++m_pos_Organization;
913 m_pos_ContactPerson=m_pos_Organization;
914 ++m_pos_ContactPerson;
918 list<XMLObject*>::iterator m_pos_ContactPerson;
920 RoleDescriptorImpl() {
925 virtual ~RoleDescriptorImpl() {
926 XMLString::release(&m_ID);
927 XMLString::release(&m_ProtocolSupportEnumeration);
928 XMLString::release(&m_ErrorURL);
930 delete m_CacheDuration;
933 RoleDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
934 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
938 RoleDescriptorImpl(const RoleDescriptorImpl& src)
939 : AbstractXMLObject(src), AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
942 setProtocolSupportEnumeration(src.getProtocolSupportEnumeration());
943 setErrorURL(src.getErrorURL());
944 setValidUntil(src.getValidUntil());
945 setCacheDuration(src.getCacheDuration());
946 if (src.getSignature())
947 setSignature(src.getSignature()->cloneSignature());
948 if (src.getExtensions())
949 setExtensions(src.getExtensions()->cloneExtensions());
950 if (src.getOrganization())
951 setOrganization(src.getOrganization()->cloneOrganization());
953 VectorOf(KeyDescriptor) v=getKeyDescriptors();
954 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
956 v.push_back((*i)->cloneKeyDescriptor());
959 VectorOf(ContactPerson) w=getContactPersons();
960 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
962 w.push_back((*j)->cloneContactPerson());
967 const XMLCh* getId() const {
971 //IMPL_TYPED_CHILD(Signature);
972 // Need customized setter.
974 Signature* m_Signature;
975 list<XMLObject*>::iterator m_pos_Signature;
977 Signature* getSignature() const {
981 void setSignature(Signature* sig) {
982 prepareForAssignment(m_Signature,sig);
983 *m_pos_Signature=m_Signature=sig;
984 // Sync content reference back up.
986 m_Signature->setContentReference(new opensaml::ContentReference(*this));
989 IMPL_STRING_ATTRIB(ID);
990 IMPL_STRING_ATTRIB(ProtocolSupportEnumeration);
991 IMPL_STRING_ATTRIB(ErrorURL);
992 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
993 IMPL_DATETIME_ATTRIB(CacheDuration,0);
994 IMPL_TYPED_CHILD(Extensions);
995 IMPL_TYPED_CHILDREN(KeyDescriptor,m_pos_Organization);
996 IMPL_TYPED_CHILD(Organization);
997 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
999 bool hasSupport(const XMLCh* protocol) const {
1000 if (m_ProtocolSupportEnumeration) {
1001 // Look for first character.
1002 unsigned int len=XMLString::stringLen(protocol);
1004 int index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
1006 // Only possible match is if it's the first character or a space comes before it.
1007 if (index==0 || m_ProtocolSupportEnumeration[index-1]==chSpace) {
1008 // See if rest of protocol string is present.
1009 if (0==XMLString::compareNString(m_ProtocolSupportEnumeration+index+1,protocol+1,len-1)) {
1010 // Only possible match is if it's the last character or a space comes after it.
1011 if (m_ProtocolSupportEnumeration[index+len]==chNull || m_ProtocolSupportEnumeration[index+len]==chSpace)
1017 // Move past last search and start again.
1022 // Move past last search and start again.
1025 index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
1031 void setAttribute(QName& qualifiedName, const XMLCh* value) {
1032 if (!qualifiedName.hasNamespaceURI()) {
1033 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
1037 else if (XMLString::equals(qualifiedName.getLocalPart(),PROTOCOLSUPPORTENUMERATION_ATTRIB_NAME)) {
1038 setProtocolSupportEnumeration(value);
1041 else if (XMLString::equals(qualifiedName.getLocalPart(),ERRORURL_ATTRIB_NAME)) {
1045 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
1046 setValidUntil(value);
1049 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
1050 setCacheDuration(value);
1054 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value);
1058 void marshallAttributes(DOMElement* domElement) const {
1059 MARSHALL_ID_ATTRIB(ID,ID,NULL);
1060 MARSHALL_STRING_ATTRIB(ProtocolSupportEnumeration,PROTOCOLSUPPORTENUMERATION,NULL);
1061 MARSHALL_STRING_ATTRIB(ErrorURL,ERRORURL,NULL);
1062 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
1063 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
1065 // Take care of wildcard.
1066 for (map<QName,XMLCh*>::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) {
1067 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart());
1068 if (i->first.hasPrefix())
1069 attr->setPrefix(i->first.getPrefix());
1070 attr->setNodeValue(i->second);
1071 domElement->setAttributeNode(attr);
1075 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1076 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLConstants::XMLSIG_NS,false);
1077 PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20MD_NS,false);
1078 PROC_TYPED_CHILDREN(KeyDescriptor,SAMLConstants::SAML20MD_NS,false);
1079 PROC_TYPED_CHILD(Organization,SAMLConstants::SAML20MD_NS,false);
1080 PROC_TYPED_CHILDREN(ContactPerson,SAMLConstants::SAML20MD_NS,false);
1081 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1084 void processAttribute(const DOMAttr* attribute) {
1085 PROC_ID_ATTRIB(ID,ID,NULL);
1086 QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix());
1087 setAttribute(q,attribute->getNodeValue());
1091 class SAML_DLLLOCAL SSODescriptorTypeImpl : public virtual SSODescriptorType, public RoleDescriptorImpl
1094 m_children.push_back(NULL);
1095 m_children.push_back(NULL);
1096 m_children.push_back(NULL);
1097 m_children.push_back(NULL);
1098 m_pos_ArtifactResolutionService=m_pos_ContactPerson;
1099 ++m_pos_ArtifactResolutionService;
1100 m_pos_SingleLogoutService=m_pos_ArtifactResolutionService;
1101 ++m_pos_SingleLogoutService;
1102 m_pos_ManageNameIDService=m_pos_SingleLogoutService;
1103 ++m_pos_ManageNameIDService;
1104 m_pos_NameIDFormat=m_pos_ManageNameIDService;
1105 ++m_pos_NameIDFormat;
1109 list<XMLObject*>::iterator m_pos_ArtifactResolutionService;
1110 list<XMLObject*>::iterator m_pos_SingleLogoutService;
1111 list<XMLObject*>::iterator m_pos_ManageNameIDService;
1112 list<XMLObject*>::iterator m_pos_NameIDFormat;
1114 SSODescriptorTypeImpl() {
1119 virtual ~SSODescriptorTypeImpl() {}
1121 SSODescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1122 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1126 SSODescriptorTypeImpl(const SSODescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1128 VectorOf(ArtifactResolutionService) v=getArtifactResolutionServices();
1129 for (vector<ArtifactResolutionService*>::const_iterator i=src.m_ArtifactResolutionServices.begin(); i!=src.m_ArtifactResolutionServices.end(); i++) {
1131 v.push_back((*i)->cloneArtifactResolutionService());
1134 VectorOf(SingleLogoutService) w=getSingleLogoutServices();
1135 for (vector<SingleLogoutService*>::const_iterator j=src.m_SingleLogoutServices.begin(); j!=src.m_SingleLogoutServices.end(); j++) {
1137 w.push_back((*j)->cloneSingleLogoutService());
1140 VectorOf(ManageNameIDService) x=getManageNameIDServices();
1141 for (vector<ManageNameIDService*>::const_iterator k=src.m_ManageNameIDServices.begin(); k!=src.m_ManageNameIDServices.end(); k++) {
1143 x.push_back((*k)->cloneManageNameIDService());
1146 VectorOf(NameIDFormat) y=getNameIDFormats();
1147 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1149 y.push_back((*m)->cloneNameIDFormat());
1154 IMPL_TYPED_CHILDREN(ArtifactResolutionService,m_pos_ArtifactResolutionService);
1155 IMPL_TYPED_CHILDREN(SingleLogoutService,m_pos_SingleLogoutService);
1156 IMPL_TYPED_CHILDREN(ManageNameIDService,m_pos_ManageNameIDService);
1157 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1160 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1161 PROC_TYPED_CHILDREN(ArtifactResolutionService,SAMLConstants::SAML20MD_NS,false);
1162 PROC_TYPED_CHILDREN(SingleLogoutService,SAMLConstants::SAML20MD_NS,false);
1163 PROC_TYPED_CHILDREN(ManageNameIDService,SAMLConstants::SAML20MD_NS,false);
1164 PROC_TYPED_CHILDREN(NameIDFormat,SAMLConstants::SAML20MD_NS,false);
1165 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1169 class SAML_DLLLOCAL IDPSSODescriptorImpl : public virtual IDPSSODescriptor, public SSODescriptorTypeImpl
1171 list<XMLObject*>::iterator m_pos_SingleSignOnService;
1172 list<XMLObject*>::iterator m_pos_NameIDMappingService;
1173 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1174 list<XMLObject*>::iterator m_pos_AttributeProfile;
1177 m_WantAuthnRequestsSigned=XMLConstants::XML_BOOL_NULL;
1178 m_children.push_back(NULL);
1179 m_children.push_back(NULL);
1180 m_children.push_back(NULL);
1181 m_children.push_back(NULL);
1182 m_pos_SingleSignOnService=m_pos_NameIDFormat;
1183 ++m_pos_SingleSignOnService;
1184 m_pos_NameIDMappingService=m_pos_SingleSignOnService;
1185 ++m_pos_NameIDMappingService;
1186 m_pos_AssertionIDRequestService=m_pos_NameIDMappingService;
1187 ++m_pos_AssertionIDRequestService;
1188 m_pos_AttributeProfile=m_pos_AssertionIDRequestService;
1189 ++m_pos_AttributeProfile;
1193 virtual ~IDPSSODescriptorImpl() {}
1195 IDPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1196 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1200 IDPSSODescriptorImpl(const IDPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1202 WantAuthnRequestsSigned(src.m_WantAuthnRequestsSigned);
1203 VectorOf(SingleSignOnService) v=getSingleSignOnServices();
1204 for (vector<SingleSignOnService*>::const_iterator i=src.m_SingleSignOnServices.begin(); i!=src.m_SingleSignOnServices.end(); i++) {
1206 v.push_back((*i)->cloneSingleSignOnService());
1209 VectorOf(NameIDMappingService) w=getNameIDMappingServices();
1210 for (vector<NameIDMappingService*>::const_iterator j=src.m_NameIDMappingServices.begin(); j!=src.m_NameIDMappingServices.end(); j++) {
1212 w.push_back((*j)->cloneNameIDMappingService());
1215 VectorOf(AssertionIDRequestService) x=getAssertionIDRequestServices();
1216 for (vector<AssertionIDRequestService*>::const_iterator k=src.m_AssertionIDRequestServices.begin(); k!=src.m_AssertionIDRequestServices.end(); k++) {
1218 x.push_back((*k)->cloneAssertionIDRequestService());
1221 VectorOf(AttributeProfile) y=getAttributeProfiles();
1222 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1224 y.push_back((*m)->cloneAttributeProfile());
1227 VectorOf(Attribute) z=getAttributes();
1228 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1230 z.push_back((*n)->cloneAttribute());
1235 IMPL_XMLOBJECT_CLONE(IDPSSODescriptor);
1236 SSODescriptorType* cloneSSODescriptorType() const {
1237 return new IDPSSODescriptorImpl(*this);
1239 RoleDescriptor* cloneRoleDescriptor() const {
1240 return new IDPSSODescriptorImpl(*this);
1243 IMPL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned);
1244 IMPL_TYPED_CHILDREN(SingleSignOnService,m_pos_SingleSignOnService);
1245 IMPL_TYPED_CHILDREN(NameIDMappingService,m_pos_NameIDMappingService);
1246 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1247 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1248 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1250 void setAttribute(QName& qualifiedName, const XMLCh* value) {
1251 if (!qualifiedName.hasNamespaceURI()) {
1252 if (XMLString::equals(qualifiedName.getLocalPart(),WANTAUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1253 setWantAuthnRequestsSigned(value);
1257 RoleDescriptorImpl::setAttribute(qualifiedName, value);
1261 void marshallAttributes(DOMElement* domElement) const {
1262 MARSHALL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned,WANTAUTHNREQUESTSSIGNED,NULL);
1263 RoleDescriptorImpl::marshallAttributes(domElement);
1266 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1267 PROC_TYPED_CHILDREN(SingleSignOnService,SAMLConstants::SAML20MD_NS,false);
1268 PROC_TYPED_CHILDREN(NameIDMappingService,SAMLConstants::SAML20MD_NS,false);
1269 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAMLConstants::SAML20MD_NS,false);
1270 PROC_TYPED_CHILDREN(AttributeProfile,SAMLConstants::SAML20MD_NS,false);
1271 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAMLConstants::SAML20_NS,false);
1272 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1276 class SAML_DLLLOCAL RequestedAttributeImpl : public virtual RequestedAttribute,
1277 public AbstractComplexElement,
1278 public AbstractAttributeExtensibleXMLObject,
1279 public AbstractDOMCachingXMLObject,
1280 public AbstractXMLObjectMarshaller,
1281 public AbstractXMLObjectUnmarshaller
1284 m_Name=m_NameFormat=m_FriendlyName=NULL;
1285 m_isRequired=XMLConstants::XML_BOOL_NULL;
1288 virtual ~RequestedAttributeImpl() {
1289 XMLString::release(&m_Name);
1290 XMLString::release(&m_NameFormat);
1291 XMLString::release(&m_FriendlyName);
1294 RequestedAttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1295 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1299 RequestedAttributeImpl(const RequestedAttributeImpl& src)
1300 : AbstractXMLObject(src), AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1302 setName(src.getName());
1303 setNameFormat(src.getNameFormat());
1304 setFriendlyName(src.getFriendlyName());
1305 isRequired(src.m_isRequired);
1306 VectorOf(XMLObject) v=getAttributeValues();
1307 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
1309 v.push_back((*i)->clone());
1314 IMPL_XMLOBJECT_CLONE(RequestedAttribute);
1315 Attribute* cloneAttribute() const {
1316 return new RequestedAttributeImpl(*this);
1319 IMPL_STRING_ATTRIB(Name);
1320 IMPL_STRING_ATTRIB(NameFormat);
1321 IMPL_STRING_ATTRIB(FriendlyName);
1322 IMPL_BOOLEAN_ATTRIB(isRequired);
1323 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
1325 void setAttribute(QName& qualifiedName, const XMLCh* value) {
1326 if (!qualifiedName.hasNamespaceURI()) {
1327 if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) {
1331 else if (XMLString::equals(qualifiedName.getLocalPart(),NAMEFORMAT_ATTRIB_NAME)) {
1332 setNameFormat(value);
1335 else if (XMLString::equals(qualifiedName.getLocalPart(),FRIENDLYNAME_ATTRIB_NAME)) {
1336 setFriendlyName(value);
1339 else if (XMLString::equals(qualifiedName.getLocalPart(),ISREQUIRED_ATTRIB_NAME)) {
1340 setisRequired(value);
1344 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value);
1348 void marshallAttributes(DOMElement* domElement) const {
1349 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
1350 MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,NULL);
1351 MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,NULL);
1352 MARSHALL_BOOLEAN_ATTRIB(isRequired,ISREQUIRED,NULL);
1354 // Take care of wildcard.
1355 for (map<QName,XMLCh*>::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) {
1356 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart());
1357 if (i->first.hasPrefix())
1358 attr->setPrefix(i->first.getPrefix());
1359 attr->setNodeValue(i->second);
1360 domElement->setAttributeNode(attr);
1364 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1365 getAttributeValues().push_back(childXMLObject);
1368 void processAttribute(const DOMAttr* attribute) {
1369 QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix());
1370 setAttribute(q,attribute->getNodeValue());
1374 class SAML_DLLLOCAL AttributeConsumingServiceImpl : public virtual AttributeConsumingService,
1375 public AbstractComplexElement,
1376 public AbstractDOMCachingXMLObject,
1377 public AbstractXMLObjectMarshaller,
1378 public AbstractXMLObjectUnmarshaller
1380 list<XMLObject*>::iterator m_pos_ServiceDescription;
1381 list<XMLObject*>::iterator m_pos_RequestedAttribute;
1385 m_isDefault=XMLConstants::XML_BOOL_NULL;
1386 m_children.push_back(NULL);
1387 m_children.push_back(NULL);
1388 m_pos_ServiceDescription=m_children.begin();
1389 m_pos_RequestedAttribute=m_pos_ServiceDescription;
1390 ++m_pos_RequestedAttribute;
1394 virtual ~AttributeConsumingServiceImpl() {
1395 XMLString::release(&m_Index);
1398 AttributeConsumingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1399 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1403 AttributeConsumingServiceImpl(const AttributeConsumingServiceImpl& src)
1404 : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
1406 setIndex(src.m_Index);
1407 isDefault(src.m_isDefault);
1408 VectorOf(ServiceName) v=getServiceNames();
1409 for (vector<ServiceName*>::const_iterator i=src.m_ServiceNames.begin(); i!=src.m_ServiceNames.end(); i++) {
1411 v.push_back((*i)->cloneServiceName());
1414 VectorOf(ServiceDescription) w=getServiceDescriptions();
1415 for (vector<ServiceDescription*>::const_iterator j=src.m_ServiceDescriptions.begin(); j!=src.m_ServiceDescriptions.end(); j++) {
1417 w.push_back((*j)->cloneServiceDescription());
1420 VectorOf(RequestedAttribute) x=getRequestedAttributes();
1421 for (vector<RequestedAttribute*>::const_iterator k=src.m_RequestedAttributes.begin(); k!=src.m_RequestedAttributes.end(); k++) {
1423 x.push_back((*k)->cloneRequestedAttribute());
1428 IMPL_XMLOBJECT_CLONE(AttributeConsumingService);
1429 IMPL_INTEGER_ATTRIB(Index);
1430 IMPL_BOOLEAN_ATTRIB(isDefault);
1431 IMPL_TYPED_CHILDREN(ServiceName,m_pos_ServiceDescription);
1432 IMPL_TYPED_CHILDREN(ServiceDescription,m_pos_RequestedAttribute);
1433 IMPL_TYPED_CHILDREN(RequestedAttribute,m_children.end());
1436 void marshallAttributes(DOMElement* domElement) const {
1437 MARSHALL_INTEGER_ATTRIB(Index,INDEX,NULL);
1438 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
1441 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1442 PROC_TYPED_CHILDREN(ServiceName,SAMLConstants::SAML20MD_NS,false);
1443 PROC_TYPED_CHILDREN(ServiceDescription,SAMLConstants::SAML20MD_NS,false);
1444 PROC_TYPED_CHILDREN(RequestedAttribute,SAMLConstants::SAML20MD_NS,false);
1445 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1448 void processAttribute(const DOMAttr* attribute) {
1449 PROC_INTEGER_ATTRIB(Index,INDEX,NULL);
1450 PROC_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
1451 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1455 class SAML_DLLLOCAL SPSSODescriptorImpl : public virtual SPSSODescriptor, public SSODescriptorTypeImpl
1457 list<XMLObject*>::iterator m_pos_AssertionConsumerService;
1460 m_AuthnRequestsSigned=XMLConstants::XML_BOOL_NULL;
1461 m_WantAssertionsSigned=XMLConstants::XML_BOOL_NULL;
1462 m_children.push_back(NULL);
1463 m_pos_AssertionConsumerService=m_pos_NameIDFormat;
1464 ++m_pos_AssertionConsumerService;
1468 virtual ~SPSSODescriptorImpl() {}
1470 SPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1471 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1475 SPSSODescriptorImpl(const SPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1477 AuthnRequestsSigned(src.m_AuthnRequestsSigned);
1478 WantAssertionsSigned(src.m_WantAssertionsSigned);
1479 VectorOf(AssertionConsumerService) v=getAssertionConsumerServices();
1480 for (vector<AssertionConsumerService*>::const_iterator i=src.m_AssertionConsumerServices.begin(); i!=src.m_AssertionConsumerServices.end(); i++) {
1482 v.push_back((*i)->cloneAssertionConsumerService());
1485 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1486 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1488 w.push_back((*j)->cloneAttributeConsumingService());
1493 IMPL_XMLOBJECT_CLONE(SPSSODescriptor);
1494 SSODescriptorType* cloneSSODescriptorType() const {
1495 return cloneSPSSODescriptor();
1497 RoleDescriptor* cloneRoleDescriptor() const {
1498 return cloneSPSSODescriptor();
1501 IMPL_BOOLEAN_ATTRIB(AuthnRequestsSigned);
1502 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1503 IMPL_TYPED_CHILDREN(AssertionConsumerService,m_pos_AssertionConsumerService);
1504 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1506 void setAttribute(QName& qualifiedName, const XMLCh* value) {
1507 if (!qualifiedName.hasNamespaceURI()) {
1508 if (XMLString::equals(qualifiedName.getLocalPart(),AUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1509 setAuthnRequestsSigned(value);
1512 else if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1513 setWantAssertionsSigned(value);
1517 RoleDescriptorImpl::setAttribute(qualifiedName, value);
1521 void marshallAttributes(DOMElement* domElement) const {
1522 MARSHALL_BOOLEAN_ATTRIB(AuthnRequestsSigned,AUTHNREQUESTSSIGNED,NULL);
1523 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,NULL);
1524 RoleDescriptorImpl::marshallAttributes(domElement);
1527 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1528 PROC_TYPED_CHILDREN(AssertionConsumerService,SAMLConstants::SAML20MD_NS,false);
1529 PROC_TYPED_CHILDREN(AttributeConsumingService,SAMLConstants::SAML20MD_NS,false);
1530 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1534 class SAML_DLLLOCAL AuthnAuthorityDescriptorImpl : public virtual AuthnAuthorityDescriptor, public RoleDescriptorImpl
1536 list<XMLObject*>::iterator m_pos_AuthnQueryService;
1537 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1540 m_children.push_back(NULL);
1541 m_children.push_back(NULL);
1542 m_pos_AuthnQueryService=m_pos_ContactPerson;
1543 ++m_pos_AuthnQueryService;
1544 m_pos_AssertionIDRequestService=m_pos_AuthnQueryService;
1545 ++m_pos_AssertionIDRequestService;
1549 virtual ~AuthnAuthorityDescriptorImpl() {}
1551 AuthnAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1552 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1556 AuthnAuthorityDescriptorImpl(const AuthnAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1558 VectorOf(AuthnQueryService) v=getAuthnQueryServices();
1559 for (vector<AuthnQueryService*>::const_iterator i=src.m_AuthnQueryServices.begin(); i!=src.m_AuthnQueryServices.end(); i++) {
1561 v.push_back((*i)->cloneAuthnQueryService());
1564 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1565 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1567 w.push_back((*j)->cloneAssertionIDRequestService());
1570 VectorOf(NameIDFormat) x=getNameIDFormats();
1571 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1573 x.push_back((*k)->cloneNameIDFormat());
1578 IMPL_XMLOBJECT_CLONE(AuthnAuthorityDescriptor);
1579 RoleDescriptor* cloneRoleDescriptor() const {
1580 return cloneAuthnAuthorityDescriptor();
1583 IMPL_TYPED_CHILDREN(AuthnQueryService,m_pos_AuthnQueryService);
1584 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1585 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1588 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1589 PROC_TYPED_CHILDREN(AuthnQueryService,SAMLConstants::SAML20MD_NS,false);
1590 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAMLConstants::SAML20MD_NS,false);
1591 PROC_TYPED_CHILDREN(NameIDFormat,SAMLConstants::SAML20MD_NS,false);
1592 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1596 class SAML_DLLLOCAL PDPDescriptorImpl : public virtual PDPDescriptor, public RoleDescriptorImpl
1598 list<XMLObject*>::iterator m_pos_AuthzService;
1599 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1602 m_children.push_back(NULL);
1603 m_children.push_back(NULL);
1604 m_pos_AuthzService=m_pos_ContactPerson;
1605 ++m_pos_AuthzService;
1606 m_pos_AssertionIDRequestService=m_pos_AuthzService;
1607 ++m_pos_AssertionIDRequestService;
1611 virtual ~PDPDescriptorImpl() {}
1613 PDPDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1614 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1618 PDPDescriptorImpl(const PDPDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1620 VectorOf(AuthzService) v=getAuthzServices();
1621 for (vector<AuthzService*>::const_iterator i=src.m_AuthzServices.begin(); i!=src.m_AuthzServices.end(); i++) {
1623 v.push_back((*i)->cloneAuthzService());
1626 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1627 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1629 w.push_back((*j)->cloneAssertionIDRequestService());
1632 VectorOf(NameIDFormat) x=getNameIDFormats();
1633 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1635 x.push_back((*k)->cloneNameIDFormat());
1640 IMPL_XMLOBJECT_CLONE(PDPDescriptor);
1641 RoleDescriptor* cloneRoleDescriptor() const {
1642 return clonePDPDescriptor();
1645 IMPL_TYPED_CHILDREN(AuthzService,m_pos_AuthzService);
1646 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1647 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1650 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1651 PROC_TYPED_CHILDREN(AuthzService,SAMLConstants::SAML20MD_NS,false);
1652 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAMLConstants::SAML20MD_NS,false);
1653 PROC_TYPED_CHILDREN(NameIDFormat,SAMLConstants::SAML20MD_NS,false);
1654 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1658 class SAML_DLLLOCAL AttributeAuthorityDescriptorImpl : public virtual AttributeAuthorityDescriptor, public RoleDescriptorImpl
1660 list<XMLObject*>::iterator m_pos_AttributeService;
1661 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1662 list<XMLObject*>::iterator m_pos_NameIDFormat;
1663 list<XMLObject*>::iterator m_pos_AttributeProfile;
1666 m_children.push_back(NULL);
1667 m_children.push_back(NULL);
1668 m_children.push_back(NULL);
1669 m_children.push_back(NULL);
1670 m_pos_AttributeService=m_pos_ContactPerson;
1671 ++m_pos_AttributeService;
1672 m_pos_AssertionIDRequestService=m_pos_AttributeService;
1673 ++m_pos_AssertionIDRequestService;
1674 m_pos_NameIDFormat=m_pos_AssertionIDRequestService;
1675 ++m_pos_NameIDFormat;
1676 m_pos_AttributeProfile=m_pos_NameIDFormat;
1677 ++m_pos_AttributeProfile;
1681 virtual ~AttributeAuthorityDescriptorImpl() {}
1683 AttributeAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1684 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1688 AttributeAuthorityDescriptorImpl(const AttributeAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1690 VectorOf(AttributeService) v=getAttributeServices();
1691 for (vector<AttributeService*>::const_iterator i=src.m_AttributeServices.begin(); i!=src.m_AttributeServices.end(); i++) {
1693 v.push_back((*i)->cloneAttributeService());
1696 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1697 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1699 w.push_back((*j)->cloneAssertionIDRequestService());
1702 VectorOf(NameIDFormat) x=getNameIDFormats();
1703 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1705 x.push_back((*k)->cloneNameIDFormat());
1708 VectorOf(AttributeProfile) y=getAttributeProfiles();
1709 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1711 y.push_back((*m)->cloneAttributeProfile());
1714 VectorOf(Attribute) z=getAttributes();
1715 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1717 z.push_back((*n)->cloneAttribute());
1722 IMPL_XMLOBJECT_CLONE(AttributeAuthorityDescriptor);
1723 RoleDescriptor* cloneRoleDescriptor() const {
1724 return cloneAttributeAuthorityDescriptor();
1727 IMPL_TYPED_CHILDREN(AttributeService,m_pos_AttributeService);
1728 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1729 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1730 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1731 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1734 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1735 PROC_TYPED_CHILDREN(AttributeService,SAMLConstants::SAML20MD_NS,false);
1736 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAMLConstants::SAML20MD_NS,false);
1737 PROC_TYPED_CHILDREN(NameIDFormat,SAMLConstants::SAML20MD_NS,false);
1738 PROC_TYPED_CHILDREN(AttributeProfile,SAMLConstants::SAML20MD_NS,false);
1739 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAMLConstants::SAML20_NS,false);
1740 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1744 class SAML_DLLLOCAL QueryDescriptorTypeImpl : public virtual QueryDescriptorType, public RoleDescriptorImpl
1747 m_WantAssertionsSigned=XMLConstants::XML_BOOL_NULL;
1748 m_children.push_back(NULL);
1749 m_pos_NameIDFormat=m_pos_ContactPerson;
1750 ++m_pos_NameIDFormat;
1754 list<XMLObject*>::iterator m_pos_NameIDFormat;
1756 QueryDescriptorTypeImpl() {
1761 virtual ~QueryDescriptorTypeImpl() {}
1763 QueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1764 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1768 QueryDescriptorTypeImpl(const QueryDescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1770 WantAssertionsSigned(src.m_WantAssertionsSigned);
1771 VectorOf(NameIDFormat) y=getNameIDFormats();
1772 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1774 y.push_back((*m)->cloneNameIDFormat());
1779 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1780 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1782 void setAttribute(QName& qualifiedName, const XMLCh* value) {
1783 if (!qualifiedName.hasNamespaceURI()) {
1784 if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1785 setWantAssertionsSigned(value);
1789 RoleDescriptorImpl::setAttribute(qualifiedName, value);
1793 void marshallAttributes(DOMElement* domElement) const {
1794 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,NULL);
1795 RoleDescriptorImpl::marshallAttributes(domElement);
1798 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1799 PROC_TYPED_CHILDREN(NameIDFormat,SAMLConstants::SAML20MD_NS,false);
1800 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1804 class SAML_DLLLOCAL AuthnQueryDescriptorTypeImpl : public virtual AuthnQueryDescriptorType, public QueryDescriptorTypeImpl
1807 virtual ~AuthnQueryDescriptorTypeImpl() {}
1809 AuthnQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1810 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1812 AuthnQueryDescriptorTypeImpl(const AuthnQueryDescriptorTypeImpl& src) : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {}
1814 IMPL_XMLOBJECT_CLONE(AuthnQueryDescriptorType);
1815 QueryDescriptorType* cloneQueryDescriptorType() const {
1816 return new AuthnQueryDescriptorTypeImpl(*this);
1818 RoleDescriptor* cloneRoleDescriptor() const {
1819 return new AuthnQueryDescriptorTypeImpl(*this);
1823 class SAML_DLLLOCAL AttributeQueryDescriptorTypeImpl : public virtual AttributeQueryDescriptorType, public QueryDescriptorTypeImpl
1826 virtual ~AttributeQueryDescriptorTypeImpl() {}
1828 AttributeQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1829 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1831 AttributeQueryDescriptorTypeImpl(const AttributeQueryDescriptorTypeImpl& src)
1832 : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1833 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1834 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1836 w.push_back((*j)->cloneAttributeConsumingService());
1841 IMPL_XMLOBJECT_CLONE(AttributeQueryDescriptorType);
1842 QueryDescriptorType* cloneQueryDescriptorType() const {
1843 return new AttributeQueryDescriptorTypeImpl(*this);
1845 RoleDescriptor* cloneRoleDescriptor() const {
1846 return new AttributeQueryDescriptorTypeImpl(*this);
1849 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1852 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1853 PROC_TYPED_CHILDREN(AttributeConsumingService,SAMLConstants::SAML20MD_NS,false);
1854 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1858 class SAML_DLLLOCAL AuthzDecisionQueryDescriptorTypeImpl : public virtual AuthzDecisionQueryDescriptorType, public QueryDescriptorTypeImpl
1861 virtual ~AuthzDecisionQueryDescriptorTypeImpl() {}
1863 AuthzDecisionQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1864 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1866 AuthzDecisionQueryDescriptorTypeImpl(const AuthzDecisionQueryDescriptorTypeImpl& src)
1867 : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1868 VectorOf(ActionNamespace) w=getActionNamespaces();
1869 for (vector<ActionNamespace*>::const_iterator j=src.m_ActionNamespaces.begin(); j!=src.m_ActionNamespaces.end(); j++) {
1871 w.push_back((*j)->cloneActionNamespace());
1876 IMPL_XMLOBJECT_CLONE(AuthzDecisionQueryDescriptorType);
1877 QueryDescriptorType* cloneQueryDescriptorType() const {
1878 return new AuthzDecisionQueryDescriptorTypeImpl(*this);
1880 RoleDescriptor* cloneRoleDescriptor() const {
1881 return new AuthzDecisionQueryDescriptorTypeImpl(*this);
1884 IMPL_TYPED_CHILDREN(ActionNamespace,m_children.end());
1887 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1888 PROC_TYPED_CHILDREN(ActionNamespace,SAMLConstants::SAML20MD_QUERY_EXT_NS,false);
1889 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1893 class SAML_DLLLOCAL AffiliationDescriptorImpl : public virtual AffiliationDescriptor,
1894 public virtual SignableObject,
1895 public AbstractComplexElement,
1896 public AbstractAttributeExtensibleXMLObject,
1897 public AbstractDOMCachingXMLObject,
1898 public AbstractXMLObjectMarshaller,
1899 public AbstractXMLObjectUnmarshaller
1901 list<XMLObject*>::iterator m_pos_AffiliateMember;
1904 m_ID=m_AffiliationOwnerID=NULL;
1905 m_ValidUntil=m_CacheDuration=NULL;
1906 m_children.push_back(NULL);
1907 m_children.push_back(NULL);
1908 m_children.push_back(NULL);
1911 m_pos_Signature=m_children.begin();
1912 m_pos_Extensions=m_pos_Signature;
1914 m_pos_AffiliateMember=m_pos_Extensions;
1915 ++m_pos_AffiliateMember;
1919 virtual ~AffiliationDescriptorImpl() {
1920 XMLString::release(&m_ID);
1921 XMLString::release(&m_AffiliationOwnerID);
1922 delete m_ValidUntil;
1923 delete m_CacheDuration;
1926 AffiliationDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1927 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1931 AffiliationDescriptorImpl(const AffiliationDescriptorImpl& src)
1932 : AbstractXMLObject(src), AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1935 setAffiliationOwnerID(src.getAffiliationOwnerID());
1936 setValidUntil(src.getValidUntil());
1937 setCacheDuration(src.getCacheDuration());
1938 if (src.getSignature())
1939 setSignature(src.getSignature()->cloneSignature());
1940 if (src.getExtensions())
1941 setExtensions(src.getExtensions()->cloneExtensions());
1943 VectorOf(KeyDescriptor) v=getKeyDescriptors();
1944 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
1946 v.push_back((*i)->cloneKeyDescriptor());
1949 VectorOf(AffiliateMember) w=getAffiliateMembers();
1950 for (vector<AffiliateMember*>::const_iterator j=src.m_AffiliateMembers.begin(); j!=src.m_AffiliateMembers.end(); j++) {
1952 w.push_back((*j)->cloneAffiliateMember());
1957 IMPL_XMLOBJECT_CLONE(AffiliationDescriptor);
1959 const XMLCh* getId() const {
1963 //IMPL_TYPED_CHILD(Signature);
1964 // Need customized setter.
1966 Signature* m_Signature;
1967 list<XMLObject*>::iterator m_pos_Signature;
1969 Signature* getSignature() const {
1973 void setSignature(Signature* sig) {
1974 prepareForAssignment(m_Signature,sig);
1975 *m_pos_Signature=m_Signature=sig;
1976 // Sync content reference back up.
1978 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1981 IMPL_STRING_ATTRIB(ID);
1982 IMPL_STRING_ATTRIB(AffiliationOwnerID);
1983 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
1984 IMPL_DATETIME_ATTRIB(CacheDuration,0);
1985 IMPL_TYPED_CHILD(Extensions);
1986 IMPL_TYPED_CHILDREN(AffiliateMember,m_pos_AffiliateMember);
1987 IMPL_TYPED_CHILDREN(KeyDescriptor,m_children.end());
1989 void setAttribute(QName& qualifiedName, const XMLCh* value) {
1990 if (!qualifiedName.hasNamespaceURI()) {
1991 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
1995 else if (XMLString::equals(qualifiedName.getLocalPart(),AFFILIATIONOWNERID_ATTRIB_NAME)) {
1996 setAffiliationOwnerID(value);
1999 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
2000 setValidUntil(value);
2003 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
2004 setCacheDuration(value);
2008 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value);
2012 void marshallAttributes(DOMElement* domElement) const {
2013 MARSHALL_ID_ATTRIB(ID,ID,NULL);
2014 MARSHALL_STRING_ATTRIB(AffiliationOwnerID,AFFILIATIONOWNERID,NULL);
2015 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2016 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2018 // Take care of wildcard.
2019 for (map<QName,XMLCh*>::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) {
2020 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart());
2021 if (i->first.hasPrefix())
2022 attr->setPrefix(i->first.getPrefix());
2023 attr->setNodeValue(i->second);
2024 domElement->setAttributeNode(attr);
2028 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2029 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLConstants::XMLSIG_NS,false);
2030 PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20MD_NS,false);
2031 PROC_TYPED_CHILDREN(AffiliateMember,SAMLConstants::SAML20MD_NS,false);
2032 PROC_TYPED_CHILDREN(KeyDescriptor,SAMLConstants::SAML20MD_NS,false);
2033 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2036 void processAttribute(const DOMAttr* attribute) {
2037 PROC_ID_ATTRIB(ID,ID,NULL);
2038 QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix());
2039 setAttribute(q,attribute->getNodeValue());
2043 class SAML_DLLLOCAL EntityDescriptorImpl : public virtual EntityDescriptor,
2044 public virtual SignableObject,
2045 public AbstractComplexElement,
2046 public AbstractAttributeExtensibleXMLObject,
2047 public AbstractDOMCachingXMLObject,
2048 public AbstractXMLObjectMarshaller,
2049 public AbstractXMLObjectUnmarshaller
2051 list<XMLObject*>::iterator m_pos_ContactPerson;
2054 m_ID=m_EntityID=NULL;
2055 m_ValidUntil=m_CacheDuration=NULL;
2056 m_children.push_back(NULL);
2057 m_children.push_back(NULL);
2058 m_children.push_back(NULL);
2059 m_children.push_back(NULL);
2060 m_children.push_back(NULL);
2063 m_AffiliationDescriptor=NULL;
2064 m_Organization=NULL;
2065 m_pos_Signature=m_children.begin();
2066 m_pos_Extensions=m_pos_Signature;
2068 m_pos_AffiliationDescriptor=m_pos_Extensions;
2069 ++m_pos_AffiliationDescriptor;
2070 m_pos_Organization=m_pos_AffiliationDescriptor;
2071 ++m_pos_Organization;
2072 m_pos_ContactPerson=m_pos_Organization;
2073 ++m_pos_ContactPerson;
2077 virtual ~EntityDescriptorImpl() {
2078 XMLString::release(&m_ID);
2079 XMLString::release(&m_EntityID);
2080 delete m_ValidUntil;
2081 delete m_CacheDuration;
2084 EntityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
2085 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2089 EntityDescriptorImpl(const EntityDescriptorImpl& src)
2090 : AbstractXMLObject(src), AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
2093 setEntityID(src.getEntityID());
2094 setValidUntil(src.getValidUntil());
2095 setCacheDuration(src.getCacheDuration());
2096 if (src.getSignature())
2097 setSignature(src.getSignature()->cloneSignature());
2098 if (src.getExtensions())
2099 setExtensions(src.getExtensions()->cloneExtensions());
2100 if (src.getAffiliationDescriptor())
2101 setAffiliationDescriptor(src.getAffiliationDescriptor()->cloneAffiliationDescriptor());
2102 if (src.getOrganization())
2103 setOrganization(src.getOrganization()->cloneOrganization());
2105 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2107 IDPSSODescriptor* idp=dynamic_cast<IDPSSODescriptor*>(*i);
2109 getIDPSSODescriptors().push_back(idp->cloneIDPSSODescriptor());
2113 SPSSODescriptor* sp=dynamic_cast<SPSSODescriptor*>(*i);
2115 getSPSSODescriptors().push_back(sp->cloneSPSSODescriptor());
2119 AuthnAuthorityDescriptor* authn=dynamic_cast<AuthnAuthorityDescriptor*>(*i);
2121 getAuthnAuthorityDescriptors().push_back(authn->cloneAuthnAuthorityDescriptor());
2125 AttributeAuthorityDescriptor* attr=dynamic_cast<AttributeAuthorityDescriptor*>(*i);
2127 getAttributeAuthorityDescriptors().push_back(attr->cloneAttributeAuthorityDescriptor());
2131 PDPDescriptor* pdp=dynamic_cast<PDPDescriptor*>(*i);
2133 getPDPDescriptors().push_back(pdp->clonePDPDescriptor());
2137 AuthnQueryDescriptorType* authnq=dynamic_cast<AuthnQueryDescriptorType*>(*i);
2139 getAuthnQueryDescriptorTypes().push_back(authnq->cloneAuthnQueryDescriptorType());
2143 AttributeQueryDescriptorType* attrq=dynamic_cast<AttributeQueryDescriptorType*>(*i);
2145 getAttributeQueryDescriptorTypes().push_back(attrq->cloneAttributeQueryDescriptorType());
2149 AuthzDecisionQueryDescriptorType* authzq=dynamic_cast<AuthzDecisionQueryDescriptorType*>(*i);
2151 getAuthzDecisionQueryDescriptorTypes().push_back(authzq->cloneAuthzDecisionQueryDescriptorType());
2155 RoleDescriptor* role=dynamic_cast<RoleDescriptor*>(*i);
2157 getRoleDescriptors().push_back(role->cloneRoleDescriptor());
2163 VectorOf(ContactPerson) v=getContactPersons();
2164 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
2166 v.push_back((*j)->cloneContactPerson());
2169 VectorOf(AdditionalMetadataLocation) w=getAdditionalMetadataLocations();
2170 for (vector<AdditionalMetadataLocation*>::const_iterator k=src.m_AdditionalMetadataLocations.begin(); k!=src.m_AdditionalMetadataLocations.end(); k++) {
2172 w.push_back((*k)->cloneAdditionalMetadataLocation());
2177 IMPL_XMLOBJECT_CLONE(EntityDescriptor);
2179 const XMLCh* getId() const {
2183 //IMPL_TYPED_CHILD(Signature);
2184 // Need customized setter.
2186 Signature* m_Signature;
2187 list<XMLObject*>::iterator m_pos_Signature;
2189 Signature* getSignature() const {
2193 void setSignature(Signature* sig) {
2194 prepareForAssignment(m_Signature,sig);
2195 *m_pos_Signature=m_Signature=sig;
2196 // Sync content reference back up.
2198 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2201 IMPL_STRING_ATTRIB(ID);
2202 IMPL_STRING_ATTRIB(EntityID);
2203 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2204 IMPL_DATETIME_ATTRIB(CacheDuration,0);
2205 IMPL_TYPED_CHILD(Extensions);
2206 IMPL_TYPED_CHILDREN(RoleDescriptor,m_pos_AffiliationDescriptor);
2207 IMPL_TYPED_CHILDREN(IDPSSODescriptor,m_pos_AffiliationDescriptor);
2208 IMPL_TYPED_CHILDREN(SPSSODescriptor,m_pos_AffiliationDescriptor);
2209 IMPL_TYPED_CHILDREN(AuthnAuthorityDescriptor,m_pos_AffiliationDescriptor);
2210 IMPL_TYPED_CHILDREN(AttributeAuthorityDescriptor,m_pos_AffiliationDescriptor);
2211 IMPL_TYPED_CHILDREN(PDPDescriptor,m_pos_AffiliationDescriptor);
2212 IMPL_TYPED_CHILDREN(AuthnQueryDescriptorType,m_pos_AffiliationDescriptor);
2213 IMPL_TYPED_CHILDREN(AttributeQueryDescriptorType,m_pos_AffiliationDescriptor);
2214 IMPL_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,m_pos_AffiliationDescriptor);
2215 IMPL_TYPED_CHILD(AffiliationDescriptor);
2216 IMPL_TYPED_CHILD(Organization);
2217 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
2218 IMPL_TYPED_CHILDREN(AdditionalMetadataLocation,m_children.end());
2220 void setAttribute(QName& qualifiedName, const XMLCh* value) {
2221 if (!qualifiedName.hasNamespaceURI()) {
2222 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
2226 else if (XMLString::equals(qualifiedName.getLocalPart(),ENTITYID_ATTRIB_NAME)) {
2230 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
2231 setValidUntil(value);
2234 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
2235 setCacheDuration(value);
2239 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value);
2242 const IDPSSODescriptor* getIDPSSODescriptor(const XMLCh* protocol) const {
2243 for (vector<IDPSSODescriptor*>::const_iterator i=m_IDPSSODescriptors.begin(); i!=m_IDPSSODescriptors.end(); i++) {
2244 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2250 const SPSSODescriptor* getSPSSODescriptor(const XMLCh* protocol) const {
2251 for (vector<SPSSODescriptor*>::const_iterator i=m_SPSSODescriptors.begin(); i!=m_SPSSODescriptors.end(); i++) {
2252 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2258 const AuthnAuthorityDescriptor* getAuthnAuthorityDescriptor(const XMLCh* protocol) const {
2259 for (vector<AuthnAuthorityDescriptor*>::const_iterator i=m_AuthnAuthorityDescriptors.begin(); i!=m_AuthnAuthorityDescriptors.end(); i++) {
2260 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2266 const AttributeAuthorityDescriptor* getAttributeAuthorityDescriptor(const XMLCh* protocol) const {
2267 for (vector<AttributeAuthorityDescriptor*>::const_iterator i=m_AttributeAuthorityDescriptors.begin(); i!=m_AttributeAuthorityDescriptors.end(); i++) {
2268 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2274 const PDPDescriptor* getPDPDescriptor(const XMLCh* protocol) const {
2275 for (vector<PDPDescriptor*>::const_iterator i=m_PDPDescriptors.begin(); i!=m_PDPDescriptors.end(); i++) {
2276 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2282 const AuthnQueryDescriptorType* getAuthnQueryDescriptorType(const XMLCh* protocol) const {
2283 for (vector<AuthnQueryDescriptorType*>::const_iterator i=m_AuthnQueryDescriptorTypes.begin(); i!=m_AuthnQueryDescriptorTypes.end(); i++) {
2284 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2290 const AttributeQueryDescriptorType* getAttributeQueryDescriptorType(const XMLCh* protocol) const {
2291 for (vector<AttributeQueryDescriptorType*>::const_iterator i=m_AttributeQueryDescriptorTypes.begin(); i!=m_AttributeQueryDescriptorTypes.end(); i++) {
2292 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2298 const AuthzDecisionQueryDescriptorType* getAuthzDecisionQueryDescriptorType(const XMLCh* protocol) const {
2299 for (vector<AuthzDecisionQueryDescriptorType*>::const_iterator i=m_AuthzDecisionQueryDescriptorTypes.begin(); i!=m_AuthzDecisionQueryDescriptorTypes.end(); i++) {
2300 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2306 const RoleDescriptor* getRoleDescriptor(xmltooling::QName& qname, const XMLCh* protocol) const {
2307 for (vector<RoleDescriptor*>::const_iterator i=m_RoleDescriptors.begin(); i!=m_RoleDescriptors.end(); i++) {
2308 if ((*i)->getSchemaType() && qname==(*((*i)->getSchemaType())) && (*i)->hasSupport(protocol) && (*i)->isValid())
2315 void marshallAttributes(DOMElement* domElement) const {
2316 MARSHALL_ID_ATTRIB(ID,ID,NULL);
2317 MARSHALL_STRING_ATTRIB(EntityID,ENTITYID,NULL);
2318 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2319 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2321 // Take care of wildcard.
2322 for (map<QName,XMLCh*>::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) {
2323 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart());
2324 if (i->first.hasPrefix())
2325 attr->setPrefix(i->first.getPrefix());
2326 attr->setNodeValue(i->second);
2327 domElement->setAttributeNode(attr);
2331 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2332 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLConstants::XMLSIG_NS,false);
2333 PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20MD_NS,false);
2334 PROC_TYPED_CHILDREN(IDPSSODescriptor,SAMLConstants::SAML20MD_NS,false);
2335 PROC_TYPED_CHILDREN(SPSSODescriptor,SAMLConstants::SAML20MD_NS,false);
2336 PROC_TYPED_CHILDREN(AuthnAuthorityDescriptor,SAMLConstants::SAML20MD_NS,false);
2337 PROC_TYPED_CHILDREN(AttributeAuthorityDescriptor,SAMLConstants::SAML20MD_NS,false);
2338 PROC_TYPED_CHILDREN(PDPDescriptor,SAMLConstants::SAML20MD_NS,false);
2339 PROC_TYPED_CHILDREN(AuthnQueryDescriptorType,SAMLConstants::SAML20MD_QUERY_EXT_NS,false);
2340 PROC_TYPED_CHILDREN(AttributeQueryDescriptorType,SAMLConstants::SAML20MD_QUERY_EXT_NS,false);
2341 PROC_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,SAMLConstants::SAML20MD_QUERY_EXT_NS,false);
2342 PROC_TYPED_CHILDREN(RoleDescriptor,SAMLConstants::SAML20MD_NS,false);
2343 PROC_TYPED_CHILD(AffiliationDescriptor,SAMLConstants::SAML20MD_NS,false);
2344 PROC_TYPED_CHILD(Organization,SAMLConstants::SAML20MD_NS,false);
2345 PROC_TYPED_CHILDREN(ContactPerson,SAMLConstants::SAML20MD_NS,false);
2346 PROC_TYPED_CHILDREN(AdditionalMetadataLocation,SAMLConstants::SAML20MD_NS,false);
2347 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2350 void processAttribute(const DOMAttr* attribute) {
2351 PROC_ID_ATTRIB(ID,ID,NULL);
2352 QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix());
2353 setAttribute(q,attribute->getNodeValue());
2357 class SAML_DLLLOCAL EntitiesDescriptorImpl : public virtual EntitiesDescriptor,
2358 public virtual SignableObject,
2359 public AbstractComplexElement,
2360 public AbstractDOMCachingXMLObject,
2361 public AbstractXMLObjectMarshaller,
2362 public AbstractXMLObjectUnmarshaller
2366 m_ValidUntil=m_CacheDuration=NULL;
2367 m_children.push_back(NULL);
2368 m_children.push_back(NULL);
2371 m_pos_Signature=m_children.begin();
2372 m_pos_Extensions=m_pos_Signature;
2377 virtual ~EntitiesDescriptorImpl() {
2378 XMLString::release(&m_ID);
2379 XMLString::release(&m_Name);
2380 delete m_ValidUntil;
2381 delete m_CacheDuration;
2384 EntitiesDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
2385 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2389 EntitiesDescriptorImpl(const EntitiesDescriptorImpl& src) : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src) {
2392 setName(src.getName());
2393 setValidUntil(src.getValidUntil());
2394 setCacheDuration(src.getCacheDuration());
2395 if (src.getSignature())
2396 setSignature(src.getSignature()->cloneSignature());
2397 if (src.getExtensions())
2398 setExtensions(src.getExtensions()->cloneExtensions());
2400 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2402 EntityDescriptor* e=dynamic_cast<EntityDescriptor*>(*i);
2404 getEntityDescriptors().push_back(e->cloneEntityDescriptor());
2408 EntitiesDescriptor* es=dynamic_cast<EntitiesDescriptor*>(*i);
2410 getEntitiesDescriptors().push_back(es->cloneEntitiesDescriptor());
2417 IMPL_XMLOBJECT_CLONE(EntitiesDescriptor);
2419 const XMLCh* getId() const {
2423 //IMPL_TYPED_CHILD(Signature);
2424 // Need customized setter.
2426 Signature* m_Signature;
2427 list<XMLObject*>::iterator m_pos_Signature;
2429 Signature* getSignature() const {
2433 void setSignature(Signature* sig) {
2434 prepareForAssignment(m_Signature,sig);
2435 *m_pos_Signature=m_Signature=sig;
2436 // Sync content reference back up.
2438 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2441 IMPL_STRING_ATTRIB(ID);
2442 IMPL_STRING_ATTRIB(Name);
2443 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2444 IMPL_DATETIME_ATTRIB(CacheDuration,0);
2445 IMPL_TYPED_CHILD(Extensions);
2446 IMPL_TYPED_CHILDREN(EntityDescriptor,m_children.end());
2447 IMPL_TYPED_CHILDREN(EntitiesDescriptor,m_children.end());
2450 void marshallAttributes(DOMElement* domElement) const {
2451 MARSHALL_ID_ATTRIB(ID,ID,NULL);
2452 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
2453 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2454 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2457 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2458 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLConstants::XMLSIG_NS,false);
2459 PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20MD_NS,false);
2460 PROC_TYPED_CHILDREN(EntityDescriptor,SAMLConstants::SAML20MD_NS,false);
2461 PROC_TYPED_CHILDREN(EntitiesDescriptor,SAMLConstants::SAML20MD_NS,false);
2462 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2465 void processAttribute(const DOMAttr* attribute) {
2466 PROC_ID_ATTRIB(ID,ID,NULL);
2467 PROC_STRING_ATTRIB(Name,NAME,NULL);
2468 PROC_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2469 PROC_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2476 #if defined (_MSC_VER)
2477 #pragma warning( pop )
2480 // Builder Implementations
2482 IMPL_XMLOBJECTBUILDER(AdditionalMetadataLocation);
2483 IMPL_XMLOBJECTBUILDER(AffiliateMember);
2484 IMPL_XMLOBJECTBUILDER(AffiliationDescriptor);
2485 IMPL_XMLOBJECTBUILDER(ArtifactResolutionService);
2486 IMPL_XMLOBJECTBUILDER(AssertionConsumerService);
2487 IMPL_XMLOBJECTBUILDER(AssertionIDRequestService);
2488 IMPL_XMLOBJECTBUILDER(AttributeAuthorityDescriptor);
2489 IMPL_XMLOBJECTBUILDER(AttributeConsumingService);
2490 IMPL_XMLOBJECTBUILDER(AttributeProfile);
2491 IMPL_XMLOBJECTBUILDER(AttributeQueryDescriptorType);
2492 IMPL_XMLOBJECTBUILDER(AttributeService);
2493 IMPL_XMLOBJECTBUILDER(AuthnAuthorityDescriptor);
2494 IMPL_XMLOBJECTBUILDER(AuthnQueryDescriptorType);
2495 IMPL_XMLOBJECTBUILDER(AuthnQueryService);
2496 IMPL_XMLOBJECTBUILDER(AuthzDecisionQueryDescriptorType);
2497 IMPL_XMLOBJECTBUILDER(AuthzService);
2498 IMPL_XMLOBJECTBUILDER(Company);
2499 IMPL_XMLOBJECTBUILDER(ContactPerson);
2500 IMPL_XMLOBJECTBUILDER(EmailAddress);
2501 IMPL_XMLOBJECTBUILDER(EndpointType);
2502 IMPL_XMLOBJECTBUILDER(EntitiesDescriptor);
2503 IMPL_XMLOBJECTBUILDER(EntityDescriptor);
2504 IMPL_XMLOBJECTBUILDER(Extensions);
2505 IMPL_XMLOBJECTBUILDER(GivenName);
2506 IMPL_XMLOBJECTBUILDER(IDPSSODescriptor);
2507 IMPL_XMLOBJECTBUILDER(IndexedEndpointType);
2508 IMPL_XMLOBJECTBUILDER(KeyDescriptor);
2509 IMPL_XMLOBJECTBUILDER(localizedNameType);
2510 IMPL_XMLOBJECTBUILDER(localizedURIType);
2511 IMPL_XMLOBJECTBUILDER(ManageNameIDService);
2512 IMPL_XMLOBJECTBUILDER(NameIDFormat);
2513 IMPL_XMLOBJECTBUILDER(NameIDMappingService);
2514 IMPL_XMLOBJECTBUILDER(Organization);
2515 IMPL_XMLOBJECTBUILDER(OrganizationName);
2516 IMPL_XMLOBJECTBUILDER(OrganizationDisplayName);
2517 IMPL_XMLOBJECTBUILDER(OrganizationURL);
2518 IMPL_XMLOBJECTBUILDER(PDPDescriptor);
2519 IMPL_XMLOBJECTBUILDER(RequestedAttribute);
2520 IMPL_XMLOBJECTBUILDER(ServiceDescription);
2521 IMPL_XMLOBJECTBUILDER(ServiceName);
2522 IMPL_XMLOBJECTBUILDER(SingleLogoutService);
2523 IMPL_XMLOBJECTBUILDER(SingleSignOnService);
2524 IMPL_XMLOBJECTBUILDER(SPSSODescriptor);
2525 IMPL_XMLOBJECTBUILDER(SurName);
2526 IMPL_XMLOBJECTBUILDER(TelephoneNumber);
2528 IMPL_XMLOBJECTBUILDER(ActionNamespace);
2529 IMPL_XMLOBJECTBUILDER(SourceID);
2531 const XMLCh ActionNamespace::LOCAL_NAME[] = UNICODE_LITERAL_15(A,c,t,i,o,n,N,a,m,e,s,p,a,c,e);
2532 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);
2533 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);
2534 const XMLCh AdditionalMetadataLocation::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(n,a,m,e,s,p,a,c,e);
2535 const XMLCh AffiliateMember::LOCAL_NAME[] = UNICODE_LITERAL_15(A,f,f,i,l,i,a,t,e,M,e,m,b,e,r);
2536 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);
2537 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);
2538 const XMLCh AffiliationDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2539 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);
2540 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);
2541 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);
2542 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);
2543 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);
2544 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);
2545 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);
2546 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);
2547 const XMLCh AttributeConsumingService::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
2548 const XMLCh AttributeConsumingService::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
2549 const XMLCh AttributeProfile::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,P,r,o,f,i,l,e);
2550 const XMLCh AttributeQueryDescriptorType::LOCAL_NAME[] =UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2551 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);
2552 const XMLCh AttributeService::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,S,e,r,v,i,c,e);
2553 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);
2554 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);
2555 const XMLCh AuthnQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2556 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);
2557 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);
2558 const XMLCh AuthzDecisionQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2559 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);
2560 const XMLCh AuthzService::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,z,S,e,r,v,i,c,e);
2561 const XMLCh CacheableSAMLObject::CACHEDURATION_ATTRIB_NAME[] = UNICODE_LITERAL_13(c,a,c,h,e,D,u,r,a,t,i,o,n);
2562 const XMLCh Company::LOCAL_NAME[] = UNICODE_LITERAL_7(C,o,m,p,a,n,y);
2563 const XMLCh ContactPerson::LOCAL_NAME[] = UNICODE_LITERAL_13(C,o,n,t,a,c,t,P,e,r,s,o,n);
2564 const XMLCh ContactPerson::TYPE_NAME[] = UNICODE_LITERAL_11(C,o,n,t,a,c,t,T,y,p,e);
2565 const XMLCh ContactPerson::CONTACTTYPE_ATTRIB_NAME[] = UNICODE_LITERAL_11(c,o,n,t,a,c,t,T,y,p,e);
2566 const XMLCh ContactPerson::CONTACT_TECHNICAL[] = UNICODE_LITERAL_9(t,e,c,h,n,i,c,a,l);
2567 const XMLCh ContactPerson::CONTACT_SUPPORT[] = UNICODE_LITERAL_7(s,u,p,p,o,r,t);
2568 const XMLCh ContactPerson::CONTACT_ADMINISTRATIVE[] = UNICODE_LITERAL_14(a,d,m,i,n,i,s,t,r,a,t,i,v,e);
2569 const XMLCh ContactPerson::CONTACT_BILLING[] = UNICODE_LITERAL_7(b,i,l,l,i,n,g);
2570 const XMLCh ContactPerson::CONTACT_OTHER[] = UNICODE_LITERAL_5(o,t,h,e,r);
2571 const XMLCh EmailAddress::LOCAL_NAME[] = UNICODE_LITERAL_12(E,m,a,i,l,A,d,d,r,e,s,s);
2572 const XMLCh EndpointType::LOCAL_NAME[] = {chNull};
2573 const XMLCh EndpointType::TYPE_NAME[] = UNICODE_LITERAL_12(E,n,d,p,o,i,n,t,T,y,p,e);
2574 const XMLCh EndpointType::BINDING_ATTRIB_NAME[] = UNICODE_LITERAL_7(B,i,n,d,i,n,g);
2575 const XMLCh EndpointType::LOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_8(L,o,c,a,t,i,o,n);
2576 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);
2577 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);
2578 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);
2579 const XMLCh EntitiesDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2580 const XMLCh EntitiesDescriptor::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e);
2581 const XMLCh EntityDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,D,e,s,c,r,i,p,t,o,r);
2582 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);
2583 const XMLCh EntityDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2584 const XMLCh EntityDescriptor::ENTITYID_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,n,t,i,t,y,I,D);
2585 const XMLCh Extensions::LOCAL_NAME[] = UNICODE_LITERAL_10(E,x,t,e,n,s,i,o,n,s);
2586 const XMLCh Extensions::TYPE_NAME[] = UNICODE_LITERAL_14(E,x,t,e,n,s,i,o,n,s,T,y,p,e);
2587 const XMLCh GivenName::LOCAL_NAME[] = UNICODE_LITERAL_9(G,i,v,e,n,N,a,m,e);
2588 const XMLCh IDPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(I,D,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
2589 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);
2590 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);
2591 const XMLCh IndexedEndpointType::LOCAL_NAME[] = {chNull};
2592 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);
2593 const XMLCh IndexedEndpointType::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
2594 const XMLCh IndexedEndpointType::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
2595 const XMLCh KeyDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(K,e,y,D,e,s,c,r,i,p,t,o,r);
2596 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);
2597 const XMLCh KeyDescriptor::USE_ATTRIB_NAME[] = UNICODE_LITERAL_3(u,s,e);
2598 const XMLCh KeyDescriptor::KEYTYPE_ENCRYPTION[] = UNICODE_LITERAL_10(e,n,c,r,y,p,t,i,o,n);
2599 const XMLCh KeyDescriptor::KEYTYPE_SIGNING[] = UNICODE_LITERAL_7(s,i,g,n,i,n,g);
2600 const XMLCh localizedNameType::LOCAL_NAME[] = {chNull};
2601 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);
2602 const XMLCh localizedNameType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2603 const XMLCh localizedURIType::LOCAL_NAME[] = {chNull};
2604 const XMLCh localizedURIType::TYPE_NAME[] = UNICODE_LITERAL_16(l,o,c,a,l,i,z,e,d,U,R,I,T,y,p,e);
2605 const XMLCh localizedURIType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2606 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);
2607 const XMLCh NameIDFormat::LOCAL_NAME[] = UNICODE_LITERAL_12(N,a,m,e,I,D,F,o,r,m,a,t);
2608 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);
2609 const XMLCh Organization::LOCAL_NAME[] = UNICODE_LITERAL_12(O,r,g,a,n,i,z,a,t,i,o,n);
2610 const XMLCh Organization::TYPE_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,T,y,p,e);
2611 const XMLCh OrganizationName::LOCAL_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,N,a,m,e);
2612 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);
2613 const XMLCh OrganizationURL::LOCAL_NAME[] = UNICODE_LITERAL_15(O,r,g,a,n,i,z,a,t,i,o,n,U,R,L);
2614 const XMLCh PDPDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(P,D,P,D,e,s,c,r,i,p,t,o,r);
2615 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);
2616 const XMLCh QueryDescriptorType::LOCAL_NAME[] = {chNull};
2617 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);
2618 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);
2619 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);
2620 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);
2621 const XMLCh RequestedAttribute::ISREQUIRED_ATTRIB_NAME[] = UNICODE_LITERAL_10(i,s,R,e,q,u,i,r,e,d);
2622 const XMLCh RoleDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2623 const XMLCh RoleDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2624 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);
2625 const XMLCh RoleDescriptor::ERRORURL_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,r,r,o,r,U,R,L);
2626 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);
2627 const XMLCh ServiceName::LOCAL_NAME[] = UNICODE_LITERAL_11(S,e,r,v,i,c,e,N,a,m,e);
2628 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);
2629 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);
2630 const XMLCh SourceID::LOCAL_NAME[] = UNICODE_LITERAL_8(S,o,u,r,c,e,I,D);
2631 const XMLCh SPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_15(S,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
2632 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);
2633 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);
2634 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);
2635 const XMLCh SSODescriptorType::LOCAL_NAME[] = {chNull};
2636 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);
2637 const XMLCh SurName::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,r,N,a,m,e);
2638 const XMLCh TelephoneNumber::LOCAL_NAME[] = UNICODE_LITERAL_15(T,e,l,e,p,h,o,n,e,N,u,m,b,e,r);
2639 const XMLCh TimeBoundSAMLObject::VALIDUNTIL_ATTRIB_NAME[] = UNICODE_LITERAL_10(v,a,l,i,d,U,n,t,i,l);