2 * Copyright 2001-2007 Internet2
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
20 * Implementation classes for SAML 2.0 Assertions schema
24 #include "exceptions.h"
25 #include "saml2/metadata/Metadata.h"
27 #include <xmltooling/AbstractComplexElement.h>
28 #include <xmltooling/AbstractSimpleElement.h>
29 #include <xmltooling/impl/AnyElement.h>
30 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
31 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
32 #include <xmltooling/util/XMLHelper.h>
35 #include <xercesc/util/XMLUniDefs.hpp>
37 using namespace opensaml::saml2md;
38 using namespace opensaml::saml2;
39 using namespace opensaml;
40 using namespace xmlencryption;
41 using namespace xmlsignature;
42 using namespace xmltooling;
44 using xmlconstants::XMLSIG_NS;
45 using xmlconstants::XML_BOOL_NULL;
46 using samlconstants::SAML20_NS;
47 using samlconstants::SAML20MD_NS;
49 #if defined (_MSC_VER)
50 #pragma warning( push )
51 #pragma warning( disable : 4250 4251 )
57 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AffiliateMember);
58 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AttributeProfile);
59 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Company);
60 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,EmailAddress);
61 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,GivenName);
62 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,NameIDFormat);
63 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,SurName);
64 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,TelephoneNumber);
66 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,ActionNamespace);
67 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,SourceID);
69 class SAML_DLLLOCAL localizedNameTypeImpl : public virtual localizedNameType,
70 public AbstractSimpleElement,
71 public AbstractDOMCachingXMLObject,
72 public AbstractXMLObjectMarshaller,
73 public AbstractXMLObjectUnmarshaller
80 localizedNameTypeImpl() {
85 virtual ~localizedNameTypeImpl() {
86 XMLString::release(&m_Lang);
89 localizedNameTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
90 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
94 localizedNameTypeImpl(const localizedNameTypeImpl& src)
95 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
97 setLang(src.getLang());
100 IMPL_XMLOBJECT_CLONE(localizedNameType);
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 AbstractDOMCachingXMLObject,
117 public AbstractXMLObjectMarshaller,
118 public AbstractXMLObjectUnmarshaller
125 localizedURITypeImpl() {
130 virtual ~localizedURITypeImpl() {
131 XMLString::release(&m_Lang);
134 localizedURITypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
135 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
139 localizedURITypeImpl(const localizedURITypeImpl& src)
140 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
142 setLang(src.getLang());
145 IMPL_XMLOBJECT_CLONE(localizedURIType);
146 IMPL_STRING_ATTRIB(Lang);
149 void marshallAttributes(DOMElement* domElement) const {
150 MARSHALL_STRING_ATTRIB(Lang,LANG,xmlconstants::XML_NS);
153 void processAttribute(const DOMAttr* attribute) {
154 PROC_STRING_ATTRIB(Lang,LANG,xmlconstants::XML_NS);
155 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
159 class SAML_DLLLOCAL OrganizationNameImpl : public virtual OrganizationName, public localizedNameTypeImpl
162 virtual ~OrganizationNameImpl() {}
164 OrganizationNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
165 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
167 OrganizationNameImpl(const OrganizationNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
169 IMPL_XMLOBJECT_CLONE(OrganizationName);
170 localizedNameType* clonelocalizedNameType() const {
171 return new OrganizationNameImpl(*this);
175 class SAML_DLLLOCAL OrganizationDisplayNameImpl : public virtual OrganizationDisplayName, public localizedNameTypeImpl
178 virtual ~OrganizationDisplayNameImpl() {}
180 OrganizationDisplayNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
181 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
183 OrganizationDisplayNameImpl(const OrganizationDisplayNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
185 IMPL_XMLOBJECT_CLONE(OrganizationDisplayName);
186 localizedNameType* clonelocalizedNameType() const {
187 return new OrganizationDisplayNameImpl(*this);
191 class SAML_DLLLOCAL OrganizationURLImpl : public virtual OrganizationURL, public localizedURITypeImpl
194 virtual ~OrganizationURLImpl() {}
196 OrganizationURLImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
197 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
199 OrganizationURLImpl(const OrganizationURLImpl& src) : AbstractXMLObject(src), localizedURITypeImpl(src) {}
201 IMPL_XMLOBJECT_CLONE(OrganizationURL);
202 localizedURIType* clonelocalizedURIType() const {
203 return new OrganizationURLImpl(*this);
207 class SAML_DLLLOCAL ServiceNameImpl : public virtual ServiceName, public localizedNameTypeImpl
210 virtual ~ServiceNameImpl() {}
212 ServiceNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
213 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
215 ServiceNameImpl(const ServiceNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
217 IMPL_XMLOBJECT_CLONE(ServiceName);
218 localizedNameType* clonelocalizedNameType() const {
219 return new ServiceNameImpl(*this);
223 class SAML_DLLLOCAL ServiceDescriptionImpl : public virtual ServiceDescription, public localizedNameTypeImpl
226 virtual ~ServiceDescriptionImpl() {}
228 ServiceDescriptionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
229 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
231 ServiceDescriptionImpl(const ServiceDescriptionImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
233 IMPL_XMLOBJECT_CLONE(ServiceDescription);
234 localizedNameType* clonelocalizedNameType() const {
235 return new ServiceDescriptionImpl(*this);
239 class SAML_DLLLOCAL ExtensionsImpl : public virtual Extensions,
240 public AbstractComplexElement,
241 public AbstractDOMCachingXMLObject,
242 public AbstractXMLObjectMarshaller,
243 public AbstractXMLObjectUnmarshaller
246 virtual ~ExtensionsImpl() {}
248 ExtensionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
249 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
252 ExtensionsImpl(const ExtensionsImpl& src)
253 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
254 VectorOf(XMLObject) v=getUnknownXMLObjects();
255 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
256 v.push_back((*i)->clone());
259 IMPL_XMLOBJECT_CLONE(Extensions);
260 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
263 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
265 const XMLCh* nsURI=root->getNamespaceURI();
266 if (!XMLString::equals(nsURI,SAML20MD_NS) && nsURI && *nsURI) {
267 getUnknownXMLObjects().push_back(childXMLObject);
271 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
275 class SAML_DLLLOCAL OrganizationImpl : public virtual Organization,
276 public AbstractComplexElement,
277 public AbstractAttributeExtensibleXMLObject,
278 public AbstractDOMCachingXMLObject,
279 public AbstractXMLObjectMarshaller,
280 public AbstractXMLObjectUnmarshaller
282 list<XMLObject*>::iterator m_pos_OrganizationDisplayName;
283 list<XMLObject*>::iterator m_pos_OrganizationURL;
286 m_children.push_back(NULL);
287 m_children.push_back(NULL);
288 m_children.push_back(NULL);
290 m_pos_Extensions=m_children.begin();
291 m_pos_OrganizationDisplayName=m_pos_Extensions;
292 ++m_pos_OrganizationDisplayName;
293 m_pos_OrganizationURL=m_pos_OrganizationDisplayName;
294 ++m_pos_OrganizationURL;
297 virtual ~OrganizationImpl() {}
299 OrganizationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
300 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
304 OrganizationImpl(const OrganizationImpl& src)
305 : AbstractXMLObject(src), AbstractComplexElement(src),
306 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
308 if (src.getExtensions())
309 setExtensions(src.getExtensions()->cloneExtensions());
310 VectorOf(OrganizationName) v=getOrganizationNames();
311 for (vector<OrganizationName*>::const_iterator i=src.m_OrganizationNames.begin(); i!=src.m_OrganizationNames.end(); i++) {
313 v.push_back((*i)->cloneOrganizationName());
316 VectorOf(OrganizationDisplayName) w=getOrganizationDisplayNames();
317 for (vector<OrganizationDisplayName*>::const_iterator j=src.m_OrganizationDisplayNames.begin(); j!=src.m_OrganizationDisplayNames.end(); j++) {
319 w.push_back((*j)->cloneOrganizationDisplayName());
322 VectorOf(OrganizationURL) x=getOrganizationURLs();
323 for (vector<OrganizationURL*>::const_iterator k=src.m_OrganizationURLs.begin(); k!=src.m_OrganizationURLs.end(); k++) {
325 x.push_back((*k)->cloneOrganizationURL());
330 IMPL_XMLOBJECT_CLONE(Organization);
331 IMPL_TYPED_CHILD(Extensions);
332 IMPL_TYPED_CHILDREN(OrganizationName,m_pos_OrganizationDisplayName);
333 IMPL_TYPED_CHILDREN(OrganizationDisplayName,m_pos_OrganizationURL);
334 IMPL_TYPED_CHILDREN(OrganizationURL,m_children.end());
337 void marshallAttributes(DOMElement* domElement) const {
338 marshallExtensionAttributes(domElement);
341 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
342 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
343 PROC_TYPED_CHILDREN(OrganizationName,SAML20MD_NS,false);
344 PROC_TYPED_CHILDREN(OrganizationDisplayName,SAML20MD_NS,false);
345 PROC_TYPED_CHILDREN(OrganizationURL,SAML20MD_NS,false);
346 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
349 void processAttribute(const DOMAttr* attribute) {
350 unmarshallExtensionAttribute(attribute);
354 class SAML_DLLLOCAL ContactPersonImpl : public virtual ContactPerson,
355 public AbstractComplexElement,
356 public AbstractAttributeExtensibleXMLObject,
357 public AbstractDOMCachingXMLObject,
358 public AbstractXMLObjectMarshaller,
359 public AbstractXMLObjectUnmarshaller
361 list<XMLObject*>::iterator m_pos_TelephoneNumber;
365 m_children.push_back(NULL);
366 m_children.push_back(NULL);
367 m_children.push_back(NULL);
368 m_children.push_back(NULL);
369 m_children.push_back(NULL);
374 m_pos_Extensions=m_children.begin();
375 m_pos_Company=m_pos_Extensions;
377 m_pos_GivenName=m_pos_Company;
379 m_pos_SurName=m_pos_GivenName;
381 m_pos_TelephoneNumber=m_pos_SurName;
382 ++m_pos_TelephoneNumber;
385 virtual ~ContactPersonImpl() {}
387 ContactPersonImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
388 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
392 ContactPersonImpl(const ContactPersonImpl& src)
393 : AbstractXMLObject(src), AbstractComplexElement(src),
394 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
396 if (src.getExtensions())
397 setExtensions(src.getExtensions()->cloneExtensions());
398 if (src.getCompany())
399 setCompany(src.getCompany()->cloneCompany());
400 if (src.getGivenName())
401 setGivenName(src.getGivenName()->cloneGivenName());
402 if (src.getSurName())
403 setSurName(src.getSurName()->cloneSurName());
405 VectorOf(EmailAddress) v=getEmailAddresss();
406 for (vector<EmailAddress*>::const_iterator i=src.m_EmailAddresss.begin(); i!=src.m_EmailAddresss.end(); i++) {
408 v.push_back((*i)->cloneEmailAddress());
411 VectorOf(TelephoneNumber) w=getTelephoneNumbers();
412 for (vector<TelephoneNumber*>::const_iterator j=src.m_TelephoneNumbers.begin(); j!=src.m_TelephoneNumbers.end(); j++) {
414 w.push_back((*j)->cloneTelephoneNumber());
419 IMPL_XMLOBJECT_CLONE(ContactPerson);
420 IMPL_STRING_ATTRIB(ContactType);
421 IMPL_TYPED_CHILD(Extensions);
422 IMPL_TYPED_CHILD(Company);
423 IMPL_TYPED_CHILD(GivenName);
424 IMPL_TYPED_CHILD(SurName);
425 IMPL_TYPED_CHILDREN(EmailAddress,m_pos_TelephoneNumber);
426 IMPL_TYPED_CHILDREN(TelephoneNumber,m_children.end());
428 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
429 if (!qualifiedName.hasNamespaceURI()) {
430 if (XMLString::equals(qualifiedName.getLocalPart(),CONTACTTYPE_ATTRIB_NAME)) {
431 setContactType(value);
435 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
439 void marshallAttributes(DOMElement* domElement) const {
440 MARSHALL_STRING_ATTRIB(ContactType,CONTACTTYPE,NULL);
441 marshallExtensionAttributes(domElement);
444 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
445 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
446 PROC_TYPED_CHILD(Company,SAML20MD_NS,false);
447 PROC_TYPED_CHILD(GivenName,SAML20MD_NS,false);
448 PROC_TYPED_CHILD(SurName,SAML20MD_NS,false);
449 PROC_TYPED_CHILDREN(EmailAddress,SAML20MD_NS,false);
450 PROC_TYPED_CHILDREN(TelephoneNumber,SAML20MD_NS,false);
451 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
454 void processAttribute(const DOMAttr* attribute) {
455 unmarshallExtensionAttribute(attribute);
459 class SAML_DLLLOCAL AdditionalMetadataLocationImpl : public virtual AdditionalMetadataLocation,
460 public AbstractSimpleElement,
461 public AbstractDOMCachingXMLObject,
462 public AbstractXMLObjectMarshaller,
463 public AbstractXMLObjectUnmarshaller
470 virtual ~AdditionalMetadataLocationImpl() {
471 XMLString::release(&m_Namespace);
474 AdditionalMetadataLocationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
475 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
479 AdditionalMetadataLocationImpl(const AdditionalMetadataLocationImpl& src)
480 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
484 IMPL_XMLOBJECT_CLONE(AdditionalMetadataLocation);
485 IMPL_STRING_ATTRIB(Namespace);
488 void marshallAttributes(DOMElement* domElement) const {
489 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
492 void processAttribute(const DOMAttr* attribute) {
493 PROC_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
494 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
498 class SAML_DLLLOCAL KeyDescriptorImpl : public virtual KeyDescriptor,
499 public AbstractComplexElement,
500 public AbstractDOMCachingXMLObject,
501 public AbstractXMLObjectMarshaller,
502 public AbstractXMLObjectUnmarshaller
507 m_children.push_back(NULL);
508 m_pos_KeyInfo=m_children.begin();
511 virtual ~KeyDescriptorImpl() {
512 XMLString::release(&m_Use);
515 KeyDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
516 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
520 KeyDescriptorImpl(const KeyDescriptorImpl& src)
521 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
523 setUse(src.getUse());
524 if (src.getKeyInfo())
525 setKeyInfo(src.getKeyInfo()->cloneKeyInfo());
526 VectorOf(EncryptionMethod) v=getEncryptionMethods();
527 for (vector<EncryptionMethod*>::const_iterator i=src.m_EncryptionMethods.begin(); i!=src.m_EncryptionMethods.end(); i++) {
529 v.push_back((*i)->cloneEncryptionMethod());
534 IMPL_XMLOBJECT_CLONE(KeyDescriptor);
535 IMPL_STRING_ATTRIB(Use);
536 IMPL_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature);
537 IMPL_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,m_children.end());
540 void marshallAttributes(DOMElement* domElement) const {
541 MARSHALL_STRING_ATTRIB(Use,USE,NULL);
544 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
545 PROC_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature,XMLSIG_NS,false);
546 PROC_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,SAML20MD_NS,false);
547 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
550 void processAttribute(const DOMAttr* attribute) {
551 PROC_STRING_ATTRIB(Use,USE,NULL);
552 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
556 class SAML_DLLLOCAL EndpointTypeImpl : public virtual EndpointType,
557 public AbstractAttributeExtensibleXMLObject,
558 public AbstractComplexElement,
559 public AbstractDOMCachingXMLObject,
560 public AbstractXMLObjectMarshaller,
561 public AbstractXMLObjectUnmarshaller
564 m_Binding=m_Location=m_ResponseLocation=NULL;
573 virtual ~EndpointTypeImpl() {
574 XMLString::release(&m_Binding);
575 XMLString::release(&m_Location);
576 XMLString::release(&m_ResponseLocation);
579 EndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
580 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
583 EndpointTypeImpl(const EndpointTypeImpl& src)
584 : AbstractXMLObject(src),
585 AbstractAttributeExtensibleXMLObject(src),
586 AbstractComplexElement(src),
587 AbstractDOMCachingXMLObject(src) {
588 setBinding(src.getBinding());
589 setLocation(src.getLocation());
590 setResponseLocation(src.getResponseLocation());
591 VectorOf(XMLObject) v=getUnknownXMLObjects();
592 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
593 v.push_back((*i)->clone());
596 IMPL_XMLOBJECT_CLONE(EndpointType);
597 IMPL_STRING_ATTRIB(Binding);
598 IMPL_STRING_ATTRIB(Location);
599 IMPL_STRING_ATTRIB(ResponseLocation);
600 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
602 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
603 if (!qualifiedName.hasNamespaceURI()) {
604 if (XMLString::equals(qualifiedName.getLocalPart(),BINDING_ATTRIB_NAME)) {
608 else if (XMLString::equals(qualifiedName.getLocalPart(),LOCATION_ATTRIB_NAME)) {
612 else if (XMLString::equals(qualifiedName.getLocalPart(),RESPONSELOCATION_ATTRIB_NAME)) {
613 setResponseLocation(value);
617 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
620 void marshallAttributes(DOMElement* domElement) const {
621 MARSHALL_STRING_ATTRIB(Binding,BINDING,NULL);
622 MARSHALL_STRING_ATTRIB(Location,LOCATION,NULL);
623 MARSHALL_STRING_ATTRIB(ResponseLocation,RESPONSELOCATION,NULL);
624 marshallExtensionAttributes(domElement);
627 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
629 const XMLCh* nsURI=root->getNamespaceURI();
630 if (!XMLString::equals(nsURI,SAML20MD_NS) && nsURI && *nsURI) {
631 getUnknownXMLObjects().push_back(childXMLObject);
634 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
637 void processAttribute(const DOMAttr* attribute) {
638 unmarshallExtensionAttribute(attribute);
642 class SAML_DLLLOCAL IndexedEndpointTypeImpl : public virtual IndexedEndpointType, public EndpointTypeImpl
646 m_isDefault=XML_BOOL_NULL;
650 IndexedEndpointTypeImpl() {
654 virtual ~IndexedEndpointTypeImpl() {
655 XMLString::release(&m_Index);
658 IndexedEndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
659 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
661 IndexedEndpointTypeImpl(const IndexedEndpointTypeImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {
662 setIndex(src.m_Index);
663 isDefault(src.m_isDefault);
666 IMPL_XMLOBJECT_CLONE(IndexedEndpointType);
667 EndpointType* cloneEndpointType() const {
668 return new IndexedEndpointTypeImpl(*this);
671 IMPL_INTEGER_ATTRIB(Index);
672 IMPL_BOOLEAN_ATTRIB(isDefault);
674 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
675 if (!qualifiedName.hasNamespaceURI()) {
676 if (XMLString::equals(qualifiedName.getLocalPart(),INDEX_ATTRIB_NAME)) {
680 else if (XMLString::equals(qualifiedName.getLocalPart(),ISDEFAULT_ATTRIB_NAME)) {
685 EndpointTypeImpl::setAttribute(qualifiedName, value, ID);
689 void marshallAttributes(DOMElement* domElement) const {
690 MARSHALL_INTEGER_ATTRIB(Index,INDEX,NULL);
691 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
692 EndpointTypeImpl::marshallAttributes(domElement);
696 class SAML_DLLLOCAL ArtifactResolutionServiceImpl : public virtual ArtifactResolutionService, public IndexedEndpointTypeImpl
699 virtual ~ArtifactResolutionServiceImpl() {}
701 ArtifactResolutionServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
702 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
704 ArtifactResolutionServiceImpl(const ArtifactResolutionServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
706 IMPL_XMLOBJECT_CLONE(ArtifactResolutionService);
707 IndexedEndpointType* cloneIndexedEndpointType() const {
708 return new ArtifactResolutionServiceImpl(*this);
710 EndpointType* cloneEndpointType() const {
711 return new ArtifactResolutionServiceImpl(*this);
715 class SAML_DLLLOCAL SingleLogoutServiceImpl : public virtual SingleLogoutService, public EndpointTypeImpl
718 virtual ~SingleLogoutServiceImpl() {}
720 SingleLogoutServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
721 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
723 SingleLogoutServiceImpl(const SingleLogoutServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
725 IMPL_XMLOBJECT_CLONE(SingleLogoutService);
726 EndpointType* cloneEndpointType() const {
727 return new SingleLogoutServiceImpl(*this);
731 class SAML_DLLLOCAL ManageNameIDServiceImpl : public virtual ManageNameIDService, public EndpointTypeImpl
734 virtual ~ManageNameIDServiceImpl() {}
736 ManageNameIDServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
737 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
739 ManageNameIDServiceImpl(const ManageNameIDServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
741 IMPL_XMLOBJECT_CLONE(ManageNameIDService);
742 EndpointType* cloneEndpointType() const {
743 return new ManageNameIDServiceImpl(*this);
747 class SAML_DLLLOCAL SingleSignOnServiceImpl : public virtual SingleSignOnService, public EndpointTypeImpl
750 virtual ~SingleSignOnServiceImpl() {}
752 SingleSignOnServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
753 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
755 SingleSignOnServiceImpl(const SingleSignOnServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
757 IMPL_XMLOBJECT_CLONE(SingleSignOnService);
758 EndpointType* cloneEndpointType() const {
759 return new SingleSignOnServiceImpl(*this);
763 class SAML_DLLLOCAL NameIDMappingServiceImpl : public virtual NameIDMappingService, public EndpointTypeImpl
766 virtual ~NameIDMappingServiceImpl() {}
768 NameIDMappingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
769 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
771 NameIDMappingServiceImpl(const NameIDMappingServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
773 IMPL_XMLOBJECT_CLONE(NameIDMappingService);
774 EndpointType* cloneEndpointType() const {
775 return new NameIDMappingServiceImpl(*this);
779 class SAML_DLLLOCAL AssertionIDRequestServiceImpl : public virtual AssertionIDRequestService, public EndpointTypeImpl
782 virtual ~AssertionIDRequestServiceImpl() {}
784 AssertionIDRequestServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
785 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
787 AssertionIDRequestServiceImpl(const AssertionIDRequestServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
789 IMPL_XMLOBJECT_CLONE(AssertionIDRequestService);
790 EndpointType* cloneEndpointType() const {
791 return new AssertionIDRequestServiceImpl(*this);
795 class SAML_DLLLOCAL AssertionConsumerServiceImpl : public virtual AssertionConsumerService, public IndexedEndpointTypeImpl
798 virtual ~AssertionConsumerServiceImpl() {}
800 AssertionConsumerServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
801 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
803 AssertionConsumerServiceImpl(const AssertionConsumerServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
805 IMPL_XMLOBJECT_CLONE(AssertionConsumerService);
806 EndpointType* cloneEndpointType() const {
807 return new AssertionConsumerServiceImpl(*this);
809 IndexedEndpointType* cloneIndexedEndpointType() const {
810 return new AssertionConsumerServiceImpl(*this);
814 class SAML_DLLLOCAL AuthnQueryServiceImpl : public virtual AuthnQueryService, public EndpointTypeImpl
817 virtual ~AuthnQueryServiceImpl() {}
819 AuthnQueryServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
820 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
822 AuthnQueryServiceImpl(const AuthnQueryServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
824 IMPL_XMLOBJECT_CLONE(AuthnQueryService);
825 EndpointType* cloneEndpointType() const {
826 return new AuthnQueryServiceImpl(*this);
830 class SAML_DLLLOCAL AuthzServiceImpl : public virtual AuthzService, public EndpointTypeImpl
833 virtual ~AuthzServiceImpl() {}
835 AuthzServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
836 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
838 AuthzServiceImpl(const AuthzServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
840 IMPL_XMLOBJECT_CLONE(AuthzService);
841 EndpointType* cloneEndpointType() const {
842 return new AuthzServiceImpl(*this);
846 class SAML_DLLLOCAL AttributeServiceImpl : public virtual AttributeService, public EndpointTypeImpl
849 virtual ~AttributeServiceImpl() {}
851 AttributeServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
852 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
854 AttributeServiceImpl(const AttributeServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
856 IMPL_XMLOBJECT_CLONE(AttributeService);
857 EndpointType* cloneEndpointType() const {
858 return new AttributeServiceImpl(*this);
862 class SAML_DLLLOCAL RoleDescriptorImpl : public virtual RoleDescriptor,
863 public virtual SignableObject,
864 public AbstractComplexElement,
865 public AbstractAttributeExtensibleXMLObject,
866 public AbstractDOMCachingXMLObject,
867 public AbstractXMLObjectMarshaller,
868 public AbstractXMLObjectUnmarshaller
871 m_ID=m_ProtocolSupportEnumeration=m_ErrorURL=NULL;
872 m_ValidUntil=m_CacheDuration=NULL;
873 m_children.push_back(NULL);
874 m_children.push_back(NULL);
875 m_children.push_back(NULL);
876 m_children.push_back(NULL);
880 m_pos_Signature=m_children.begin();
881 m_pos_Extensions=m_pos_Signature;
883 m_pos_Organization=m_pos_Extensions;
884 ++m_pos_Organization;
885 m_pos_ContactPerson=m_pos_Organization;
886 ++m_pos_ContactPerson;
890 list<XMLObject*>::iterator m_pos_ContactPerson;
892 RoleDescriptorImpl() {
897 virtual ~RoleDescriptorImpl() {
898 XMLString::release(&m_ID);
899 XMLString::release(&m_ProtocolSupportEnumeration);
900 XMLString::release(&m_ErrorURL);
902 delete m_CacheDuration;
905 RoleDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
906 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
910 RoleDescriptorImpl(const RoleDescriptorImpl& src)
911 : AbstractXMLObject(src), AbstractComplexElement(src),
912 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
915 setProtocolSupportEnumeration(src.getProtocolSupportEnumeration());
916 setErrorURL(src.getErrorURL());
917 setValidUntil(src.getValidUntil());
918 setCacheDuration(src.getCacheDuration());
919 if (src.getSignature())
920 setSignature(src.getSignature()->cloneSignature());
921 if (src.getExtensions())
922 setExtensions(src.getExtensions()->cloneExtensions());
923 if (src.getOrganization())
924 setOrganization(src.getOrganization()->cloneOrganization());
926 VectorOf(KeyDescriptor) v=getKeyDescriptors();
927 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
929 v.push_back((*i)->cloneKeyDescriptor());
932 VectorOf(ContactPerson) w=getContactPersons();
933 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
935 w.push_back((*j)->cloneContactPerson());
940 //IMPL_TYPED_CHILD(Signature);
941 // Need customized setter.
943 Signature* m_Signature;
944 list<XMLObject*>::iterator m_pos_Signature;
946 Signature* getSignature() const {
950 void setSignature(Signature* sig) {
951 prepareForAssignment(m_Signature,sig);
952 *m_pos_Signature=m_Signature=sig;
953 // Sync content reference back up.
955 m_Signature->setContentReference(new opensaml::ContentReference(*this));
959 IMPL_STRING_ATTRIB(ProtocolSupportEnumeration);
960 IMPL_STRING_ATTRIB(ErrorURL);
961 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
962 IMPL_DATETIME_ATTRIB(CacheDuration,0);
963 IMPL_TYPED_CHILD(Extensions);
964 IMPL_TYPED_CHILDREN(KeyDescriptor,m_pos_Organization);
965 IMPL_TYPED_CHILD(Organization);
966 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
968 bool hasSupport(const XMLCh* protocol) const {
969 if (m_ProtocolSupportEnumeration) {
970 // Look for first character.
971 unsigned int len=XMLString::stringLen(protocol);
973 int index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
975 // Only possible match is if it's the first character or a space comes before it.
976 if (index==0 || m_ProtocolSupportEnumeration[index-1]==chSpace) {
977 // See if rest of protocol string is present.
978 if (0==XMLString::compareNString(m_ProtocolSupportEnumeration+index+1,protocol+1,len-1)) {
979 // Only possible match is if it's the last character or a space comes after it.
980 if (m_ProtocolSupportEnumeration[index+len]==chNull || m_ProtocolSupportEnumeration[index+len]==chSpace)
986 // Move past last search and start again.
991 // Move past last search and start again.
994 index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
1000 void addSupport(const XMLCh* protocol) {
1001 if (hasSupport(protocol))
1003 if (m_ProtocolSupportEnumeration && *m_ProtocolSupportEnumeration) {
1004 #ifdef HAVE_GOOD_STL
1005 xstring pse(m_ProtocolSupportEnumeration);
1006 pse = pse + chSpace + protocol;
1007 setProtocolSupportEnumeration(pse.c_str());
1009 auto_ptr_char temp(m_ProtocolSupportEnumeration);
1010 string pse(temp.get());
1011 pse = pse + ' ' + protocol;
1012 auto_ptr_XMLCh temp2(pse.c_str());
1013 setProtocolSupportEnumeration(temp2.get());
1017 setProtocolSupportEnumeration(protocol);
1021 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1022 if (!qualifiedName.hasNamespaceURI()) {
1023 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
1027 else if (XMLString::equals(qualifiedName.getLocalPart(),PROTOCOLSUPPORTENUMERATION_ATTRIB_NAME)) {
1028 setProtocolSupportEnumeration(value);
1031 else if (XMLString::equals(qualifiedName.getLocalPart(),ERRORURL_ATTRIB_NAME)) {
1035 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
1036 setValidUntil(value);
1039 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
1040 setCacheDuration(value);
1044 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1048 void marshallAttributes(DOMElement* domElement) const {
1049 MARSHALL_ID_ATTRIB(ID,ID,NULL);
1050 MARSHALL_STRING_ATTRIB(ProtocolSupportEnumeration,PROTOCOLSUPPORTENUMERATION,NULL);
1051 MARSHALL_STRING_ATTRIB(ErrorURL,ERRORURL,NULL);
1052 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
1053 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
1054 marshallExtensionAttributes(domElement);
1057 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1058 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
1059 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
1060 PROC_TYPED_CHILDREN(KeyDescriptor,SAML20MD_NS,false);
1061 PROC_TYPED_CHILD(Organization,SAML20MD_NS,false);
1062 PROC_TYPED_CHILDREN(ContactPerson,SAML20MD_NS,false);
1063 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1066 void processAttribute(const DOMAttr* attribute) {
1067 PROC_ID_ATTRIB(ID,ID,NULL);
1068 unmarshallExtensionAttribute(attribute);
1072 class SAML_DLLLOCAL SSODescriptorTypeImpl : public virtual SSODescriptorType, public RoleDescriptorImpl
1075 m_children.push_back(NULL);
1076 m_children.push_back(NULL);
1077 m_children.push_back(NULL);
1078 m_children.push_back(NULL);
1079 m_pos_ArtifactResolutionService=m_pos_ContactPerson;
1080 ++m_pos_ArtifactResolutionService;
1081 m_pos_SingleLogoutService=m_pos_ArtifactResolutionService;
1082 ++m_pos_SingleLogoutService;
1083 m_pos_ManageNameIDService=m_pos_SingleLogoutService;
1084 ++m_pos_ManageNameIDService;
1085 m_pos_NameIDFormat=m_pos_ManageNameIDService;
1086 ++m_pos_NameIDFormat;
1090 list<XMLObject*>::iterator m_pos_ArtifactResolutionService;
1091 list<XMLObject*>::iterator m_pos_SingleLogoutService;
1092 list<XMLObject*>::iterator m_pos_ManageNameIDService;
1093 list<XMLObject*>::iterator m_pos_NameIDFormat;
1095 SSODescriptorTypeImpl() {
1100 virtual ~SSODescriptorTypeImpl() {}
1102 SSODescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1103 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1107 SSODescriptorTypeImpl(const SSODescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1109 VectorOf(ArtifactResolutionService) v=getArtifactResolutionServices();
1110 for (vector<ArtifactResolutionService*>::const_iterator i=src.m_ArtifactResolutionServices.begin(); i!=src.m_ArtifactResolutionServices.end(); i++) {
1112 v.push_back((*i)->cloneArtifactResolutionService());
1115 VectorOf(SingleLogoutService) w=getSingleLogoutServices();
1116 for (vector<SingleLogoutService*>::const_iterator j=src.m_SingleLogoutServices.begin(); j!=src.m_SingleLogoutServices.end(); j++) {
1118 w.push_back((*j)->cloneSingleLogoutService());
1121 VectorOf(ManageNameIDService) x=getManageNameIDServices();
1122 for (vector<ManageNameIDService*>::const_iterator k=src.m_ManageNameIDServices.begin(); k!=src.m_ManageNameIDServices.end(); k++) {
1124 x.push_back((*k)->cloneManageNameIDService());
1127 VectorOf(NameIDFormat) y=getNameIDFormats();
1128 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1130 y.push_back((*m)->cloneNameIDFormat());
1135 IMPL_TYPED_CHILDREN(ArtifactResolutionService,m_pos_ArtifactResolutionService);
1136 IMPL_TYPED_CHILDREN(SingleLogoutService,m_pos_SingleLogoutService);
1137 IMPL_TYPED_CHILDREN(ManageNameIDService,m_pos_ManageNameIDService);
1138 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1141 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1142 PROC_TYPED_CHILDREN(ArtifactResolutionService,SAML20MD_NS,false);
1143 PROC_TYPED_CHILDREN(SingleLogoutService,SAML20MD_NS,false);
1144 PROC_TYPED_CHILDREN(ManageNameIDService,SAML20MD_NS,false);
1145 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1146 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1150 class SAML_DLLLOCAL IDPSSODescriptorImpl : public virtual IDPSSODescriptor, public SSODescriptorTypeImpl
1152 list<XMLObject*>::iterator m_pos_SingleSignOnService;
1153 list<XMLObject*>::iterator m_pos_NameIDMappingService;
1154 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1155 list<XMLObject*>::iterator m_pos_AttributeProfile;
1158 m_WantAuthnRequestsSigned=XML_BOOL_NULL;
1159 m_children.push_back(NULL);
1160 m_children.push_back(NULL);
1161 m_children.push_back(NULL);
1162 m_children.push_back(NULL);
1163 m_pos_SingleSignOnService=m_pos_NameIDFormat;
1164 ++m_pos_SingleSignOnService;
1165 m_pos_NameIDMappingService=m_pos_SingleSignOnService;
1166 ++m_pos_NameIDMappingService;
1167 m_pos_AssertionIDRequestService=m_pos_NameIDMappingService;
1168 ++m_pos_AssertionIDRequestService;
1169 m_pos_AttributeProfile=m_pos_AssertionIDRequestService;
1170 ++m_pos_AttributeProfile;
1174 virtual ~IDPSSODescriptorImpl() {}
1176 IDPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1177 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1181 IDPSSODescriptorImpl(const IDPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1183 WantAuthnRequestsSigned(src.m_WantAuthnRequestsSigned);
1184 VectorOf(SingleSignOnService) v=getSingleSignOnServices();
1185 for (vector<SingleSignOnService*>::const_iterator i=src.m_SingleSignOnServices.begin(); i!=src.m_SingleSignOnServices.end(); i++) {
1187 v.push_back((*i)->cloneSingleSignOnService());
1190 VectorOf(NameIDMappingService) w=getNameIDMappingServices();
1191 for (vector<NameIDMappingService*>::const_iterator j=src.m_NameIDMappingServices.begin(); j!=src.m_NameIDMappingServices.end(); j++) {
1193 w.push_back((*j)->cloneNameIDMappingService());
1196 VectorOf(AssertionIDRequestService) x=getAssertionIDRequestServices();
1197 for (vector<AssertionIDRequestService*>::const_iterator k=src.m_AssertionIDRequestServices.begin(); k!=src.m_AssertionIDRequestServices.end(); k++) {
1199 x.push_back((*k)->cloneAssertionIDRequestService());
1202 VectorOf(AttributeProfile) y=getAttributeProfiles();
1203 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1205 y.push_back((*m)->cloneAttributeProfile());
1208 VectorOf(Attribute) z=getAttributes();
1209 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1211 z.push_back((*n)->cloneAttribute());
1216 IMPL_XMLOBJECT_CLONE(IDPSSODescriptor);
1217 SSODescriptorType* cloneSSODescriptorType() const {
1218 return new IDPSSODescriptorImpl(*this);
1220 RoleDescriptor* cloneRoleDescriptor() const {
1221 return new IDPSSODescriptorImpl(*this);
1224 IMPL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned);
1225 IMPL_TYPED_CHILDREN(SingleSignOnService,m_pos_SingleSignOnService);
1226 IMPL_TYPED_CHILDREN(NameIDMappingService,m_pos_NameIDMappingService);
1227 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1228 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1229 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1231 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1232 if (!qualifiedName.hasNamespaceURI()) {
1233 if (XMLString::equals(qualifiedName.getLocalPart(),WANTAUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1234 setWantAuthnRequestsSigned(value);
1238 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1242 void marshallAttributes(DOMElement* domElement) const {
1243 MARSHALL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned,WANTAUTHNREQUESTSSIGNED,NULL);
1244 RoleDescriptorImpl::marshallAttributes(domElement);
1247 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1248 PROC_TYPED_CHILDREN(SingleSignOnService,SAML20MD_NS,false);
1249 PROC_TYPED_CHILDREN(NameIDMappingService,SAML20MD_NS,false);
1250 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1251 PROC_TYPED_CHILDREN(AttributeProfile,SAML20MD_NS,false);
1252 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
1253 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1257 class SAML_DLLLOCAL RequestedAttributeImpl : public virtual RequestedAttribute,
1258 public AbstractComplexElement,
1259 public AbstractAttributeExtensibleXMLObject,
1260 public AbstractDOMCachingXMLObject,
1261 public AbstractXMLObjectMarshaller,
1262 public AbstractXMLObjectUnmarshaller
1265 m_Name=m_NameFormat=m_FriendlyName=NULL;
1266 m_isRequired=XML_BOOL_NULL;
1269 virtual ~RequestedAttributeImpl() {
1270 XMLString::release(&m_Name);
1271 XMLString::release(&m_NameFormat);
1272 XMLString::release(&m_FriendlyName);
1275 RequestedAttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1276 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1280 RequestedAttributeImpl(const RequestedAttributeImpl& src)
1281 : AbstractXMLObject(src), AbstractComplexElement(src),
1282 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1284 setName(src.getName());
1285 setNameFormat(src.getNameFormat());
1286 setFriendlyName(src.getFriendlyName());
1287 isRequired(src.m_isRequired);
1288 VectorOf(XMLObject) v=getAttributeValues();
1289 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
1291 v.push_back((*i)->clone());
1296 IMPL_XMLOBJECT_CLONE(RequestedAttribute);
1297 Attribute* cloneAttribute() const {
1298 return new RequestedAttributeImpl(*this);
1301 IMPL_STRING_ATTRIB(Name);
1302 IMPL_STRING_ATTRIB(NameFormat);
1303 IMPL_STRING_ATTRIB(FriendlyName);
1304 IMPL_BOOLEAN_ATTRIB(isRequired);
1305 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
1307 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1308 if (!qualifiedName.hasNamespaceURI()) {
1309 if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) {
1313 else if (XMLString::equals(qualifiedName.getLocalPart(),NAMEFORMAT_ATTRIB_NAME)) {
1314 setNameFormat(value);
1317 else if (XMLString::equals(qualifiedName.getLocalPart(),FRIENDLYNAME_ATTRIB_NAME)) {
1318 setFriendlyName(value);
1321 else if (XMLString::equals(qualifiedName.getLocalPart(),ISREQUIRED_ATTRIB_NAME)) {
1322 setisRequired(value);
1326 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1330 void marshallAttributes(DOMElement* domElement) const {
1331 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
1332 MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,NULL);
1333 MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,NULL);
1334 MARSHALL_BOOLEAN_ATTRIB(isRequired,ISREQUIRED,NULL);
1335 marshallExtensionAttributes(domElement);
1338 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1339 getAttributeValues().push_back(childXMLObject);
1342 void processAttribute(const DOMAttr* attribute) {
1343 unmarshallExtensionAttribute(attribute);
1347 class SAML_DLLLOCAL AttributeConsumingServiceImpl : public virtual AttributeConsumingService,
1348 public AbstractComplexElement,
1349 public AbstractDOMCachingXMLObject,
1350 public AbstractXMLObjectMarshaller,
1351 public AbstractXMLObjectUnmarshaller
1353 list<XMLObject*>::iterator m_pos_ServiceDescription;
1354 list<XMLObject*>::iterator m_pos_RequestedAttribute;
1358 m_isDefault=XML_BOOL_NULL;
1359 m_children.push_back(NULL);
1360 m_children.push_back(NULL);
1361 m_pos_ServiceDescription=m_children.begin();
1362 m_pos_RequestedAttribute=m_pos_ServiceDescription;
1363 ++m_pos_RequestedAttribute;
1367 virtual ~AttributeConsumingServiceImpl() {
1368 XMLString::release(&m_Index);
1371 AttributeConsumingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1372 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1376 AttributeConsumingServiceImpl(const AttributeConsumingServiceImpl& src)
1377 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1379 setIndex(src.m_Index);
1380 isDefault(src.m_isDefault);
1381 VectorOf(ServiceName) v=getServiceNames();
1382 for (vector<ServiceName*>::const_iterator i=src.m_ServiceNames.begin(); i!=src.m_ServiceNames.end(); i++) {
1384 v.push_back((*i)->cloneServiceName());
1387 VectorOf(ServiceDescription) w=getServiceDescriptions();
1388 for (vector<ServiceDescription*>::const_iterator j=src.m_ServiceDescriptions.begin(); j!=src.m_ServiceDescriptions.end(); j++) {
1390 w.push_back((*j)->cloneServiceDescription());
1393 VectorOf(RequestedAttribute) x=getRequestedAttributes();
1394 for (vector<RequestedAttribute*>::const_iterator k=src.m_RequestedAttributes.begin(); k!=src.m_RequestedAttributes.end(); k++) {
1396 x.push_back((*k)->cloneRequestedAttribute());
1401 IMPL_XMLOBJECT_CLONE(AttributeConsumingService);
1402 IMPL_INTEGER_ATTRIB(Index);
1403 IMPL_BOOLEAN_ATTRIB(isDefault);
1404 IMPL_TYPED_CHILDREN(ServiceName,m_pos_ServiceDescription);
1405 IMPL_TYPED_CHILDREN(ServiceDescription,m_pos_RequestedAttribute);
1406 IMPL_TYPED_CHILDREN(RequestedAttribute,m_children.end());
1409 void marshallAttributes(DOMElement* domElement) const {
1410 MARSHALL_INTEGER_ATTRIB(Index,INDEX,NULL);
1411 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
1414 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1415 PROC_TYPED_CHILDREN(ServiceName,SAML20MD_NS,false);
1416 PROC_TYPED_CHILDREN(ServiceDescription,SAML20MD_NS,false);
1417 PROC_TYPED_CHILDREN(RequestedAttribute,SAML20MD_NS,false);
1418 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1421 void processAttribute(const DOMAttr* attribute) {
1422 PROC_INTEGER_ATTRIB(Index,INDEX,NULL);
1423 PROC_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
1424 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1428 class SAML_DLLLOCAL SPSSODescriptorImpl : public virtual SPSSODescriptor, public SSODescriptorTypeImpl
1430 list<XMLObject*>::iterator m_pos_AssertionConsumerService;
1433 m_AuthnRequestsSigned=XML_BOOL_NULL;
1434 m_WantAssertionsSigned=XML_BOOL_NULL;
1435 m_children.push_back(NULL);
1436 m_pos_AssertionConsumerService=m_pos_NameIDFormat;
1437 ++m_pos_AssertionConsumerService;
1441 virtual ~SPSSODescriptorImpl() {}
1443 SPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1444 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1448 SPSSODescriptorImpl(const SPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1450 AuthnRequestsSigned(src.m_AuthnRequestsSigned);
1451 WantAssertionsSigned(src.m_WantAssertionsSigned);
1452 VectorOf(AssertionConsumerService) v=getAssertionConsumerServices();
1453 for (vector<AssertionConsumerService*>::const_iterator i=src.m_AssertionConsumerServices.begin(); i!=src.m_AssertionConsumerServices.end(); i++) {
1455 v.push_back((*i)->cloneAssertionConsumerService());
1458 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1459 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1461 w.push_back((*j)->cloneAttributeConsumingService());
1466 IMPL_XMLOBJECT_CLONE(SPSSODescriptor);
1467 SSODescriptorType* cloneSSODescriptorType() const {
1468 return cloneSPSSODescriptor();
1470 RoleDescriptor* cloneRoleDescriptor() const {
1471 return cloneSPSSODescriptor();
1474 IMPL_BOOLEAN_ATTRIB(AuthnRequestsSigned);
1475 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1476 IMPL_TYPED_CHILDREN(AssertionConsumerService,m_pos_AssertionConsumerService);
1477 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1479 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1480 if (!qualifiedName.hasNamespaceURI()) {
1481 if (XMLString::equals(qualifiedName.getLocalPart(),AUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1482 setAuthnRequestsSigned(value);
1485 else if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1486 setWantAssertionsSigned(value);
1490 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1494 void marshallAttributes(DOMElement* domElement) const {
1495 MARSHALL_BOOLEAN_ATTRIB(AuthnRequestsSigned,AUTHNREQUESTSSIGNED,NULL);
1496 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,NULL);
1497 RoleDescriptorImpl::marshallAttributes(domElement);
1500 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1501 PROC_TYPED_CHILDREN(AssertionConsumerService,SAML20MD_NS,false);
1502 PROC_TYPED_CHILDREN(AttributeConsumingService,SAML20MD_NS,false);
1503 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1507 class SAML_DLLLOCAL AuthnAuthorityDescriptorImpl : public virtual AuthnAuthorityDescriptor, public RoleDescriptorImpl
1509 list<XMLObject*>::iterator m_pos_AuthnQueryService;
1510 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1513 m_children.push_back(NULL);
1514 m_children.push_back(NULL);
1515 m_pos_AuthnQueryService=m_pos_ContactPerson;
1516 ++m_pos_AuthnQueryService;
1517 m_pos_AssertionIDRequestService=m_pos_AuthnQueryService;
1518 ++m_pos_AssertionIDRequestService;
1522 virtual ~AuthnAuthorityDescriptorImpl() {}
1524 AuthnAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1525 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1529 AuthnAuthorityDescriptorImpl(const AuthnAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1531 VectorOf(AuthnQueryService) v=getAuthnQueryServices();
1532 for (vector<AuthnQueryService*>::const_iterator i=src.m_AuthnQueryServices.begin(); i!=src.m_AuthnQueryServices.end(); i++) {
1534 v.push_back((*i)->cloneAuthnQueryService());
1537 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1538 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1540 w.push_back((*j)->cloneAssertionIDRequestService());
1543 VectorOf(NameIDFormat) x=getNameIDFormats();
1544 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1546 x.push_back((*k)->cloneNameIDFormat());
1551 IMPL_XMLOBJECT_CLONE(AuthnAuthorityDescriptor);
1552 RoleDescriptor* cloneRoleDescriptor() const {
1553 return cloneAuthnAuthorityDescriptor();
1556 IMPL_TYPED_CHILDREN(AuthnQueryService,m_pos_AuthnQueryService);
1557 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1558 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1561 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1562 PROC_TYPED_CHILDREN(AuthnQueryService,SAML20MD_NS,false);
1563 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1564 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1565 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1569 class SAML_DLLLOCAL PDPDescriptorImpl : public virtual PDPDescriptor, public RoleDescriptorImpl
1571 list<XMLObject*>::iterator m_pos_AuthzService;
1572 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1575 m_children.push_back(NULL);
1576 m_children.push_back(NULL);
1577 m_pos_AuthzService=m_pos_ContactPerson;
1578 ++m_pos_AuthzService;
1579 m_pos_AssertionIDRequestService=m_pos_AuthzService;
1580 ++m_pos_AssertionIDRequestService;
1584 virtual ~PDPDescriptorImpl() {}
1586 PDPDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1587 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1591 PDPDescriptorImpl(const PDPDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1593 VectorOf(AuthzService) v=getAuthzServices();
1594 for (vector<AuthzService*>::const_iterator i=src.m_AuthzServices.begin(); i!=src.m_AuthzServices.end(); i++) {
1596 v.push_back((*i)->cloneAuthzService());
1599 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1600 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1602 w.push_back((*j)->cloneAssertionIDRequestService());
1605 VectorOf(NameIDFormat) x=getNameIDFormats();
1606 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1608 x.push_back((*k)->cloneNameIDFormat());
1613 IMPL_XMLOBJECT_CLONE(PDPDescriptor);
1614 RoleDescriptor* cloneRoleDescriptor() const {
1615 return clonePDPDescriptor();
1618 IMPL_TYPED_CHILDREN(AuthzService,m_pos_AuthzService);
1619 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1620 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1623 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1624 PROC_TYPED_CHILDREN(AuthzService,SAML20MD_NS,false);
1625 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1626 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1627 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1631 class SAML_DLLLOCAL AttributeAuthorityDescriptorImpl : public virtual AttributeAuthorityDescriptor, public RoleDescriptorImpl
1633 list<XMLObject*>::iterator m_pos_AttributeService;
1634 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1635 list<XMLObject*>::iterator m_pos_NameIDFormat;
1636 list<XMLObject*>::iterator m_pos_AttributeProfile;
1639 m_children.push_back(NULL);
1640 m_children.push_back(NULL);
1641 m_children.push_back(NULL);
1642 m_children.push_back(NULL);
1643 m_pos_AttributeService=m_pos_ContactPerson;
1644 ++m_pos_AttributeService;
1645 m_pos_AssertionIDRequestService=m_pos_AttributeService;
1646 ++m_pos_AssertionIDRequestService;
1647 m_pos_NameIDFormat=m_pos_AssertionIDRequestService;
1648 ++m_pos_NameIDFormat;
1649 m_pos_AttributeProfile=m_pos_NameIDFormat;
1650 ++m_pos_AttributeProfile;
1654 virtual ~AttributeAuthorityDescriptorImpl() {}
1656 AttributeAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1657 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1661 AttributeAuthorityDescriptorImpl(const AttributeAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1663 VectorOf(AttributeService) v=getAttributeServices();
1664 for (vector<AttributeService*>::const_iterator i=src.m_AttributeServices.begin(); i!=src.m_AttributeServices.end(); i++) {
1666 v.push_back((*i)->cloneAttributeService());
1669 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1670 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1672 w.push_back((*j)->cloneAssertionIDRequestService());
1675 VectorOf(NameIDFormat) x=getNameIDFormats();
1676 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1678 x.push_back((*k)->cloneNameIDFormat());
1681 VectorOf(AttributeProfile) y=getAttributeProfiles();
1682 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1684 y.push_back((*m)->cloneAttributeProfile());
1687 VectorOf(Attribute) z=getAttributes();
1688 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1690 z.push_back((*n)->cloneAttribute());
1695 IMPL_XMLOBJECT_CLONE(AttributeAuthorityDescriptor);
1696 RoleDescriptor* cloneRoleDescriptor() const {
1697 return cloneAttributeAuthorityDescriptor();
1700 IMPL_TYPED_CHILDREN(AttributeService,m_pos_AttributeService);
1701 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1702 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1703 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1704 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1707 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1708 PROC_TYPED_CHILDREN(AttributeService,SAML20MD_NS,false);
1709 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1710 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1711 PROC_TYPED_CHILDREN(AttributeProfile,SAML20MD_NS,false);
1712 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
1713 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1717 class SAML_DLLLOCAL QueryDescriptorTypeImpl : public virtual QueryDescriptorType, public RoleDescriptorImpl
1720 m_WantAssertionsSigned=XML_BOOL_NULL;
1721 m_children.push_back(NULL);
1722 m_pos_NameIDFormat=m_pos_ContactPerson;
1723 ++m_pos_NameIDFormat;
1727 list<XMLObject*>::iterator m_pos_NameIDFormat;
1729 QueryDescriptorTypeImpl() {
1734 virtual ~QueryDescriptorTypeImpl() {}
1736 QueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1737 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1741 QueryDescriptorTypeImpl(const QueryDescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1743 WantAssertionsSigned(src.m_WantAssertionsSigned);
1744 VectorOf(NameIDFormat) y=getNameIDFormats();
1745 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1747 y.push_back((*m)->cloneNameIDFormat());
1752 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1753 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1755 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1756 if (!qualifiedName.hasNamespaceURI()) {
1757 if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1758 setWantAssertionsSigned(value);
1762 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1766 void marshallAttributes(DOMElement* domElement) const {
1767 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,NULL);
1768 RoleDescriptorImpl::marshallAttributes(domElement);
1771 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1772 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1773 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1777 class SAML_DLLLOCAL AuthnQueryDescriptorTypeImpl : public virtual AuthnQueryDescriptorType, public QueryDescriptorTypeImpl
1780 virtual ~AuthnQueryDescriptorTypeImpl() {}
1782 AuthnQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1783 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1785 AuthnQueryDescriptorTypeImpl(const AuthnQueryDescriptorTypeImpl& src) : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {}
1787 IMPL_XMLOBJECT_CLONE(AuthnQueryDescriptorType);
1788 QueryDescriptorType* cloneQueryDescriptorType() const {
1789 return new AuthnQueryDescriptorTypeImpl(*this);
1791 RoleDescriptor* cloneRoleDescriptor() const {
1792 return new AuthnQueryDescriptorTypeImpl(*this);
1796 class SAML_DLLLOCAL AttributeQueryDescriptorTypeImpl : public virtual AttributeQueryDescriptorType, public QueryDescriptorTypeImpl
1799 virtual ~AttributeQueryDescriptorTypeImpl() {}
1801 AttributeQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1802 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1804 AttributeQueryDescriptorTypeImpl(const AttributeQueryDescriptorTypeImpl& src)
1805 : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1806 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1807 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1809 w.push_back((*j)->cloneAttributeConsumingService());
1814 IMPL_XMLOBJECT_CLONE(AttributeQueryDescriptorType);
1815 QueryDescriptorType* cloneQueryDescriptorType() const {
1816 return new AttributeQueryDescriptorTypeImpl(*this);
1818 RoleDescriptor* cloneRoleDescriptor() const {
1819 return new AttributeQueryDescriptorTypeImpl(*this);
1822 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1825 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1826 PROC_TYPED_CHILDREN(AttributeConsumingService,SAML20MD_NS,false);
1827 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1831 class SAML_DLLLOCAL AuthzDecisionQueryDescriptorTypeImpl : public virtual AuthzDecisionQueryDescriptorType, public QueryDescriptorTypeImpl
1834 virtual ~AuthzDecisionQueryDescriptorTypeImpl() {}
1836 AuthzDecisionQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1837 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1839 AuthzDecisionQueryDescriptorTypeImpl(const AuthzDecisionQueryDescriptorTypeImpl& src)
1840 : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1841 VectorOf(ActionNamespace) w=getActionNamespaces();
1842 for (vector<ActionNamespace*>::const_iterator j=src.m_ActionNamespaces.begin(); j!=src.m_ActionNamespaces.end(); j++) {
1844 w.push_back((*j)->cloneActionNamespace());
1849 IMPL_XMLOBJECT_CLONE(AuthzDecisionQueryDescriptorType);
1850 QueryDescriptorType* cloneQueryDescriptorType() const {
1851 return new AuthzDecisionQueryDescriptorTypeImpl(*this);
1853 RoleDescriptor* cloneRoleDescriptor() const {
1854 return new AuthzDecisionQueryDescriptorTypeImpl(*this);
1857 IMPL_TYPED_CHILDREN(ActionNamespace,m_children.end());
1860 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1861 PROC_TYPED_CHILDREN(ActionNamespace,samlconstants::SAML20MD_QUERY_EXT_NS,false);
1862 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1866 class SAML_DLLLOCAL AffiliationDescriptorImpl : public virtual AffiliationDescriptor,
1867 public virtual SignableObject,
1868 public AbstractComplexElement,
1869 public AbstractAttributeExtensibleXMLObject,
1870 public AbstractDOMCachingXMLObject,
1871 public AbstractXMLObjectMarshaller,
1872 public AbstractXMLObjectUnmarshaller
1874 list<XMLObject*>::iterator m_pos_AffiliateMember;
1877 m_ID=m_AffiliationOwnerID=NULL;
1878 m_ValidUntil=m_CacheDuration=NULL;
1879 m_children.push_back(NULL);
1880 m_children.push_back(NULL);
1881 m_children.push_back(NULL);
1884 m_pos_Signature=m_children.begin();
1885 m_pos_Extensions=m_pos_Signature;
1887 m_pos_AffiliateMember=m_pos_Extensions;
1888 ++m_pos_AffiliateMember;
1892 virtual ~AffiliationDescriptorImpl() {
1893 XMLString::release(&m_ID);
1894 XMLString::release(&m_AffiliationOwnerID);
1895 delete m_ValidUntil;
1896 delete m_CacheDuration;
1899 AffiliationDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1900 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1904 AffiliationDescriptorImpl(const AffiliationDescriptorImpl& src)
1905 : AbstractXMLObject(src), AbstractComplexElement(src),
1906 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1909 setAffiliationOwnerID(src.getAffiliationOwnerID());
1910 setValidUntil(src.getValidUntil());
1911 setCacheDuration(src.getCacheDuration());
1912 if (src.getSignature())
1913 setSignature(src.getSignature()->cloneSignature());
1914 if (src.getExtensions())
1915 setExtensions(src.getExtensions()->cloneExtensions());
1917 VectorOf(KeyDescriptor) v=getKeyDescriptors();
1918 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
1920 v.push_back((*i)->cloneKeyDescriptor());
1923 VectorOf(AffiliateMember) w=getAffiliateMembers();
1924 for (vector<AffiliateMember*>::const_iterator j=src.m_AffiliateMembers.begin(); j!=src.m_AffiliateMembers.end(); j++) {
1926 w.push_back((*j)->cloneAffiliateMember());
1931 IMPL_XMLOBJECT_CLONE(AffiliationDescriptor);
1933 //IMPL_TYPED_CHILD(Signature);
1934 // Need customized setter.
1936 Signature* m_Signature;
1937 list<XMLObject*>::iterator m_pos_Signature;
1939 Signature* getSignature() const {
1943 void setSignature(Signature* sig) {
1944 prepareForAssignment(m_Signature,sig);
1945 *m_pos_Signature=m_Signature=sig;
1946 // Sync content reference back up.
1948 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1952 IMPL_STRING_ATTRIB(AffiliationOwnerID);
1953 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
1954 IMPL_DATETIME_ATTRIB(CacheDuration,0);
1955 IMPL_TYPED_CHILD(Extensions);
1956 IMPL_TYPED_CHILDREN(AffiliateMember,m_pos_AffiliateMember);
1957 IMPL_TYPED_CHILDREN(KeyDescriptor,m_children.end());
1959 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1960 if (!qualifiedName.hasNamespaceURI()) {
1961 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
1965 else if (XMLString::equals(qualifiedName.getLocalPart(),AFFILIATIONOWNERID_ATTRIB_NAME)) {
1966 setAffiliationOwnerID(value);
1969 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
1970 setValidUntil(value);
1973 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
1974 setCacheDuration(value);
1978 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1982 void marshallAttributes(DOMElement* domElement) const {
1983 MARSHALL_ID_ATTRIB(ID,ID,NULL);
1984 MARSHALL_STRING_ATTRIB(AffiliationOwnerID,AFFILIATIONOWNERID,NULL);
1985 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
1986 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
1987 marshallExtensionAttributes(domElement);
1990 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1991 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
1992 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
1993 PROC_TYPED_CHILDREN(AffiliateMember,SAML20MD_NS,false);
1994 PROC_TYPED_CHILDREN(KeyDescriptor,SAML20MD_NS,false);
1995 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1998 void processAttribute(const DOMAttr* attribute) {
1999 PROC_ID_ATTRIB(ID,ID,NULL);
2000 unmarshallExtensionAttribute(attribute);
2004 class SAML_DLLLOCAL EntityDescriptorImpl : public virtual EntityDescriptor,
2005 public virtual SignableObject,
2006 public AbstractComplexElement,
2007 public AbstractAttributeExtensibleXMLObject,
2008 public AbstractDOMCachingXMLObject,
2009 public AbstractXMLObjectMarshaller,
2010 public AbstractXMLObjectUnmarshaller
2012 list<XMLObject*>::iterator m_pos_ContactPerson;
2015 m_ID=m_EntityID=NULL;
2016 m_ValidUntil=m_CacheDuration=NULL;
2017 m_children.push_back(NULL);
2018 m_children.push_back(NULL);
2019 m_children.push_back(NULL);
2020 m_children.push_back(NULL);
2021 m_children.push_back(NULL);
2024 m_AffiliationDescriptor=NULL;
2025 m_Organization=NULL;
2026 m_pos_Signature=m_children.begin();
2027 m_pos_Extensions=m_pos_Signature;
2029 m_pos_AffiliationDescriptor=m_pos_Extensions;
2030 ++m_pos_AffiliationDescriptor;
2031 m_pos_Organization=m_pos_AffiliationDescriptor;
2032 ++m_pos_Organization;
2033 m_pos_ContactPerson=m_pos_Organization;
2034 ++m_pos_ContactPerson;
2038 virtual ~EntityDescriptorImpl() {
2039 XMLString::release(&m_ID);
2040 XMLString::release(&m_EntityID);
2041 delete m_ValidUntil;
2042 delete m_CacheDuration;
2045 EntityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
2046 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2050 EntityDescriptorImpl(const EntityDescriptorImpl& src)
2051 : AbstractXMLObject(src), AbstractComplexElement(src),
2052 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
2055 setEntityID(src.getEntityID());
2056 setValidUntil(src.getValidUntil());
2057 setCacheDuration(src.getCacheDuration());
2058 if (src.getSignature())
2059 setSignature(src.getSignature()->cloneSignature());
2060 if (src.getExtensions())
2061 setExtensions(src.getExtensions()->cloneExtensions());
2062 if (src.getAffiliationDescriptor())
2063 setAffiliationDescriptor(src.getAffiliationDescriptor()->cloneAffiliationDescriptor());
2064 if (src.getOrganization())
2065 setOrganization(src.getOrganization()->cloneOrganization());
2067 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2069 IDPSSODescriptor* idp=dynamic_cast<IDPSSODescriptor*>(*i);
2071 getIDPSSODescriptors().push_back(idp->cloneIDPSSODescriptor());
2075 SPSSODescriptor* sp=dynamic_cast<SPSSODescriptor*>(*i);
2077 getSPSSODescriptors().push_back(sp->cloneSPSSODescriptor());
2081 AuthnAuthorityDescriptor* authn=dynamic_cast<AuthnAuthorityDescriptor*>(*i);
2083 getAuthnAuthorityDescriptors().push_back(authn->cloneAuthnAuthorityDescriptor());
2087 AttributeAuthorityDescriptor* attr=dynamic_cast<AttributeAuthorityDescriptor*>(*i);
2089 getAttributeAuthorityDescriptors().push_back(attr->cloneAttributeAuthorityDescriptor());
2093 PDPDescriptor* pdp=dynamic_cast<PDPDescriptor*>(*i);
2095 getPDPDescriptors().push_back(pdp->clonePDPDescriptor());
2099 AuthnQueryDescriptorType* authnq=dynamic_cast<AuthnQueryDescriptorType*>(*i);
2101 getAuthnQueryDescriptorTypes().push_back(authnq->cloneAuthnQueryDescriptorType());
2105 AttributeQueryDescriptorType* attrq=dynamic_cast<AttributeQueryDescriptorType*>(*i);
2107 getAttributeQueryDescriptorTypes().push_back(attrq->cloneAttributeQueryDescriptorType());
2111 AuthzDecisionQueryDescriptorType* authzq=dynamic_cast<AuthzDecisionQueryDescriptorType*>(*i);
2113 getAuthzDecisionQueryDescriptorTypes().push_back(authzq->cloneAuthzDecisionQueryDescriptorType());
2117 RoleDescriptor* role=dynamic_cast<RoleDescriptor*>(*i);
2119 getRoleDescriptors().push_back(role->cloneRoleDescriptor());
2125 VectorOf(ContactPerson) v=getContactPersons();
2126 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
2128 v.push_back((*j)->cloneContactPerson());
2131 VectorOf(AdditionalMetadataLocation) w=getAdditionalMetadataLocations();
2132 for (vector<AdditionalMetadataLocation*>::const_iterator k=src.m_AdditionalMetadataLocations.begin(); k!=src.m_AdditionalMetadataLocations.end(); k++) {
2134 w.push_back((*k)->cloneAdditionalMetadataLocation());
2139 IMPL_XMLOBJECT_CLONE(EntityDescriptor);
2141 //IMPL_TYPED_CHILD(Signature);
2142 // Need customized setter.
2144 Signature* m_Signature;
2145 list<XMLObject*>::iterator m_pos_Signature;
2147 Signature* getSignature() const {
2151 void setSignature(Signature* sig) {
2152 prepareForAssignment(m_Signature,sig);
2153 *m_pos_Signature=m_Signature=sig;
2154 // Sync content reference back up.
2156 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2160 IMPL_STRING_ATTRIB(EntityID);
2161 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2162 IMPL_DATETIME_ATTRIB(CacheDuration,0);
2163 IMPL_TYPED_CHILD(Extensions);
2164 IMPL_TYPED_CHILDREN(RoleDescriptor,m_pos_AffiliationDescriptor);
2165 IMPL_TYPED_CHILDREN(IDPSSODescriptor,m_pos_AffiliationDescriptor);
2166 IMPL_TYPED_CHILDREN(SPSSODescriptor,m_pos_AffiliationDescriptor);
2167 IMPL_TYPED_CHILDREN(AuthnAuthorityDescriptor,m_pos_AffiliationDescriptor);
2168 IMPL_TYPED_CHILDREN(AttributeAuthorityDescriptor,m_pos_AffiliationDescriptor);
2169 IMPL_TYPED_CHILDREN(PDPDescriptor,m_pos_AffiliationDescriptor);
2170 IMPL_TYPED_CHILDREN(AuthnQueryDescriptorType,m_pos_AffiliationDescriptor);
2171 IMPL_TYPED_CHILDREN(AttributeQueryDescriptorType,m_pos_AffiliationDescriptor);
2172 IMPL_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,m_pos_AffiliationDescriptor);
2173 IMPL_TYPED_CHILD(AffiliationDescriptor);
2174 IMPL_TYPED_CHILD(Organization);
2175 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
2176 IMPL_TYPED_CHILDREN(AdditionalMetadataLocation,m_children.end());
2178 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
2179 if (!qualifiedName.hasNamespaceURI()) {
2180 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
2184 else if (XMLString::equals(qualifiedName.getLocalPart(),ENTITYID_ATTRIB_NAME)) {
2188 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
2189 setValidUntil(value);
2192 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
2193 setCacheDuration(value);
2197 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
2200 const IDPSSODescriptor* getIDPSSODescriptor(const XMLCh* protocol) const {
2201 for (vector<IDPSSODescriptor*>::const_iterator i=m_IDPSSODescriptors.begin(); i!=m_IDPSSODescriptors.end(); i++) {
2202 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2208 const SPSSODescriptor* getSPSSODescriptor(const XMLCh* protocol) const {
2209 for (vector<SPSSODescriptor*>::const_iterator i=m_SPSSODescriptors.begin(); i!=m_SPSSODescriptors.end(); i++) {
2210 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2216 const AuthnAuthorityDescriptor* getAuthnAuthorityDescriptor(const XMLCh* protocol) const {
2217 for (vector<AuthnAuthorityDescriptor*>::const_iterator i=m_AuthnAuthorityDescriptors.begin(); i!=m_AuthnAuthorityDescriptors.end(); i++) {
2218 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2224 const AttributeAuthorityDescriptor* getAttributeAuthorityDescriptor(const XMLCh* protocol) const {
2225 for (vector<AttributeAuthorityDescriptor*>::const_iterator i=m_AttributeAuthorityDescriptors.begin(); i!=m_AttributeAuthorityDescriptors.end(); i++) {
2226 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2232 const PDPDescriptor* getPDPDescriptor(const XMLCh* protocol) const {
2233 for (vector<PDPDescriptor*>::const_iterator i=m_PDPDescriptors.begin(); i!=m_PDPDescriptors.end(); i++) {
2234 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2240 const AuthnQueryDescriptorType* getAuthnQueryDescriptorType(const XMLCh* protocol) const {
2241 for (vector<AuthnQueryDescriptorType*>::const_iterator i=m_AuthnQueryDescriptorTypes.begin(); i!=m_AuthnQueryDescriptorTypes.end(); i++) {
2242 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2248 const AttributeQueryDescriptorType* getAttributeQueryDescriptorType(const XMLCh* protocol) const {
2249 for (vector<AttributeQueryDescriptorType*>::const_iterator i=m_AttributeQueryDescriptorTypes.begin(); i!=m_AttributeQueryDescriptorTypes.end(); i++) {
2250 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2256 const AuthzDecisionQueryDescriptorType* getAuthzDecisionQueryDescriptorType(const XMLCh* protocol) const {
2257 for (vector<AuthzDecisionQueryDescriptorType*>::const_iterator i=m_AuthzDecisionQueryDescriptorTypes.begin(); i!=m_AuthzDecisionQueryDescriptorTypes.end(); i++) {
2258 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2264 const RoleDescriptor* getRoleDescriptor(const xmltooling::QName& qname, const XMLCh* protocol) const {
2265 // Check for "known" elements/types.
2267 q.setNamespaceURI(SAML20MD_NS);
2268 q.setLocalPart(IDPSSODescriptor::LOCAL_NAME);
2270 return getIDPSSODescriptor(protocol);
2271 q.setLocalPart(SPSSODescriptor::LOCAL_NAME);
2273 return getSPSSODescriptor(protocol);
2274 q.setLocalPart(AuthnAuthorityDescriptor::LOCAL_NAME);
2276 return getAuthnAuthorityDescriptor(protocol);
2277 q.setLocalPart(AttributeAuthorityDescriptor::LOCAL_NAME);
2279 return getAttributeAuthorityDescriptor(protocol);
2280 q.setLocalPart(PDPDescriptor::LOCAL_NAME);
2282 return getPDPDescriptor(protocol);
2283 q.setNamespaceURI(samlconstants::SAML20MD_QUERY_EXT_NS);
2284 q.setLocalPart(AuthnQueryDescriptorType::TYPE_NAME);
2286 return getAuthnQueryDescriptorType(protocol);
2287 q.setLocalPart(AttributeQueryDescriptorType::TYPE_NAME);
2289 return getAttributeQueryDescriptorType(protocol);
2290 q.setLocalPart(AuthzDecisionQueryDescriptorType::TYPE_NAME);
2292 return getAuthzDecisionQueryDescriptorType(protocol);
2294 for (vector<RoleDescriptor*>::const_iterator i=m_RoleDescriptors.begin(); i!=m_RoleDescriptors.end(); i++) {
2295 if ((*i)->getSchemaType() && qname==(*((*i)->getSchemaType())) && (*i)->hasSupport(protocol) && (*i)->isValid())
2302 void marshallAttributes(DOMElement* domElement) const {
2303 MARSHALL_ID_ATTRIB(ID,ID,NULL);
2304 MARSHALL_STRING_ATTRIB(EntityID,ENTITYID,NULL);
2305 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2306 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2307 marshallExtensionAttributes(domElement);
2310 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2311 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2312 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2313 PROC_TYPED_CHILDREN(IDPSSODescriptor,SAML20MD_NS,false);
2314 PROC_TYPED_CHILDREN(SPSSODescriptor,SAML20MD_NS,false);
2315 PROC_TYPED_CHILDREN(AuthnAuthorityDescriptor,SAML20MD_NS,false);
2316 PROC_TYPED_CHILDREN(AttributeAuthorityDescriptor,SAML20MD_NS,false);
2317 PROC_TYPED_CHILDREN(PDPDescriptor,SAML20MD_NS,false);
2318 PROC_TYPED_CHILDREN(AuthnQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2319 PROC_TYPED_CHILDREN(AttributeQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2320 PROC_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2321 PROC_TYPED_CHILDREN(RoleDescriptor,SAML20MD_NS,false);
2322 PROC_TYPED_CHILD(AffiliationDescriptor,SAML20MD_NS,false);
2323 PROC_TYPED_CHILD(Organization,SAML20MD_NS,false);
2324 PROC_TYPED_CHILDREN(ContactPerson,SAML20MD_NS,false);
2325 PROC_TYPED_CHILDREN(AdditionalMetadataLocation,SAML20MD_NS,false);
2326 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2329 void processAttribute(const DOMAttr* attribute) {
2330 PROC_ID_ATTRIB(ID,ID,NULL);
2331 unmarshallExtensionAttribute(attribute);
2335 class SAML_DLLLOCAL EntitiesDescriptorImpl : public virtual EntitiesDescriptor,
2336 public virtual SignableObject,
2337 public AbstractComplexElement,
2338 public AbstractDOMCachingXMLObject,
2339 public AbstractXMLObjectMarshaller,
2340 public AbstractXMLObjectUnmarshaller
2344 m_ValidUntil=m_CacheDuration=NULL;
2345 m_children.push_back(NULL);
2346 m_children.push_back(NULL);
2349 m_pos_Signature=m_children.begin();
2350 m_pos_Extensions=m_pos_Signature;
2355 virtual ~EntitiesDescriptorImpl() {
2356 XMLString::release(&m_ID);
2357 XMLString::release(&m_Name);
2358 delete m_ValidUntil;
2359 delete m_CacheDuration;
2362 EntitiesDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
2363 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2367 EntitiesDescriptorImpl(const EntitiesDescriptorImpl& src)
2368 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2371 setName(src.getName());
2372 setValidUntil(src.getValidUntil());
2373 setCacheDuration(src.getCacheDuration());
2374 if (src.getSignature())
2375 setSignature(src.getSignature()->cloneSignature());
2376 if (src.getExtensions())
2377 setExtensions(src.getExtensions()->cloneExtensions());
2379 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2381 EntityDescriptor* e=dynamic_cast<EntityDescriptor*>(*i);
2383 getEntityDescriptors().push_back(e->cloneEntityDescriptor());
2387 EntitiesDescriptor* es=dynamic_cast<EntitiesDescriptor*>(*i);
2389 getEntitiesDescriptors().push_back(es->cloneEntitiesDescriptor());
2396 IMPL_XMLOBJECT_CLONE(EntitiesDescriptor);
2398 //IMPL_TYPED_CHILD(Signature);
2399 // Need customized setter.
2401 Signature* m_Signature;
2402 list<XMLObject*>::iterator m_pos_Signature;
2404 Signature* getSignature() const {
2408 void setSignature(Signature* sig) {
2409 prepareForAssignment(m_Signature,sig);
2410 *m_pos_Signature=m_Signature=sig;
2411 // Sync content reference back up.
2413 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2417 IMPL_STRING_ATTRIB(Name);
2418 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2419 IMPL_DATETIME_ATTRIB(CacheDuration,0);
2420 IMPL_TYPED_CHILD(Extensions);
2421 IMPL_TYPED_CHILDREN(EntityDescriptor,m_children.end());
2422 IMPL_TYPED_CHILDREN(EntitiesDescriptor,m_children.end());
2425 void marshallAttributes(DOMElement* domElement) const {
2426 MARSHALL_ID_ATTRIB(ID,ID,NULL);
2427 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
2428 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2429 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2432 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2433 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2434 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2435 PROC_TYPED_CHILDREN(EntityDescriptor,SAML20MD_NS,false);
2436 PROC_TYPED_CHILDREN(EntitiesDescriptor,SAML20MD_NS,false);
2437 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2440 void processAttribute(const DOMAttr* attribute) {
2441 PROC_ID_ATTRIB(ID,ID,NULL);
2442 PROC_STRING_ATTRIB(Name,NAME,NULL);
2443 PROC_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2444 PROC_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2451 #if defined (_MSC_VER)
2452 #pragma warning( pop )
2455 // Builder Implementations
2457 IMPL_XMLOBJECTBUILDER(AdditionalMetadataLocation);
2458 IMPL_XMLOBJECTBUILDER(AffiliateMember);
2459 IMPL_XMLOBJECTBUILDER(AffiliationDescriptor);
2460 IMPL_XMLOBJECTBUILDER(ArtifactResolutionService);
2461 IMPL_XMLOBJECTBUILDER(AssertionConsumerService);
2462 IMPL_XMLOBJECTBUILDER(AssertionIDRequestService);
2463 IMPL_XMLOBJECTBUILDER(AttributeAuthorityDescriptor);
2464 IMPL_XMLOBJECTBUILDER(AttributeConsumingService);
2465 IMPL_XMLOBJECTBUILDER(AttributeProfile);
2466 IMPL_XMLOBJECTBUILDER(AttributeQueryDescriptorType);
2467 IMPL_XMLOBJECTBUILDER(AttributeService);
2468 IMPL_XMLOBJECTBUILDER(AuthnAuthorityDescriptor);
2469 IMPL_XMLOBJECTBUILDER(AuthnQueryDescriptorType);
2470 IMPL_XMLOBJECTBUILDER(AuthnQueryService);
2471 IMPL_XMLOBJECTBUILDER(AuthzDecisionQueryDescriptorType);
2472 IMPL_XMLOBJECTBUILDER(AuthzService);
2473 IMPL_XMLOBJECTBUILDER(Company);
2474 IMPL_XMLOBJECTBUILDER(ContactPerson);
2475 IMPL_XMLOBJECTBUILDER(EmailAddress);
2476 IMPL_XMLOBJECTBUILDER(EndpointType);
2477 IMPL_XMLOBJECTBUILDER(EntitiesDescriptor);
2478 IMPL_XMLOBJECTBUILDER(EntityDescriptor);
2479 IMPL_XMLOBJECTBUILDER(Extensions);
2480 IMPL_XMLOBJECTBUILDER(GivenName);
2481 IMPL_XMLOBJECTBUILDER(IDPSSODescriptor);
2482 IMPL_XMLOBJECTBUILDER(IndexedEndpointType);
2483 IMPL_XMLOBJECTBUILDER(KeyDescriptor);
2484 IMPL_XMLOBJECTBUILDER(localizedNameType);
2485 IMPL_XMLOBJECTBUILDER(localizedURIType);
2486 IMPL_XMLOBJECTBUILDER(ManageNameIDService);
2487 IMPL_XMLOBJECTBUILDER(NameIDFormat);
2488 IMPL_XMLOBJECTBUILDER(NameIDMappingService);
2489 IMPL_XMLOBJECTBUILDER(Organization);
2490 IMPL_XMLOBJECTBUILDER(OrganizationName);
2491 IMPL_XMLOBJECTBUILDER(OrganizationDisplayName);
2492 IMPL_XMLOBJECTBUILDER(OrganizationURL);
2493 IMPL_XMLOBJECTBUILDER(PDPDescriptor);
2494 IMPL_XMLOBJECTBUILDER(RequestedAttribute);
2495 IMPL_XMLOBJECTBUILDER(ServiceDescription);
2496 IMPL_XMLOBJECTBUILDER(ServiceName);
2497 IMPL_XMLOBJECTBUILDER(SingleLogoutService);
2498 IMPL_XMLOBJECTBUILDER(SingleSignOnService);
2499 IMPL_XMLOBJECTBUILDER(SPSSODescriptor);
2500 IMPL_XMLOBJECTBUILDER(SurName);
2501 IMPL_XMLOBJECTBUILDER(TelephoneNumber);
2503 IMPL_XMLOBJECTBUILDER(ActionNamespace);
2504 IMPL_XMLOBJECTBUILDER(SourceID);
2506 const XMLCh ActionNamespace::LOCAL_NAME[] = UNICODE_LITERAL_15(A,c,t,i,o,n,N,a,m,e,s,p,a,c,e);
2507 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);
2508 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);
2509 const XMLCh AdditionalMetadataLocation::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(n,a,m,e,s,p,a,c,e);
2510 const XMLCh AffiliateMember::LOCAL_NAME[] = UNICODE_LITERAL_15(A,f,f,i,l,i,a,t,e,M,e,m,b,e,r);
2511 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);
2512 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);
2513 const XMLCh AffiliationDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2514 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);
2515 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);
2516 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);
2517 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);
2518 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);
2519 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);
2520 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);
2521 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);
2522 const XMLCh AttributeConsumingService::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
2523 const XMLCh AttributeConsumingService::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
2524 const XMLCh AttributeProfile::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,P,r,o,f,i,l,e);
2525 const XMLCh AttributeQueryDescriptorType::LOCAL_NAME[] =UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2526 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);
2527 const XMLCh AttributeService::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,S,e,r,v,i,c,e);
2528 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);
2529 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);
2530 const XMLCh AuthnQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2531 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);
2532 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);
2533 const XMLCh AuthzDecisionQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2534 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);
2535 const XMLCh AuthzService::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,z,S,e,r,v,i,c,e);
2536 const XMLCh CacheableSAMLObject::CACHEDURATION_ATTRIB_NAME[] = UNICODE_LITERAL_13(c,a,c,h,e,D,u,r,a,t,i,o,n);
2537 const XMLCh Company::LOCAL_NAME[] = UNICODE_LITERAL_7(C,o,m,p,a,n,y);
2538 const XMLCh ContactPerson::LOCAL_NAME[] = UNICODE_LITERAL_13(C,o,n,t,a,c,t,P,e,r,s,o,n);
2539 const XMLCh ContactPerson::TYPE_NAME[] = UNICODE_LITERAL_11(C,o,n,t,a,c,t,T,y,p,e);
2540 const XMLCh ContactPerson::CONTACTTYPE_ATTRIB_NAME[] = UNICODE_LITERAL_11(c,o,n,t,a,c,t,T,y,p,e);
2541 const XMLCh ContactPerson::CONTACT_TECHNICAL[] = UNICODE_LITERAL_9(t,e,c,h,n,i,c,a,l);
2542 const XMLCh ContactPerson::CONTACT_SUPPORT[] = UNICODE_LITERAL_7(s,u,p,p,o,r,t);
2543 const XMLCh ContactPerson::CONTACT_ADMINISTRATIVE[] = UNICODE_LITERAL_14(a,d,m,i,n,i,s,t,r,a,t,i,v,e);
2544 const XMLCh ContactPerson::CONTACT_BILLING[] = UNICODE_LITERAL_7(b,i,l,l,i,n,g);
2545 const XMLCh ContactPerson::CONTACT_OTHER[] = UNICODE_LITERAL_5(o,t,h,e,r);
2546 const XMLCh EmailAddress::LOCAL_NAME[] = UNICODE_LITERAL_12(E,m,a,i,l,A,d,d,r,e,s,s);
2547 const XMLCh EndpointType::LOCAL_NAME[] = {chNull};
2548 const XMLCh EndpointType::TYPE_NAME[] = UNICODE_LITERAL_12(E,n,d,p,o,i,n,t,T,y,p,e);
2549 const XMLCh EndpointType::BINDING_ATTRIB_NAME[] = UNICODE_LITERAL_7(B,i,n,d,i,n,g);
2550 const XMLCh EndpointType::LOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_8(L,o,c,a,t,i,o,n);
2551 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);
2552 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);
2553 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);
2554 const XMLCh EntitiesDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2555 const XMLCh EntitiesDescriptor::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e);
2556 const XMLCh EntityDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,D,e,s,c,r,i,p,t,o,r);
2557 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);
2558 const XMLCh EntityDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2559 const XMLCh EntityDescriptor::ENTITYID_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,n,t,i,t,y,I,D);
2560 const XMLCh Extensions::LOCAL_NAME[] = UNICODE_LITERAL_10(E,x,t,e,n,s,i,o,n,s);
2561 const XMLCh Extensions::TYPE_NAME[] = UNICODE_LITERAL_14(E,x,t,e,n,s,i,o,n,s,T,y,p,e);
2562 const XMLCh GivenName::LOCAL_NAME[] = UNICODE_LITERAL_9(G,i,v,e,n,N,a,m,e);
2563 const XMLCh IDPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(I,D,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
2564 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);
2565 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);
2566 const XMLCh IndexedEndpointType::LOCAL_NAME[] = {chNull};
2567 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);
2568 const XMLCh IndexedEndpointType::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
2569 const XMLCh IndexedEndpointType::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
2570 const XMLCh KeyDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(K,e,y,D,e,s,c,r,i,p,t,o,r);
2571 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);
2572 const XMLCh KeyDescriptor::USE_ATTRIB_NAME[] = UNICODE_LITERAL_3(u,s,e);
2573 const XMLCh KeyDescriptor::KEYTYPE_ENCRYPTION[] = UNICODE_LITERAL_10(e,n,c,r,y,p,t,i,o,n);
2574 const XMLCh KeyDescriptor::KEYTYPE_SIGNING[] = UNICODE_LITERAL_7(s,i,g,n,i,n,g);
2575 const XMLCh localizedNameType::LOCAL_NAME[] = {chNull};
2576 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);
2577 const XMLCh localizedNameType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2578 const XMLCh localizedURIType::LOCAL_NAME[] = {chNull};
2579 const XMLCh localizedURIType::TYPE_NAME[] = UNICODE_LITERAL_16(l,o,c,a,l,i,z,e,d,U,R,I,T,y,p,e);
2580 const XMLCh localizedURIType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2581 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);
2582 const XMLCh NameIDFormat::LOCAL_NAME[] = UNICODE_LITERAL_12(N,a,m,e,I,D,F,o,r,m,a,t);
2583 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);
2584 const XMLCh Organization::LOCAL_NAME[] = UNICODE_LITERAL_12(O,r,g,a,n,i,z,a,t,i,o,n);
2585 const XMLCh Organization::TYPE_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,T,y,p,e);
2586 const XMLCh OrganizationName::LOCAL_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,N,a,m,e);
2587 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);
2588 const XMLCh OrganizationURL::LOCAL_NAME[] = UNICODE_LITERAL_15(O,r,g,a,n,i,z,a,t,i,o,n,U,R,L);
2589 const XMLCh PDPDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(P,D,P,D,e,s,c,r,i,p,t,o,r);
2590 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);
2591 const XMLCh QueryDescriptorType::LOCAL_NAME[] = {chNull};
2592 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);
2593 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);
2594 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);
2595 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);
2596 const XMLCh RequestedAttribute::ISREQUIRED_ATTRIB_NAME[] = UNICODE_LITERAL_10(i,s,R,e,q,u,i,r,e,d);
2597 const XMLCh RoleDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2598 const XMLCh RoleDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2599 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);
2600 const XMLCh RoleDescriptor::ERRORURL_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,r,r,o,r,U,R,L);
2601 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);
2602 const XMLCh ServiceName::LOCAL_NAME[] = UNICODE_LITERAL_11(S,e,r,v,i,c,e,N,a,m,e);
2603 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);
2604 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);
2605 const XMLCh SourceID::LOCAL_NAME[] = UNICODE_LITERAL_8(S,o,u,r,c,e,I,D);
2606 const XMLCh SPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_15(S,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
2607 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);
2608 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);
2609 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);
2610 const XMLCh SSODescriptorType::LOCAL_NAME[] = {chNull};
2611 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);
2612 const XMLCh SurName::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,r,N,a,m,e);
2613 const XMLCh TelephoneNumber::LOCAL_NAME[] = UNICODE_LITERAL_15(T,e,l,e,p,h,o,n,e,N,u,m,b,e,r);
2614 const XMLCh TimeBoundSAMLObject::VALIDUNTIL_ATTRIB_NAME[] = UNICODE_LITERAL_10(v,a,l,i,d,U,n,t,i,l);