2 * Copyright 2001-2006 Internet2
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
20 * Implementation classes for SAML 2.0 Assertions schema
24 #include "exceptions.h"
25 #include "saml2/metadata/Metadata.h"
27 #include <xmltooling/AbstractChildlessElement.h>
28 #include <xmltooling/AbstractComplexElement.h>
29 #include <xmltooling/AbstractElementProxy.h>
30 #include <xmltooling/AbstractSimpleElement.h>
31 #include <xmltooling/impl/AnyElement.h>
32 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
33 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
34 #include <xmltooling/util/XMLHelper.h>
35 #include <xmltooling/validation/AbstractValidatingXMLObject.h>
38 #include <xercesc/util/XMLUniDefs.hpp>
40 using namespace opensaml::saml2md;
41 using namespace opensaml::saml2;
42 using namespace opensaml;
43 using namespace xmlencryption;
44 using namespace xmlsignature;
45 using namespace xmltooling;
48 #if defined (_MSC_VER)
49 #pragma warning( push )
50 #pragma warning( disable : 4250 4251 )
56 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AffiliateMember);
57 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AttributeProfile);
58 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Company);
59 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,EmailAddress);
60 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,GivenName);
61 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,NameIDFormat);
62 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,SurName);
63 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,TelephoneNumber);
65 class SAML_DLLLOCAL localizedNameTypeImpl : public virtual localizedNameType,
66 public AbstractSimpleElement,
67 public AbstractChildlessElement,
68 public AbstractDOMCachingXMLObject,
69 public AbstractValidatingXMLObject,
70 public AbstractXMLObjectMarshaller,
71 public AbstractXMLObjectUnmarshaller
78 localizedNameTypeImpl() {
83 virtual ~localizedNameTypeImpl() {
84 XMLString::release(&m_Lang);
87 localizedNameTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
88 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
92 localizedNameTypeImpl(const localizedNameTypeImpl& src)
93 : AbstractXMLObject(src), AbstractSimpleElement(src),
94 AbstractDOMCachingXMLObject(src), AbstractValidatingXMLObject(src) {
96 setLang(src.getLang());
99 IMPL_XMLOBJECT_CLONE(localizedNameType);
100 IMPL_XMLOBJECT_CONTENT;
101 IMPL_STRING_ATTRIB(Lang);
104 void marshallAttributes(DOMElement* domElement) const {
105 MARSHALL_STRING_ATTRIB(Lang,LANG,XMLConstants::XML_NS);
108 void processAttribute(const DOMAttr* attribute) {
109 PROC_STRING_ATTRIB(Lang,LANG,XMLConstants::XML_NS);
110 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
114 class SAML_DLLLOCAL localizedURITypeImpl : public virtual localizedURIType,
115 public AbstractSimpleElement,
116 public AbstractChildlessElement,
117 public AbstractDOMCachingXMLObject,
118 public AbstractValidatingXMLObject,
119 public AbstractXMLObjectMarshaller,
120 public AbstractXMLObjectUnmarshaller
127 localizedURITypeImpl() {
132 virtual ~localizedURITypeImpl() {
133 XMLString::release(&m_Lang);
136 localizedURITypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
137 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
141 localizedURITypeImpl(const localizedURITypeImpl& src)
142 : AbstractXMLObject(src), AbstractSimpleElement(src),
143 AbstractDOMCachingXMLObject(src), AbstractValidatingXMLObject(src) {
145 setLang(src.getLang());
148 IMPL_XMLOBJECT_CLONE(localizedURIType);
149 IMPL_XMLOBJECT_CONTENT;
150 IMPL_STRING_ATTRIB(Lang);
153 void marshallAttributes(DOMElement* domElement) const {
154 MARSHALL_STRING_ATTRIB(Lang,LANG,XMLConstants::XML_NS);
157 void processAttribute(const DOMAttr* attribute) {
158 PROC_STRING_ATTRIB(Lang,LANG,XMLConstants::XML_NS);
159 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
163 class SAML_DLLLOCAL OrganizationNameImpl : public virtual OrganizationName, public localizedNameTypeImpl
166 virtual ~OrganizationNameImpl() {}
168 OrganizationNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
169 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
171 OrganizationNameImpl(const OrganizationNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
173 IMPL_XMLOBJECT_CLONE(OrganizationName);
174 localizedNameType* clonelocalizedNameType() const {
175 return new OrganizationNameImpl(*this);
179 class SAML_DLLLOCAL OrganizationDisplayNameImpl : public virtual OrganizationDisplayName, public localizedNameTypeImpl
182 virtual ~OrganizationDisplayNameImpl() {}
184 OrganizationDisplayNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
185 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
187 OrganizationDisplayNameImpl(const OrganizationDisplayNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
189 IMPL_XMLOBJECT_CLONE(OrganizationDisplayName);
190 localizedNameType* clonelocalizedNameType() const {
191 return new OrganizationDisplayNameImpl(*this);
195 class SAML_DLLLOCAL OrganizationURLImpl : public virtual OrganizationURL, public localizedURITypeImpl
198 virtual ~OrganizationURLImpl() {}
200 OrganizationURLImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
201 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
203 OrganizationURLImpl(const OrganizationURLImpl& src) : AbstractXMLObject(src), localizedURITypeImpl(src) {}
205 IMPL_XMLOBJECT_CLONE(OrganizationURL);
206 localizedURIType* clonelocalizedURIType() const {
207 return new OrganizationURLImpl(*this);
211 class SAML_DLLLOCAL ServiceNameImpl : public virtual ServiceName, public localizedNameTypeImpl
214 virtual ~ServiceNameImpl() {}
216 ServiceNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
217 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
219 ServiceNameImpl(const ServiceNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
221 IMPL_XMLOBJECT_CLONE(ServiceName);
222 localizedNameType* clonelocalizedNameType() const {
223 return new ServiceNameImpl(*this);
227 class SAML_DLLLOCAL ServiceDescriptionImpl : public virtual ServiceDescription, public localizedNameTypeImpl
230 virtual ~ServiceDescriptionImpl() {}
232 ServiceDescriptionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
233 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
235 ServiceDescriptionImpl(const ServiceDescriptionImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
237 IMPL_XMLOBJECT_CLONE(ServiceDescription);
238 localizedNameType* clonelocalizedNameType() const {
239 return new ServiceDescriptionImpl(*this);
243 class SAML_DLLLOCAL ExtensionsImpl : public virtual Extensions,
244 public AbstractDOMCachingXMLObject,
245 public AbstractElementProxy,
246 public AbstractValidatingXMLObject,
247 public AbstractXMLObjectMarshaller,
248 public AbstractXMLObjectUnmarshaller
251 virtual ~ExtensionsImpl() {}
253 ExtensionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
254 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
257 ExtensionsImpl(const ExtensionsImpl& src)
258 : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src), AbstractElementProxy(src),
259 AbstractValidatingXMLObject(src) {
260 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
262 getXMLObjects().push_back((*i)->clone());
267 IMPL_XMLOBJECT_CLONE(Extensions);
270 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
272 const XMLCh* nsURI=root->getNamespaceURI();
273 if (!XMLString::equals(nsURI,SAMLConstants::SAML20MD_NS) && nsURI && *nsURI) {
274 getXMLObjects().push_back(childXMLObject);
278 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
282 class SAML_DLLLOCAL OrganizationImpl : public virtual Organization,
283 public AbstractComplexElement,
284 public AbstractAttributeExtensibleXMLObject,
285 public AbstractDOMCachingXMLObject,
286 public AbstractValidatingXMLObject,
287 public AbstractXMLObjectMarshaller,
288 public AbstractXMLObjectUnmarshaller
290 list<XMLObject*>::iterator m_pos_OrganizationDisplayName;
291 list<XMLObject*>::iterator m_pos_OrganizationURL;
294 m_children.push_back(NULL);
295 m_children.push_back(NULL);
296 m_children.push_back(NULL);
298 m_pos_Extensions=m_children.begin();
299 m_pos_OrganizationDisplayName=m_pos_Extensions;
300 ++m_pos_OrganizationDisplayName;
301 m_pos_OrganizationURL=m_pos_OrganizationDisplayName;
302 ++m_pos_OrganizationURL;
305 virtual ~OrganizationImpl() {}
307 OrganizationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
308 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
312 OrganizationImpl(const OrganizationImpl& src)
313 : AbstractXMLObject(src),
314 AbstractAttributeExtensibleXMLObject(src),
315 AbstractDOMCachingXMLObject(src),
316 AbstractValidatingXMLObject(src) {
318 if (src.getExtensions())
319 setExtensions(src.getExtensions()->cloneExtensions());
320 VectorOf(OrganizationName) v=getOrganizationNames();
321 for (vector<OrganizationName*>::const_iterator i=src.m_OrganizationNames.begin(); i!=src.m_OrganizationNames.end(); i++) {
323 v.push_back((*i)->cloneOrganizationName());
326 VectorOf(OrganizationDisplayName) w=getOrganizationDisplayNames();
327 for (vector<OrganizationDisplayName*>::const_iterator j=src.m_OrganizationDisplayNames.begin(); j!=src.m_OrganizationDisplayNames.end(); j++) {
329 w.push_back((*j)->cloneOrganizationDisplayName());
332 VectorOf(OrganizationURL) x=getOrganizationURLs();
333 for (vector<OrganizationURL*>::const_iterator k=src.m_OrganizationURLs.begin(); k!=src.m_OrganizationURLs.end(); k++) {
335 x.push_back((*k)->cloneOrganizationURL());
340 IMPL_XMLOBJECT_CLONE(Organization);
341 IMPL_TYPED_CHILD(Extensions);
342 IMPL_TYPED_CHILDREN(OrganizationName,m_pos_OrganizationDisplayName);
343 IMPL_TYPED_CHILDREN(OrganizationDisplayName,m_pos_OrganizationURL);
344 IMPL_TYPED_CHILDREN(OrganizationURL,m_children.end());
347 void marshallAttributes(DOMElement* domElement) const {
348 // Take care of wildcard.
349 for (map<QName,XMLCh*>::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) {
350 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart());
351 if (i->first.hasPrefix())
352 attr->setPrefix(i->first.getPrefix());
353 attr->setNodeValue(i->second);
354 domElement->setAttributeNode(attr);
358 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
359 PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20MD_NS,false);
360 PROC_TYPED_CHILDREN(OrganizationName,SAMLConstants::SAML20MD_NS,false);
361 PROC_TYPED_CHILDREN(OrganizationDisplayName,SAMLConstants::SAML20MD_NS,false);
362 PROC_TYPED_CHILDREN(OrganizationURL,SAMLConstants::SAML20MD_NS,false);
363 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
366 void processAttribute(const DOMAttr* attribute) {
367 QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix());
368 setAttribute(q,attribute->getNodeValue());
372 class SAML_DLLLOCAL ContactPersonImpl : public virtual ContactPerson,
373 public AbstractComplexElement,
374 public AbstractAttributeExtensibleXMLObject,
375 public AbstractDOMCachingXMLObject,
376 public AbstractValidatingXMLObject,
377 public AbstractXMLObjectMarshaller,
378 public AbstractXMLObjectUnmarshaller
380 list<XMLObject*>::iterator m_pos_TelephoneNumber;
384 m_children.push_back(NULL);
385 m_children.push_back(NULL);
386 m_children.push_back(NULL);
387 m_children.push_back(NULL);
388 m_children.push_back(NULL);
393 m_pos_Extensions=m_children.begin();
394 m_pos_Company=m_pos_Extensions;
396 m_pos_GivenName=m_pos_Company;
398 m_pos_SurName=m_pos_GivenName;
400 m_pos_TelephoneNumber=m_pos_SurName;
401 ++m_pos_TelephoneNumber;
404 virtual ~ContactPersonImpl() {}
406 ContactPersonImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
407 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
411 ContactPersonImpl(const ContactPersonImpl& src)
412 : AbstractXMLObject(src),
413 AbstractAttributeExtensibleXMLObject(src),
414 AbstractDOMCachingXMLObject(src),
415 AbstractValidatingXMLObject(src) {
417 if (src.getExtensions())
418 setExtensions(src.getExtensions()->cloneExtensions());
419 if (src.getCompany())
420 setCompany(src.getCompany()->cloneCompany());
421 if (src.getGivenName())
422 setGivenName(src.getGivenName()->cloneGivenName());
423 if (src.getSurName())
424 setSurName(src.getSurName()->cloneSurName());
426 VectorOf(EmailAddress) v=getEmailAddresss();
427 for (vector<EmailAddress*>::const_iterator i=src.m_EmailAddresss.begin(); i!=src.m_EmailAddresss.end(); i++) {
429 v.push_back((*i)->cloneEmailAddress());
432 VectorOf(TelephoneNumber) w=getTelephoneNumbers();
433 for (vector<TelephoneNumber*>::const_iterator j=src.m_TelephoneNumbers.begin(); j!=src.m_TelephoneNumbers.end(); j++) {
435 w.push_back((*j)->cloneTelephoneNumber());
440 IMPL_XMLOBJECT_CLONE(ContactPerson);
441 IMPL_STRING_ATTRIB(ContactType);
442 IMPL_TYPED_CHILD(Extensions);
443 IMPL_TYPED_CHILD(Company);
444 IMPL_TYPED_CHILD(GivenName);
445 IMPL_TYPED_CHILD(SurName);
446 IMPL_TYPED_CHILDREN(EmailAddress,m_pos_TelephoneNumber);
447 IMPL_TYPED_CHILDREN(TelephoneNumber,m_children.end());
449 void setAttribute(QName& qualifiedName, const XMLCh* value) {
450 if (!qualifiedName.hasNamespaceURI()) {
451 if (XMLString::equals(qualifiedName.getLocalPart(),CONTACTTYPE_ATTRIB_NAME)) {
452 setContactType(value);
456 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value);
460 void marshallAttributes(DOMElement* domElement) const {
461 MARSHALL_STRING_ATTRIB(ContactType,CONTACTTYPE,NULL);
463 // Take care of wildcard.
464 for (map<QName,XMLCh*>::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) {
465 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart());
466 if (i->first.hasPrefix())
467 attr->setPrefix(i->first.getPrefix());
468 attr->setNodeValue(i->second);
469 domElement->setAttributeNode(attr);
473 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
474 PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20MD_NS,false);
475 PROC_TYPED_CHILD(Company,SAMLConstants::SAML20MD_NS,false);
476 PROC_TYPED_CHILD(GivenName,SAMLConstants::SAML20MD_NS,false);
477 PROC_TYPED_CHILD(SurName,SAMLConstants::SAML20MD_NS,false);
478 PROC_TYPED_CHILDREN(EmailAddress,SAMLConstants::SAML20MD_NS,false);
479 PROC_TYPED_CHILDREN(TelephoneNumber,SAMLConstants::SAML20MD_NS,false);
480 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
483 void processAttribute(const DOMAttr* attribute) {
484 QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix());
485 setAttribute(q,attribute->getNodeValue());
489 class SAML_DLLLOCAL AdditionalMetadataLocationImpl : public virtual AdditionalMetadataLocation,
490 public AbstractSimpleElement,
491 public AbstractChildlessElement,
492 public AbstractDOMCachingXMLObject,
493 public AbstractValidatingXMLObject,
494 public AbstractXMLObjectMarshaller,
495 public AbstractXMLObjectUnmarshaller
502 virtual ~AdditionalMetadataLocationImpl() {
503 XMLString::release(&m_Namespace);
506 AdditionalMetadataLocationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
507 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
511 AdditionalMetadataLocationImpl(const AdditionalMetadataLocationImpl& src)
512 : AbstractXMLObject(src), AbstractSimpleElement(src),
513 AbstractDOMCachingXMLObject(src), AbstractValidatingXMLObject(src) {
517 IMPL_XMLOBJECT_CLONE(AdditionalMetadataLocation);
518 IMPL_XMLOBJECT_CONTENT;
519 IMPL_STRING_ATTRIB(Namespace);
522 void marshallAttributes(DOMElement* domElement) const {
523 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
526 void processAttribute(const DOMAttr* attribute) {
527 PROC_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
528 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
532 class SAML_DLLLOCAL KeyDescriptorImpl : public virtual KeyDescriptor,
533 public AbstractComplexElement,
534 public AbstractDOMCachingXMLObject,
535 public AbstractValidatingXMLObject,
536 public AbstractXMLObjectMarshaller,
537 public AbstractXMLObjectUnmarshaller
542 m_children.push_back(NULL);
543 m_pos_KeyInfo=m_children.begin();
546 virtual ~KeyDescriptorImpl() {
547 XMLString::release(&m_Use);
550 KeyDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
551 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
555 KeyDescriptorImpl(const KeyDescriptorImpl& src)
556 : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src), AbstractValidatingXMLObject(src) {
558 setUse(src.getUse());
559 if (src.getKeyInfo())
560 setKeyInfo(src.getKeyInfo()->cloneKeyInfo());
561 VectorOf(EncryptionMethod) v=getEncryptionMethods();
562 for (vector<EncryptionMethod*>::const_iterator i=src.m_EncryptionMethods.begin(); i!=src.m_EncryptionMethods.end(); i++) {
564 v.push_back((*i)->cloneEncryptionMethod());
569 IMPL_XMLOBJECT_CLONE(KeyDescriptor);
570 IMPL_STRING_ATTRIB(Use);
571 IMPL_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature);
572 IMPL_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,m_children.end());
575 void marshallAttributes(DOMElement* domElement) const {
576 MARSHALL_STRING_ATTRIB(Use,USE,NULL);
579 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
580 PROC_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature,XMLConstants::XMLSIG_NS,false);
581 PROC_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,XMLConstants::XMLENC_NS,false);
582 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
585 void processAttribute(const DOMAttr* attribute) {
586 PROC_STRING_ATTRIB(Use,USE,NULL);
587 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
591 class SAML_DLLLOCAL EndpointTypeImpl : public virtual EndpointType,
592 public AbstractDOMCachingXMLObject,
593 public AbstractElementProxy,
594 public AbstractAttributeExtensibleXMLObject,
595 public AbstractValidatingXMLObject,
596 public AbstractXMLObjectMarshaller,
597 public AbstractXMLObjectUnmarshaller
600 m_Binding=m_Location=m_ResponseLocation=NULL;
609 virtual ~EndpointTypeImpl() {
610 XMLString::release(&m_Binding);
611 XMLString::release(&m_Location);
612 XMLString::release(&m_ResponseLocation);
615 EndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
616 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
619 EndpointTypeImpl(const EndpointTypeImpl& src)
620 : AbstractXMLObject(src),
621 AbstractDOMCachingXMLObject(src),
622 AbstractElementProxy(src),
623 AbstractAttributeExtensibleXMLObject(src),
624 AbstractValidatingXMLObject(src) {
625 setBinding(src.getBinding());
626 setLocation(src.getLocation());
627 setResponseLocation(src.getResponseLocation());
628 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
630 getXMLObjects().push_back((*i)->clone());
635 IMPL_XMLOBJECT_CLONE(EndpointType);
636 IMPL_STRING_ATTRIB(Binding);
637 IMPL_STRING_ATTRIB(Location);
638 IMPL_STRING_ATTRIB(ResponseLocation);
640 void setAttribute(QName& qualifiedName, const XMLCh* value) {
641 if (!qualifiedName.hasNamespaceURI()) {
642 if (XMLString::equals(qualifiedName.getLocalPart(),BINDING_ATTRIB_NAME)) {
646 else if (XMLString::equals(qualifiedName.getLocalPart(),LOCATION_ATTRIB_NAME)) {
650 else if (XMLString::equals(qualifiedName.getLocalPart(),RESPONSELOCATION_ATTRIB_NAME)) {
651 setResponseLocation(value);
655 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value);
658 void marshallAttributes(DOMElement* domElement) const {
659 MARSHALL_STRING_ATTRIB(Binding,BINDING,NULL);
660 MARSHALL_STRING_ATTRIB(Location,LOCATION,NULL);
661 MARSHALL_STRING_ATTRIB(ResponseLocation,RESPONSELOCATION,NULL);
663 // Take care of wildcard.
664 for (map<QName,XMLCh*>::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) {
665 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart());
666 if (i->first.hasPrefix())
667 attr->setPrefix(i->first.getPrefix());
668 attr->setNodeValue(i->second);
669 domElement->setAttributeNode(attr);
673 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
675 const XMLCh* nsURI=root->getNamespaceURI();
676 if (!XMLString::equals(nsURI,SAMLConstants::SAML20MD_NS) && nsURI && *nsURI) {
677 getXMLObjects().push_back(childXMLObject);
681 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
684 void processAttribute(const DOMAttr* attribute) {
685 QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix());
686 setAttribute(q,attribute->getNodeValue());
690 class SAML_DLLLOCAL IndexedEndpointTypeImpl : public virtual IndexedEndpointType, public EndpointTypeImpl
694 m_isDefault=XMLConstants::XML_BOOL_NULL;
698 IndexedEndpointTypeImpl() {
702 virtual ~IndexedEndpointTypeImpl() {
703 XMLString::release(&m_Index);
706 IndexedEndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
707 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
709 IndexedEndpointTypeImpl(const IndexedEndpointTypeImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {
710 setIndex(src.m_Index);
711 isDefault(src.m_isDefault);
714 IMPL_XMLOBJECT_CLONE(IndexedEndpointType);
715 EndpointType* cloneEndpointType() const {
716 return new IndexedEndpointTypeImpl(*this);
719 IMPL_INTEGER_ATTRIB(Index);
720 IMPL_BOOLEAN_ATTRIB(isDefault);
722 void setAttribute(QName& qualifiedName, const XMLCh* value) {
723 if (!qualifiedName.hasNamespaceURI()) {
724 if (XMLString::equals(qualifiedName.getLocalPart(),INDEX_ATTRIB_NAME)) {
728 else if (XMLString::equals(qualifiedName.getLocalPart(),ISDEFAULT_ATTRIB_NAME)) {
733 EndpointTypeImpl::setAttribute(qualifiedName, value);
737 void marshallAttributes(DOMElement* domElement) const {
738 MARSHALL_INTEGER_ATTRIB(Index,INDEX,NULL);
739 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
740 EndpointTypeImpl::marshallAttributes(domElement);
744 class SAML_DLLLOCAL ArtifactResolutionServiceImpl : public virtual ArtifactResolutionService, public IndexedEndpointTypeImpl
747 virtual ~ArtifactResolutionServiceImpl() {}
749 ArtifactResolutionServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
750 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
752 ArtifactResolutionServiceImpl(const ArtifactResolutionServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
754 IMPL_XMLOBJECT_CLONE(ArtifactResolutionService);
755 IndexedEndpointType* cloneIndexedEndpointType() const {
756 return new ArtifactResolutionServiceImpl(*this);
758 EndpointType* cloneEndpointType() const {
759 return new ArtifactResolutionServiceImpl(*this);
763 class SAML_DLLLOCAL SingleLogoutServiceImpl : public virtual SingleLogoutService, public EndpointTypeImpl
766 virtual ~SingleLogoutServiceImpl() {}
768 SingleLogoutServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
769 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
771 SingleLogoutServiceImpl(const SingleLogoutServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
773 IMPL_XMLOBJECT_CLONE(SingleLogoutService);
774 EndpointType* cloneEndpointType() const {
775 return new SingleLogoutServiceImpl(*this);
779 class SAML_DLLLOCAL ManageNameIDServiceImpl : public virtual ManageNameIDService, public EndpointTypeImpl
782 virtual ~ManageNameIDServiceImpl() {}
784 ManageNameIDServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
785 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
787 ManageNameIDServiceImpl(const ManageNameIDServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
789 IMPL_XMLOBJECT_CLONE(ManageNameIDService);
790 EndpointType* cloneEndpointType() const {
791 return new ManageNameIDServiceImpl(*this);
795 class SAML_DLLLOCAL SingleSignOnServiceImpl : public virtual SingleSignOnService, public EndpointTypeImpl
798 virtual ~SingleSignOnServiceImpl() {}
800 SingleSignOnServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
801 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
803 SingleSignOnServiceImpl(const SingleSignOnServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
805 IMPL_XMLOBJECT_CLONE(SingleSignOnService);
806 EndpointType* cloneEndpointType() const {
807 return new SingleSignOnServiceImpl(*this);
811 class SAML_DLLLOCAL NameIDMappingServiceImpl : public virtual NameIDMappingService, public EndpointTypeImpl
814 virtual ~NameIDMappingServiceImpl() {}
816 NameIDMappingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
817 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
819 NameIDMappingServiceImpl(const NameIDMappingServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
821 IMPL_XMLOBJECT_CLONE(NameIDMappingService);
822 EndpointType* cloneEndpointType() const {
823 return new NameIDMappingServiceImpl(*this);
827 class SAML_DLLLOCAL AssertionIDRequestServiceImpl : public virtual AssertionIDRequestService, public EndpointTypeImpl
830 virtual ~AssertionIDRequestServiceImpl() {}
832 AssertionIDRequestServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
833 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
835 AssertionIDRequestServiceImpl(const AssertionIDRequestServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
837 IMPL_XMLOBJECT_CLONE(AssertionIDRequestService);
838 EndpointType* cloneEndpointType() const {
839 return new AssertionIDRequestServiceImpl(*this);
843 class SAML_DLLLOCAL AssertionConsumerServiceImpl : public virtual AssertionConsumerService, public IndexedEndpointTypeImpl
846 virtual ~AssertionConsumerServiceImpl() {}
848 AssertionConsumerServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
849 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
851 AssertionConsumerServiceImpl(const AssertionConsumerServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
853 IMPL_XMLOBJECT_CLONE(AssertionConsumerService);
854 EndpointType* cloneEndpointType() const {
855 return new AssertionConsumerServiceImpl(*this);
857 IndexedEndpointType* cloneIndexedEndpointType() const {
858 return new AssertionConsumerServiceImpl(*this);
862 class SAML_DLLLOCAL AuthnQueryServiceImpl : public virtual AuthnQueryService, public EndpointTypeImpl
865 virtual ~AuthnQueryServiceImpl() {}
867 AuthnQueryServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
868 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
870 AuthnQueryServiceImpl(const AuthnQueryServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
872 IMPL_XMLOBJECT_CLONE(AuthnQueryService);
873 EndpointType* cloneEndpointType() const {
874 return new AuthnQueryServiceImpl(*this);
878 class SAML_DLLLOCAL AuthzServiceImpl : public virtual AuthzService, public EndpointTypeImpl
881 virtual ~AuthzServiceImpl() {}
883 AuthzServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
884 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
886 AuthzServiceImpl(const AuthzServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
888 IMPL_XMLOBJECT_CLONE(AuthzService);
889 EndpointType* cloneEndpointType() const {
890 return new AuthzServiceImpl(*this);
894 class SAML_DLLLOCAL AttributeServiceImpl : public virtual AttributeService, public EndpointTypeImpl
897 virtual ~AttributeServiceImpl() {}
899 AttributeServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
900 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
902 AttributeServiceImpl(const AttributeServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
904 IMPL_XMLOBJECT_CLONE(AttributeService);
905 EndpointType* cloneEndpointType() const {
906 return new AttributeServiceImpl(*this);
910 class SAML_DLLLOCAL RoleDescriptorImpl : public virtual RoleDescriptor,
911 public virtual SignableObject,
912 public AbstractComplexElement,
913 public AbstractAttributeExtensibleXMLObject,
914 public AbstractDOMCachingXMLObject,
915 public AbstractValidatingXMLObject,
916 public AbstractXMLObjectMarshaller,
917 public AbstractXMLObjectUnmarshaller
920 m_ID=m_ProtocolSupportEnumeration=m_ErrorURL=NULL;
921 m_ValidUntil=m_CacheDuration=NULL;
922 m_children.push_back(NULL);
923 m_children.push_back(NULL);
924 m_children.push_back(NULL);
925 m_children.push_back(NULL);
929 m_pos_Signature=m_children.begin();
930 m_pos_Extensions=m_pos_Signature;
932 m_pos_Organization=m_pos_Extensions;
933 ++m_pos_Organization;
934 m_pos_ContactPerson=m_pos_Organization;
935 ++m_pos_ContactPerson;
939 list<XMLObject*>::iterator m_pos_ContactPerson;
941 RoleDescriptorImpl() {
946 virtual ~RoleDescriptorImpl() {
947 XMLString::release(&m_ID);
948 XMLString::release(&m_ProtocolSupportEnumeration);
949 XMLString::release(&m_ErrorURL);
951 delete m_CacheDuration;
954 RoleDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
955 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
959 RoleDescriptorImpl(const RoleDescriptorImpl& src)
960 : AbstractXMLObject(src),
961 AbstractAttributeExtensibleXMLObject(src),
962 AbstractDOMCachingXMLObject(src),
963 AbstractValidatingXMLObject(src) {
966 setProtocolSupportEnumeration(src.getProtocolSupportEnumeration());
967 setErrorURL(src.getErrorURL());
968 setValidUntil(src.getValidUntil());
969 setCacheDuration(src.getCacheDuration());
970 if (src.getSignature())
971 setSignature(src.getSignature()->cloneSignature());
972 if (src.getExtensions())
973 setExtensions(src.getExtensions()->cloneExtensions());
974 if (src.getOrganization())
975 setOrganization(src.getOrganization()->cloneOrganization());
977 VectorOf(KeyDescriptor) v=getKeyDescriptors();
978 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
980 v.push_back((*i)->cloneKeyDescriptor());
983 VectorOf(ContactPerson) w=getContactPersons();
984 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
986 w.push_back((*j)->cloneContactPerson());
991 const XMLCh* getId() const {
995 //IMPL_TYPED_CHILD(Signature);
996 // Need customized setter.
998 Signature* m_Signature;
999 list<XMLObject*>::iterator m_pos_Signature;
1001 Signature* getSignature() const {
1005 void setSignature(Signature* sig) {
1006 prepareForAssignment(m_Signature,sig);
1007 *m_pos_Signature=m_Signature=sig;
1008 // Sync content reference back up.
1010 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1013 IMPL_STRING_ATTRIB(ID);
1014 IMPL_STRING_ATTRIB(ProtocolSupportEnumeration);
1015 IMPL_STRING_ATTRIB(ErrorURL);
1016 IMPL_DATETIME_ATTRIB(ValidUntil);
1017 IMPL_DATETIME_ATTRIB(CacheDuration);
1018 IMPL_TYPED_CHILD(Extensions);
1019 IMPL_TYPED_CHILDREN(KeyDescriptor,m_pos_Organization);
1020 IMPL_TYPED_CHILD(Organization);
1021 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
1023 void setAttribute(QName& qualifiedName, const XMLCh* value) {
1024 if (!qualifiedName.hasNamespaceURI()) {
1025 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
1029 else if (XMLString::equals(qualifiedName.getLocalPart(),PROTOCOLSUPPORTENUMERATION_ATTRIB_NAME)) {
1030 setProtocolSupportEnumeration(value);
1033 else if (XMLString::equals(qualifiedName.getLocalPart(),ERRORURL_ATTRIB_NAME)) {
1037 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
1038 setValidUntil(value);
1041 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
1042 setCacheDuration(value);
1046 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value);
1050 void marshallAttributes(DOMElement* domElement) const {
1051 MARSHALL_ID_ATTRIB(ID,ID,NULL);
1052 MARSHALL_STRING_ATTRIB(ProtocolSupportEnumeration,PROTOCOLSUPPORTENUMERATION,NULL);
1053 MARSHALL_STRING_ATTRIB(ErrorURL,ERRORURL,NULL);
1054 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
1055 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
1057 // Take care of wildcard.
1058 for (map<QName,XMLCh*>::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) {
1059 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart());
1060 if (i->first.hasPrefix())
1061 attr->setPrefix(i->first.getPrefix());
1062 attr->setNodeValue(i->second);
1063 domElement->setAttributeNode(attr);
1067 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1068 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLConstants::XMLSIG_NS,false);
1069 PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20MD_NS,false);
1070 PROC_TYPED_CHILDREN(KeyDescriptor,SAMLConstants::SAML20MD_NS,false);
1071 PROC_TYPED_CHILD(Organization,SAMLConstants::SAML20MD_NS,false);
1072 PROC_TYPED_CHILDREN(ContactPerson,SAMLConstants::SAML20MD_NS,false);
1073 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1076 void processAttribute(const DOMAttr* attribute) {
1077 PROC_ID_ATTRIB(ID,ID,NULL);
1078 QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix());
1079 setAttribute(q,attribute->getNodeValue());
1083 class SAML_DLLLOCAL SSODescriptorTypeImpl : public virtual SSODescriptorType, public RoleDescriptorImpl
1086 m_children.push_back(NULL);
1087 m_children.push_back(NULL);
1088 m_children.push_back(NULL);
1089 m_children.push_back(NULL);
1090 m_pos_ArtifactResolutionService=m_pos_ContactPerson;
1091 ++m_pos_ArtifactResolutionService;
1092 m_pos_SingleLogoutService=m_pos_ArtifactResolutionService;
1093 ++m_pos_SingleLogoutService;
1094 m_pos_ManageNameIDService=m_pos_SingleLogoutService;
1095 ++m_pos_ManageNameIDService;
1096 m_pos_NameIDFormat=m_pos_ManageNameIDService;
1097 ++m_pos_NameIDFormat;
1101 list<XMLObject*>::iterator m_pos_ArtifactResolutionService;
1102 list<XMLObject*>::iterator m_pos_SingleLogoutService;
1103 list<XMLObject*>::iterator m_pos_ManageNameIDService;
1104 list<XMLObject*>::iterator m_pos_NameIDFormat;
1106 SSODescriptorTypeImpl() {
1111 virtual ~SSODescriptorTypeImpl() {}
1113 SSODescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1114 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1118 SSODescriptorTypeImpl(const SSODescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1120 VectorOf(ArtifactResolutionService) v=getArtifactResolutionServices();
1121 for (vector<ArtifactResolutionService*>::const_iterator i=src.m_ArtifactResolutionServices.begin(); i!=src.m_ArtifactResolutionServices.end(); i++) {
1123 v.push_back((*i)->cloneArtifactResolutionService());
1126 VectorOf(SingleLogoutService) w=getSingleLogoutServices();
1127 for (vector<SingleLogoutService*>::const_iterator j=src.m_SingleLogoutServices.begin(); j!=src.m_SingleLogoutServices.end(); j++) {
1129 w.push_back((*j)->cloneSingleLogoutService());
1132 VectorOf(ManageNameIDService) x=getManageNameIDServices();
1133 for (vector<ManageNameIDService*>::const_iterator k=src.m_ManageNameIDServices.begin(); k!=src.m_ManageNameIDServices.end(); k++) {
1135 x.push_back((*k)->cloneManageNameIDService());
1138 VectorOf(NameIDFormat) y=getNameIDFormats();
1139 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1141 y.push_back((*m)->cloneNameIDFormat());
1146 IMPL_TYPED_CHILDREN(ArtifactResolutionService,m_pos_ArtifactResolutionService);
1147 IMPL_TYPED_CHILDREN(SingleLogoutService,m_pos_SingleLogoutService);
1148 IMPL_TYPED_CHILDREN(ManageNameIDService,m_pos_ManageNameIDService);
1149 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1152 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1153 PROC_TYPED_CHILDREN(ArtifactResolutionService,SAMLConstants::SAML20MD_NS,false);
1154 PROC_TYPED_CHILDREN(SingleLogoutService,SAMLConstants::SAML20MD_NS,false);
1155 PROC_TYPED_CHILDREN(ManageNameIDService,SAMLConstants::SAML20MD_NS,false);
1156 PROC_TYPED_CHILDREN(NameIDFormat,SAMLConstants::SAML20MD_NS,false);
1157 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1161 class SAML_DLLLOCAL IDPSSODescriptorImpl : public virtual IDPSSODescriptor, public SSODescriptorTypeImpl
1163 list<XMLObject*>::iterator m_pos_SingleSignOnService;
1164 list<XMLObject*>::iterator m_pos_NameIDMappingService;
1165 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1166 list<XMLObject*>::iterator m_pos_AttributeProfile;
1169 m_WantAuthnRequestsSigned=XMLConstants::XML_BOOL_NULL;
1170 m_children.push_back(NULL);
1171 m_children.push_back(NULL);
1172 m_children.push_back(NULL);
1173 m_children.push_back(NULL);
1174 m_pos_SingleSignOnService=m_pos_NameIDFormat;
1175 ++m_pos_SingleSignOnService;
1176 m_pos_NameIDMappingService=m_pos_SingleSignOnService;
1177 ++m_pos_NameIDMappingService;
1178 m_pos_AssertionIDRequestService=m_pos_NameIDMappingService;
1179 ++m_pos_AssertionIDRequestService;
1180 m_pos_AttributeProfile=m_pos_AssertionIDRequestService;
1181 ++m_pos_AttributeProfile;
1185 virtual ~IDPSSODescriptorImpl() {}
1187 IDPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1188 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1192 IDPSSODescriptorImpl(const IDPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1194 WantAuthnRequestsSigned(src.m_WantAuthnRequestsSigned);
1195 VectorOf(SingleSignOnService) v=getSingleSignOnServices();
1196 for (vector<SingleSignOnService*>::const_iterator i=src.m_SingleSignOnServices.begin(); i!=src.m_SingleSignOnServices.end(); i++) {
1198 v.push_back((*i)->cloneSingleSignOnService());
1201 VectorOf(NameIDMappingService) w=getNameIDMappingServices();
1202 for (vector<NameIDMappingService*>::const_iterator j=src.m_NameIDMappingServices.begin(); j!=src.m_NameIDMappingServices.end(); j++) {
1204 w.push_back((*j)->cloneNameIDMappingService());
1207 VectorOf(AssertionIDRequestService) x=getAssertionIDRequestServices();
1208 for (vector<AssertionIDRequestService*>::const_iterator k=src.m_AssertionIDRequestServices.begin(); k!=src.m_AssertionIDRequestServices.end(); k++) {
1210 x.push_back((*k)->cloneAssertionIDRequestService());
1213 VectorOf(AttributeProfile) y=getAttributeProfiles();
1214 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1216 y.push_back((*m)->cloneAttributeProfile());
1219 VectorOf(Attribute) z=getAttributes();
1220 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1222 z.push_back((*n)->cloneAttribute());
1227 IMPL_XMLOBJECT_CLONE(IDPSSODescriptor);
1228 SSODescriptorType* cloneSSODescriptorType() const {
1229 return new IDPSSODescriptorImpl(*this);
1231 RoleDescriptor* cloneRoleDescriptor() const {
1232 return new IDPSSODescriptorImpl(*this);
1235 IMPL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned);
1236 IMPL_TYPED_CHILDREN(SingleSignOnService,m_pos_SingleSignOnService);
1237 IMPL_TYPED_CHILDREN(NameIDMappingService,m_pos_NameIDMappingService);
1238 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1239 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1240 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1242 void setAttribute(QName& qualifiedName, const XMLCh* value) {
1243 if (!qualifiedName.hasNamespaceURI()) {
1244 if (XMLString::equals(qualifiedName.getLocalPart(),WANTAUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1245 setWantAuthnRequestsSigned(value);
1249 RoleDescriptorImpl::setAttribute(qualifiedName, value);
1253 void marshallAttributes(DOMElement* domElement) const {
1254 MARSHALL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned,WANTAUTHNREQUESTSSIGNED,NULL);
1255 RoleDescriptorImpl::marshallAttributes(domElement);
1258 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1259 PROC_TYPED_CHILDREN(SingleSignOnService,SAMLConstants::SAML20MD_NS,false);
1260 PROC_TYPED_CHILDREN(NameIDMappingService,SAMLConstants::SAML20MD_NS,false);
1261 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAMLConstants::SAML20MD_NS,false);
1262 PROC_TYPED_CHILDREN(AttributeProfile,SAMLConstants::SAML20MD_NS,false);
1263 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAMLConstants::SAML20_NS,false);
1264 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1268 class SAML_DLLLOCAL RequestedAttributeImpl : public virtual RequestedAttribute,
1269 public AbstractComplexElement,
1270 public AbstractAttributeExtensibleXMLObject,
1271 public AbstractDOMCachingXMLObject,
1272 public AbstractValidatingXMLObject,
1273 public AbstractXMLObjectMarshaller,
1274 public AbstractXMLObjectUnmarshaller
1277 m_Name=m_NameFormat=m_FriendlyName=NULL;
1278 m_isRequired=XMLConstants::XML_BOOL_NULL;
1281 virtual ~RequestedAttributeImpl() {
1282 XMLString::release(&m_Name);
1283 XMLString::release(&m_NameFormat);
1284 XMLString::release(&m_FriendlyName);
1287 RequestedAttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1288 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1292 RequestedAttributeImpl(const RequestedAttributeImpl& src)
1293 : AbstractXMLObject(src),
1294 AbstractAttributeExtensibleXMLObject(src),
1295 AbstractDOMCachingXMLObject(src),
1296 AbstractValidatingXMLObject(src) {
1298 setName(src.getName());
1299 setNameFormat(src.getNameFormat());
1300 setFriendlyName(src.getFriendlyName());
1301 isRequired(src.m_isRequired);
1302 VectorOf(XMLObject) v=getAttributeValues();
1303 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
1305 v.push_back((*i)->clone());
1310 IMPL_XMLOBJECT_CLONE(RequestedAttribute);
1311 Attribute* cloneAttribute() const {
1312 return new RequestedAttributeImpl(*this);
1315 IMPL_STRING_ATTRIB(Name);
1316 IMPL_STRING_ATTRIB(NameFormat);
1317 IMPL_STRING_ATTRIB(FriendlyName);
1318 IMPL_BOOLEAN_ATTRIB(isRequired);
1319 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
1321 void setAttribute(QName& qualifiedName, const XMLCh* value) {
1322 if (!qualifiedName.hasNamespaceURI()) {
1323 if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) {
1327 else if (XMLString::equals(qualifiedName.getLocalPart(),NAMEFORMAT_ATTRIB_NAME)) {
1328 setNameFormat(value);
1331 else if (XMLString::equals(qualifiedName.getLocalPart(),FRIENDLYNAME_ATTRIB_NAME)) {
1332 setFriendlyName(value);
1335 else if (XMLString::equals(qualifiedName.getLocalPart(),ISREQUIRED_ATTRIB_NAME)) {
1336 setisRequired(value);
1340 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value);
1344 void marshallAttributes(DOMElement* domElement) const {
1345 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
1346 MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,NULL);
1347 MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,NULL);
1348 MARSHALL_BOOLEAN_ATTRIB(isRequired,ISREQUIRED,NULL);
1350 // Take care of wildcard.
1351 for (map<QName,XMLCh*>::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) {
1352 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart());
1353 if (i->first.hasPrefix())
1354 attr->setPrefix(i->first.getPrefix());
1355 attr->setNodeValue(i->second);
1356 domElement->setAttributeNode(attr);
1360 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1361 getAttributeValues().push_back(childXMLObject);
1364 void processAttribute(const DOMAttr* attribute) {
1365 QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix());
1366 setAttribute(q,attribute->getNodeValue());
1370 class SAML_DLLLOCAL AttributeConsumingServiceImpl : public virtual AttributeConsumingService,
1371 public AbstractComplexElement,
1372 public AbstractDOMCachingXMLObject,
1373 public AbstractValidatingXMLObject,
1374 public AbstractXMLObjectMarshaller,
1375 public AbstractXMLObjectUnmarshaller
1377 list<XMLObject*>::iterator m_pos_ServiceDescription;
1378 list<XMLObject*>::iterator m_pos_RequestedAttribute;
1382 m_isDefault=XMLConstants::XML_BOOL_NULL;
1383 m_children.push_back(NULL);
1384 m_children.push_back(NULL);
1385 m_pos_ServiceDescription=m_children.begin();
1386 m_pos_RequestedAttribute=m_pos_ServiceDescription;
1387 ++m_pos_RequestedAttribute;
1391 virtual ~AttributeConsumingServiceImpl() {
1392 XMLString::release(&m_Index);
1395 AttributeConsumingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1396 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1400 AttributeConsumingServiceImpl(const AttributeConsumingServiceImpl& src)
1401 : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src), AbstractValidatingXMLObject(src) {
1403 setIndex(src.m_Index);
1404 isDefault(src.m_isDefault);
1405 VectorOf(ServiceName) v=getServiceNames();
1406 for (vector<ServiceName*>::const_iterator i=src.m_ServiceNames.begin(); i!=src.m_ServiceNames.end(); i++) {
1408 v.push_back((*i)->cloneServiceName());
1411 VectorOf(ServiceDescription) w=getServiceDescriptions();
1412 for (vector<ServiceDescription*>::const_iterator j=src.m_ServiceDescriptions.begin(); j!=src.m_ServiceDescriptions.end(); j++) {
1414 w.push_back((*j)->cloneServiceDescription());
1417 VectorOf(RequestedAttribute) x=getRequestedAttributes();
1418 for (vector<RequestedAttribute*>::const_iterator k=src.m_RequestedAttributes.begin(); k!=src.m_RequestedAttributes.end(); k++) {
1420 x.push_back((*k)->cloneRequestedAttribute());
1425 IMPL_XMLOBJECT_CLONE(AttributeConsumingService);
1426 IMPL_INTEGER_ATTRIB(Index);
1427 IMPL_BOOLEAN_ATTRIB(isDefault);
1428 IMPL_TYPED_CHILDREN(ServiceName,m_pos_ServiceDescription);
1429 IMPL_TYPED_CHILDREN(ServiceDescription,m_pos_RequestedAttribute);
1430 IMPL_TYPED_CHILDREN(RequestedAttribute,m_children.end());
1433 void marshallAttributes(DOMElement* domElement) const {
1434 MARSHALL_INTEGER_ATTRIB(Index,INDEX,NULL);
1435 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
1438 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1439 PROC_TYPED_CHILDREN(ServiceName,SAMLConstants::SAML20MD_NS,false);
1440 PROC_TYPED_CHILDREN(ServiceDescription,SAMLConstants::SAML20MD_NS,false);
1441 PROC_TYPED_CHILDREN(RequestedAttribute,SAMLConstants::SAML20MD_NS,false);
1442 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1445 void processAttribute(const DOMAttr* attribute) {
1446 PROC_INTEGER_ATTRIB(Index,INDEX,NULL);
1447 PROC_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
1448 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1452 class SAML_DLLLOCAL SPSSODescriptorImpl : public virtual SPSSODescriptor, public SSODescriptorTypeImpl
1454 list<XMLObject*>::iterator m_pos_AssertionConsumerService;
1457 m_AuthnRequestsSigned=XMLConstants::XML_BOOL_NULL;
1458 m_WantAssertionsSigned=XMLConstants::XML_BOOL_NULL;
1459 m_children.push_back(NULL);
1460 m_pos_AssertionConsumerService=m_pos_NameIDFormat;
1461 ++m_pos_AssertionConsumerService;
1465 virtual ~SPSSODescriptorImpl() {}
1467 SPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1468 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1472 SPSSODescriptorImpl(const SPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1474 AuthnRequestsSigned(src.m_AuthnRequestsSigned);
1475 WantAssertionsSigned(src.m_WantAssertionsSigned);
1476 VectorOf(AssertionConsumerService) v=getAssertionConsumerServices();
1477 for (vector<AssertionConsumerService*>::const_iterator i=src.m_AssertionConsumerServices.begin(); i!=src.m_AssertionConsumerServices.end(); i++) {
1479 v.push_back((*i)->cloneAssertionConsumerService());
1482 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1483 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1485 w.push_back((*j)->cloneAttributeConsumingService());
1490 IMPL_XMLOBJECT_CLONE(SPSSODescriptor);
1491 SSODescriptorType* cloneSSODescriptorType() const {
1492 return cloneSPSSODescriptor();
1494 RoleDescriptor* cloneRoleDescriptor() const {
1495 return cloneSPSSODescriptor();
1498 IMPL_BOOLEAN_ATTRIB(AuthnRequestsSigned);
1499 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1500 IMPL_TYPED_CHILDREN(AssertionConsumerService,m_pos_AssertionConsumerService);
1501 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1503 void setAttribute(QName& qualifiedName, const XMLCh* value) {
1504 if (!qualifiedName.hasNamespaceURI()) {
1505 if (XMLString::equals(qualifiedName.getLocalPart(),AUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1506 setAuthnRequestsSigned(value);
1509 else if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1510 setWantAssertionsSigned(value);
1514 RoleDescriptorImpl::setAttribute(qualifiedName, value);
1518 void marshallAttributes(DOMElement* domElement) const {
1519 MARSHALL_BOOLEAN_ATTRIB(AuthnRequestsSigned,AUTHNREQUESTSSIGNED,NULL);
1520 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,NULL);
1521 RoleDescriptorImpl::marshallAttributes(domElement);
1524 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1525 PROC_TYPED_CHILDREN(AssertionConsumerService,SAMLConstants::SAML20MD_NS,false);
1526 PROC_TYPED_CHILDREN(AttributeConsumingService,SAMLConstants::SAML20MD_NS,false);
1527 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1531 class SAML_DLLLOCAL AuthnAuthorityDescriptorImpl : public virtual AuthnAuthorityDescriptor, public RoleDescriptorImpl
1533 list<XMLObject*>::iterator m_pos_AuthnQueryService;
1534 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1537 m_children.push_back(NULL);
1538 m_children.push_back(NULL);
1539 m_pos_AuthnQueryService=m_pos_ContactPerson;
1540 ++m_pos_AuthnQueryService;
1541 m_pos_AssertionIDRequestService=m_pos_AuthnQueryService;
1542 ++m_pos_AssertionIDRequestService;
1546 virtual ~AuthnAuthorityDescriptorImpl() {}
1548 AuthnAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1549 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1553 AuthnAuthorityDescriptorImpl(const AuthnAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1555 VectorOf(AuthnQueryService) v=getAuthnQueryServices();
1556 for (vector<AuthnQueryService*>::const_iterator i=src.m_AuthnQueryServices.begin(); i!=src.m_AuthnQueryServices.end(); i++) {
1558 v.push_back((*i)->cloneAuthnQueryService());
1561 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1562 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1564 w.push_back((*j)->cloneAssertionIDRequestService());
1567 VectorOf(NameIDFormat) x=getNameIDFormats();
1568 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1570 x.push_back((*k)->cloneNameIDFormat());
1575 IMPL_XMLOBJECT_CLONE(AuthnAuthorityDescriptor);
1576 RoleDescriptor* cloneRoleDescriptor() const {
1577 return cloneAuthnAuthorityDescriptor();
1580 IMPL_TYPED_CHILDREN(AuthnQueryService,m_pos_AuthnQueryService);
1581 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1582 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1585 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1586 PROC_TYPED_CHILDREN(AuthnQueryService,SAMLConstants::SAML20MD_NS,false);
1587 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAMLConstants::SAML20MD_NS,false);
1588 PROC_TYPED_CHILDREN(NameIDFormat,SAMLConstants::SAML20MD_NS,false);
1589 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1593 class SAML_DLLLOCAL PDPDescriptorImpl : public virtual PDPDescriptor, public RoleDescriptorImpl
1595 list<XMLObject*>::iterator m_pos_AuthzService;
1596 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1599 m_children.push_back(NULL);
1600 m_children.push_back(NULL);
1601 m_pos_AuthzService=m_pos_ContactPerson;
1602 ++m_pos_AuthzService;
1603 m_pos_AssertionIDRequestService=m_pos_AuthzService;
1604 ++m_pos_AssertionIDRequestService;
1608 virtual ~PDPDescriptorImpl() {}
1610 PDPDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1611 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1615 PDPDescriptorImpl(const PDPDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1617 VectorOf(AuthzService) v=getAuthzServices();
1618 for (vector<AuthzService*>::const_iterator i=src.m_AuthzServices.begin(); i!=src.m_AuthzServices.end(); i++) {
1620 v.push_back((*i)->cloneAuthzService());
1623 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1624 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1626 w.push_back((*j)->cloneAssertionIDRequestService());
1629 VectorOf(NameIDFormat) x=getNameIDFormats();
1630 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1632 x.push_back((*k)->cloneNameIDFormat());
1637 IMPL_XMLOBJECT_CLONE(PDPDescriptor);
1638 RoleDescriptor* cloneRoleDescriptor() const {
1639 return clonePDPDescriptor();
1642 IMPL_TYPED_CHILDREN(AuthzService,m_pos_AuthzService);
1643 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1644 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1647 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1648 PROC_TYPED_CHILDREN(AuthzService,SAMLConstants::SAML20MD_NS,false);
1649 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAMLConstants::SAML20MD_NS,false);
1650 PROC_TYPED_CHILDREN(NameIDFormat,SAMLConstants::SAML20MD_NS,false);
1651 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1655 class SAML_DLLLOCAL AttributeAuthorityDescriptorImpl : public virtual AttributeAuthorityDescriptor, public RoleDescriptorImpl
1657 list<XMLObject*>::iterator m_pos_AttributeService;
1658 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1659 list<XMLObject*>::iterator m_pos_NameIDFormat;
1660 list<XMLObject*>::iterator m_pos_AttributeProfile;
1663 m_children.push_back(NULL);
1664 m_children.push_back(NULL);
1665 m_children.push_back(NULL);
1666 m_children.push_back(NULL);
1667 m_pos_AttributeService=m_pos_ContactPerson;
1668 ++m_pos_AttributeService;
1669 m_pos_AssertionIDRequestService=m_pos_AttributeService;
1670 ++m_pos_AssertionIDRequestService;
1671 m_pos_NameIDFormat=m_pos_AssertionIDRequestService;
1672 ++m_pos_NameIDFormat;
1673 m_pos_AttributeProfile=m_pos_NameIDFormat;
1674 ++m_pos_AttributeProfile;
1678 virtual ~AttributeAuthorityDescriptorImpl() {}
1680 AttributeAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1681 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1685 AttributeAuthorityDescriptorImpl(const AttributeAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1687 VectorOf(AttributeService) v=getAttributeServices();
1688 for (vector<AttributeService*>::const_iterator i=src.m_AttributeServices.begin(); i!=src.m_AttributeServices.end(); i++) {
1690 v.push_back((*i)->cloneAttributeService());
1693 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1694 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1696 w.push_back((*j)->cloneAssertionIDRequestService());
1699 VectorOf(NameIDFormat) x=getNameIDFormats();
1700 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1702 x.push_back((*k)->cloneNameIDFormat());
1705 VectorOf(AttributeProfile) y=getAttributeProfiles();
1706 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1708 y.push_back((*m)->cloneAttributeProfile());
1711 VectorOf(Attribute) z=getAttributes();
1712 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1714 z.push_back((*n)->cloneAttribute());
1719 IMPL_XMLOBJECT_CLONE(AttributeAuthorityDescriptor);
1720 RoleDescriptor* cloneRoleDescriptor() const {
1721 return cloneAttributeAuthorityDescriptor();
1724 IMPL_TYPED_CHILDREN(AttributeService,m_pos_AttributeService);
1725 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1726 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1727 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1728 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1731 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1732 PROC_TYPED_CHILDREN(AttributeService,SAMLConstants::SAML20MD_NS,false);
1733 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAMLConstants::SAML20MD_NS,false);
1734 PROC_TYPED_CHILDREN(NameIDFormat,SAMLConstants::SAML20MD_NS,false);
1735 PROC_TYPED_CHILDREN(AttributeProfile,SAMLConstants::SAML20MD_NS,false);
1736 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAMLConstants::SAML20_NS,false);
1737 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1741 class SAML_DLLLOCAL AffiliationDescriptorImpl : public virtual AffiliationDescriptor,
1742 public virtual SignableObject,
1743 public AbstractComplexElement,
1744 public AbstractAttributeExtensibleXMLObject,
1745 public AbstractDOMCachingXMLObject,
1746 public AbstractValidatingXMLObject,
1747 public AbstractXMLObjectMarshaller,
1748 public AbstractXMLObjectUnmarshaller
1750 list<XMLObject*>::iterator m_pos_AffiliateMember;
1753 m_ID=m_AffiliationOwnerID=NULL;
1754 m_ValidUntil=m_CacheDuration=NULL;
1755 m_children.push_back(NULL);
1756 m_children.push_back(NULL);
1757 m_children.push_back(NULL);
1760 m_pos_Signature=m_children.begin();
1761 m_pos_Extensions=m_pos_Signature;
1763 m_pos_AffiliateMember=m_pos_Extensions;
1764 ++m_pos_AffiliateMember;
1768 virtual ~AffiliationDescriptorImpl() {
1769 XMLString::release(&m_ID);
1770 XMLString::release(&m_AffiliationOwnerID);
1771 delete m_ValidUntil;
1772 delete m_CacheDuration;
1775 AffiliationDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1776 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1780 AffiliationDescriptorImpl(const AffiliationDescriptorImpl& src)
1781 : AbstractXMLObject(src),
1782 AbstractAttributeExtensibleXMLObject(src),
1783 AbstractDOMCachingXMLObject(src),
1784 AbstractValidatingXMLObject(src) {
1787 setAffiliationOwnerID(src.getAffiliationOwnerID());
1788 setValidUntil(src.getValidUntil());
1789 setCacheDuration(src.getCacheDuration());
1790 if (src.getSignature())
1791 setSignature(src.getSignature()->cloneSignature());
1792 if (src.getExtensions())
1793 setExtensions(src.getExtensions()->cloneExtensions());
1795 VectorOf(KeyDescriptor) v=getKeyDescriptors();
1796 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
1798 v.push_back((*i)->cloneKeyDescriptor());
1801 VectorOf(AffiliateMember) w=getAffiliateMembers();
1802 for (vector<AffiliateMember*>::const_iterator j=src.m_AffiliateMembers.begin(); j!=src.m_AffiliateMembers.end(); j++) {
1804 w.push_back((*j)->cloneAffiliateMember());
1809 IMPL_XMLOBJECT_CLONE(AffiliationDescriptor);
1811 const XMLCh* getId() const {
1815 //IMPL_TYPED_CHILD(Signature);
1816 // Need customized setter.
1818 Signature* m_Signature;
1819 list<XMLObject*>::iterator m_pos_Signature;
1821 Signature* getSignature() const {
1825 void setSignature(Signature* sig) {
1826 prepareForAssignment(m_Signature,sig);
1827 *m_pos_Signature=m_Signature=sig;
1828 // Sync content reference back up.
1830 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1833 IMPL_STRING_ATTRIB(ID);
1834 IMPL_STRING_ATTRIB(AffiliationOwnerID);
1835 IMPL_DATETIME_ATTRIB(ValidUntil);
1836 IMPL_DATETIME_ATTRIB(CacheDuration);
1837 IMPL_TYPED_CHILD(Extensions);
1838 IMPL_TYPED_CHILDREN(AffiliateMember,m_pos_AffiliateMember);
1839 IMPL_TYPED_CHILDREN(KeyDescriptor,m_children.end());
1841 void setAttribute(QName& qualifiedName, const XMLCh* value) {
1842 if (!qualifiedName.hasNamespaceURI()) {
1843 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
1847 else if (XMLString::equals(qualifiedName.getLocalPart(),AFFILIATIONOWNERID_ATTRIB_NAME)) {
1848 setAffiliationOwnerID(value);
1851 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
1852 setValidUntil(value);
1855 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
1856 setCacheDuration(value);
1860 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value);
1864 void marshallAttributes(DOMElement* domElement) const {
1865 MARSHALL_ID_ATTRIB(ID,ID,NULL);
1866 MARSHALL_STRING_ATTRIB(AffiliationOwnerID,AFFILIATIONOWNERID,NULL);
1867 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
1868 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
1870 // Take care of wildcard.
1871 for (map<QName,XMLCh*>::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) {
1872 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart());
1873 if (i->first.hasPrefix())
1874 attr->setPrefix(i->first.getPrefix());
1875 attr->setNodeValue(i->second);
1876 domElement->setAttributeNode(attr);
1880 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1881 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLConstants::XMLSIG_NS,false);
1882 PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20MD_NS,false);
1883 PROC_TYPED_CHILDREN(AffiliateMember,SAMLConstants::SAML20MD_NS,false);
1884 PROC_TYPED_CHILDREN(KeyDescriptor,SAMLConstants::SAML20MD_NS,false);
1885 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1888 void processAttribute(const DOMAttr* attribute) {
1889 PROC_ID_ATTRIB(ID,ID,NULL);
1890 QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix());
1891 setAttribute(q,attribute->getNodeValue());
1895 class SAML_DLLLOCAL EntityDescriptorImpl : public virtual EntityDescriptor,
1896 public virtual SignableObject,
1897 public AbstractComplexElement,
1898 public AbstractAttributeExtensibleXMLObject,
1899 public AbstractDOMCachingXMLObject,
1900 public AbstractValidatingXMLObject,
1901 public AbstractXMLObjectMarshaller,
1902 public AbstractXMLObjectUnmarshaller
1904 list<XMLObject*>::iterator m_pos_ContactPerson;
1907 m_ID=m_EntityID=NULL;
1908 m_ValidUntil=m_CacheDuration=NULL;
1909 m_children.push_back(NULL);
1910 m_children.push_back(NULL);
1911 m_children.push_back(NULL);
1912 m_children.push_back(NULL);
1913 m_children.push_back(NULL);
1916 m_AffiliationDescriptor=NULL;
1917 m_Organization=NULL;
1918 m_pos_Signature=m_children.begin();
1919 m_pos_Extensions=m_pos_Signature;
1921 m_pos_AffiliationDescriptor=m_pos_Extensions;
1922 ++m_pos_AffiliationDescriptor;
1923 m_pos_Organization=m_pos_AffiliationDescriptor;
1924 ++m_pos_Organization;
1925 m_pos_ContactPerson=m_pos_Organization;
1926 ++m_pos_ContactPerson;
1930 virtual ~EntityDescriptorImpl() {
1931 XMLString::release(&m_ID);
1932 XMLString::release(&m_EntityID);
1933 delete m_ValidUntil;
1934 delete m_CacheDuration;
1937 EntityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1938 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1942 EntityDescriptorImpl(const EntityDescriptorImpl& src)
1943 : AbstractXMLObject(src),
1944 AbstractAttributeExtensibleXMLObject(src),
1945 AbstractDOMCachingXMLObject(src),
1946 AbstractValidatingXMLObject(src) {
1949 setEntityID(src.getEntityID());
1950 setValidUntil(src.getValidUntil());
1951 setCacheDuration(src.getCacheDuration());
1952 if (src.getSignature())
1953 setSignature(src.getSignature()->cloneSignature());
1954 if (src.getExtensions())
1955 setExtensions(src.getExtensions()->cloneExtensions());
1956 if (src.getAffiliationDescriptor())
1957 setAffiliationDescriptor(src.getAffiliationDescriptor()->cloneAffiliationDescriptor());
1958 if (src.getOrganization())
1959 setOrganization(src.getOrganization()->cloneOrganization());
1961 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1963 IDPSSODescriptor* idp=dynamic_cast<IDPSSODescriptor*>(*i);
1965 getIDPSSODescriptors().push_back(idp->cloneIDPSSODescriptor());
1969 SPSSODescriptor* sp=dynamic_cast<SPSSODescriptor*>(*i);
1971 getSPSSODescriptors().push_back(sp->cloneSPSSODescriptor());
1975 AuthnAuthorityDescriptor* authn=dynamic_cast<AuthnAuthorityDescriptor*>(*i);
1977 getAuthnAuthorityDescriptors().push_back(authn->cloneAuthnAuthorityDescriptor());
1981 AttributeAuthorityDescriptor* attr=dynamic_cast<AttributeAuthorityDescriptor*>(*i);
1983 getAttributeAuthorityDescriptors().push_back(attr->cloneAttributeAuthorityDescriptor());
1987 PDPDescriptor* pdp=dynamic_cast<PDPDescriptor*>(*i);
1989 getPDPDescriptors().push_back(pdp->clonePDPDescriptor());
1993 RoleDescriptor* role=dynamic_cast<RoleDescriptor*>(*i);
1995 getRoleDescriptors().push_back(role->cloneRoleDescriptor());
2001 VectorOf(ContactPerson) v=getContactPersons();
2002 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
2004 v.push_back((*j)->cloneContactPerson());
2007 VectorOf(AdditionalMetadataLocation) w=getAdditionalMetadataLocations();
2008 for (vector<AdditionalMetadataLocation*>::const_iterator k=src.m_AdditionalMetadataLocations.begin(); k!=src.m_AdditionalMetadataLocations.end(); k++) {
2010 w.push_back((*k)->cloneAdditionalMetadataLocation());
2015 IMPL_XMLOBJECT_CLONE(EntityDescriptor);
2017 const XMLCh* getId() const {
2021 //IMPL_TYPED_CHILD(Signature);
2022 // Need customized setter.
2024 Signature* m_Signature;
2025 list<XMLObject*>::iterator m_pos_Signature;
2027 Signature* getSignature() const {
2031 void setSignature(Signature* sig) {
2032 prepareForAssignment(m_Signature,sig);
2033 *m_pos_Signature=m_Signature=sig;
2034 // Sync content reference back up.
2036 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2039 IMPL_STRING_ATTRIB(ID);
2040 IMPL_STRING_ATTRIB(EntityID);
2041 IMPL_DATETIME_ATTRIB(ValidUntil);
2042 IMPL_DATETIME_ATTRIB(CacheDuration);
2043 IMPL_TYPED_CHILD(Extensions);
2044 IMPL_TYPED_CHILDREN(RoleDescriptor,m_pos_AffiliationDescriptor);
2045 IMPL_TYPED_CHILDREN(IDPSSODescriptor,m_pos_AffiliationDescriptor);
2046 IMPL_TYPED_CHILDREN(SPSSODescriptor,m_pos_AffiliationDescriptor);
2047 IMPL_TYPED_CHILDREN(AuthnAuthorityDescriptor,m_pos_AffiliationDescriptor);
2048 IMPL_TYPED_CHILDREN(AttributeAuthorityDescriptor,m_pos_AffiliationDescriptor);
2049 IMPL_TYPED_CHILDREN(PDPDescriptor,m_pos_AffiliationDescriptor);
2050 IMPL_TYPED_CHILD(AffiliationDescriptor);
2051 IMPL_TYPED_CHILD(Organization);
2052 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
2053 IMPL_TYPED_CHILDREN(AdditionalMetadataLocation,m_children.end());
2055 void setAttribute(QName& qualifiedName, const XMLCh* value) {
2056 if (!qualifiedName.hasNamespaceURI()) {
2057 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
2061 else if (XMLString::equals(qualifiedName.getLocalPart(),ENTITYID_ATTRIB_NAME)) {
2065 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
2066 setValidUntil(value);
2069 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
2070 setCacheDuration(value);
2074 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value);
2078 void marshallAttributes(DOMElement* domElement) const {
2079 MARSHALL_ID_ATTRIB(ID,ID,NULL);
2080 MARSHALL_STRING_ATTRIB(EntityID,ENTITYID,NULL);
2081 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2082 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2084 // Take care of wildcard.
2085 for (map<QName,XMLCh*>::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) {
2086 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart());
2087 if (i->first.hasPrefix())
2088 attr->setPrefix(i->first.getPrefix());
2089 attr->setNodeValue(i->second);
2090 domElement->setAttributeNode(attr);
2094 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2095 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLConstants::XMLSIG_NS,false);
2096 PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20MD_NS,false);
2097 PROC_TYPED_CHILDREN(RoleDescriptor,SAMLConstants::SAML20MD_NS,false);
2098 PROC_TYPED_CHILDREN(IDPSSODescriptor,SAMLConstants::SAML20MD_NS,false);
2099 PROC_TYPED_CHILDREN(SPSSODescriptor,SAMLConstants::SAML20MD_NS,false);
2100 PROC_TYPED_CHILDREN(AuthnAuthorityDescriptor,SAMLConstants::SAML20MD_NS,false);
2101 PROC_TYPED_CHILDREN(AttributeAuthorityDescriptor,SAMLConstants::SAML20MD_NS,false);
2102 PROC_TYPED_CHILDREN(PDPDescriptor,SAMLConstants::SAML20MD_NS,false);
2103 PROC_TYPED_CHILD(AffiliationDescriptor,SAMLConstants::SAML20MD_NS,false);
2104 PROC_TYPED_CHILD(Organization,SAMLConstants::SAML20MD_NS,false);
2105 PROC_TYPED_CHILDREN(ContactPerson,SAMLConstants::SAML20MD_NS,false);
2106 PROC_TYPED_CHILDREN(AdditionalMetadataLocation,SAMLConstants::SAML20MD_NS,false);
2107 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2110 void processAttribute(const DOMAttr* attribute) {
2111 PROC_ID_ATTRIB(ID,ID,NULL);
2112 QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix());
2113 setAttribute(q,attribute->getNodeValue());
2117 class SAML_DLLLOCAL EntitiesDescriptorImpl : public virtual EntitiesDescriptor,
2118 public virtual SignableObject,
2119 public AbstractComplexElement,
2120 public AbstractDOMCachingXMLObject,
2121 public AbstractValidatingXMLObject,
2122 public AbstractXMLObjectMarshaller,
2123 public AbstractXMLObjectUnmarshaller
2127 m_ValidUntil=m_CacheDuration=NULL;
2128 m_children.push_back(NULL);
2129 m_children.push_back(NULL);
2132 m_pos_Signature=m_children.begin();
2133 m_pos_Extensions=m_pos_Signature;
2138 virtual ~EntitiesDescriptorImpl() {
2139 XMLString::release(&m_ID);
2140 XMLString::release(&m_Name);
2141 delete m_ValidUntil;
2142 delete m_CacheDuration;
2145 EntitiesDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
2146 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2150 EntitiesDescriptorImpl(const EntitiesDescriptorImpl& src)
2151 : AbstractXMLObject(src),
2152 AbstractDOMCachingXMLObject(src),
2153 AbstractValidatingXMLObject(src) {
2156 setName(src.getName());
2157 setValidUntil(src.getValidUntil());
2158 setCacheDuration(src.getCacheDuration());
2159 if (src.getSignature())
2160 setSignature(src.getSignature()->cloneSignature());
2161 if (src.getExtensions())
2162 setExtensions(src.getExtensions()->cloneExtensions());
2164 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2166 EntityDescriptor* e=dynamic_cast<EntityDescriptor*>(*i);
2168 getEntityDescriptors().push_back(e->cloneEntityDescriptor());
2172 EntitiesDescriptor* es=dynamic_cast<EntitiesDescriptor*>(*i);
2174 getEntitiesDescriptors().push_back(es->cloneEntitiesDescriptor());
2181 IMPL_XMLOBJECT_CLONE(EntitiesDescriptor);
2183 const XMLCh* getId() const {
2187 //IMPL_TYPED_CHILD(Signature);
2188 // Need customized setter.
2190 Signature* m_Signature;
2191 list<XMLObject*>::iterator m_pos_Signature;
2193 Signature* getSignature() const {
2197 void setSignature(Signature* sig) {
2198 prepareForAssignment(m_Signature,sig);
2199 *m_pos_Signature=m_Signature=sig;
2200 // Sync content reference back up.
2202 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2205 IMPL_STRING_ATTRIB(ID);
2206 IMPL_STRING_ATTRIB(Name);
2207 IMPL_DATETIME_ATTRIB(ValidUntil);
2208 IMPL_DATETIME_ATTRIB(CacheDuration);
2209 IMPL_TYPED_CHILD(Extensions);
2210 IMPL_TYPED_CHILDREN(EntityDescriptor,m_children.end());
2211 IMPL_TYPED_CHILDREN(EntitiesDescriptor,m_children.end());
2214 void marshallAttributes(DOMElement* domElement) const {
2215 MARSHALL_ID_ATTRIB(ID,ID,NULL);
2216 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
2217 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2218 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2221 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2222 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLConstants::XMLSIG_NS,false);
2223 PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20MD_NS,false);
2224 PROC_TYPED_CHILDREN(EntityDescriptor,SAMLConstants::SAML20MD_NS,false);
2225 PROC_TYPED_CHILDREN(EntitiesDescriptor,SAMLConstants::SAML20MD_NS,false);
2226 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2229 void processAttribute(const DOMAttr* attribute) {
2230 PROC_ID_ATTRIB(ID,ID,NULL);
2231 PROC_STRING_ATTRIB(Name,NAME,NULL);
2232 PROC_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2233 PROC_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2240 #if defined (_MSC_VER)
2241 #pragma warning( pop )
2244 // Builder Implementations
2246 IMPL_XMLOBJECTBUILDER(AdditionalMetadataLocation);
2247 IMPL_XMLOBJECTBUILDER(AffiliateMember);
2248 IMPL_XMLOBJECTBUILDER(AffiliationDescriptor);
2249 IMPL_XMLOBJECTBUILDER(ArtifactResolutionService);
2250 IMPL_XMLOBJECTBUILDER(AssertionConsumerService);
2251 IMPL_XMLOBJECTBUILDER(AssertionIDRequestService);
2252 IMPL_XMLOBJECTBUILDER(AttributeAuthorityDescriptor);
2253 IMPL_XMLOBJECTBUILDER(AttributeConsumingService);
2254 IMPL_XMLOBJECTBUILDER(AttributeProfile);
2255 IMPL_XMLOBJECTBUILDER(AttributeService);
2256 IMPL_XMLOBJECTBUILDER(AuthnAuthorityDescriptor);
2257 IMPL_XMLOBJECTBUILDER(AuthnQueryService);
2258 IMPL_XMLOBJECTBUILDER(AuthzService);
2259 IMPL_XMLOBJECTBUILDER(Company);
2260 IMPL_XMLOBJECTBUILDER(ContactPerson);
2261 IMPL_XMLOBJECTBUILDER(EmailAddress);
2262 IMPL_XMLOBJECTBUILDER(EndpointType);
2263 IMPL_XMLOBJECTBUILDER(EntitiesDescriptor);
2264 IMPL_XMLOBJECTBUILDER(EntityDescriptor);
2265 IMPL_XMLOBJECTBUILDER(Extensions);
2266 IMPL_XMLOBJECTBUILDER(GivenName);
2267 IMPL_XMLOBJECTBUILDER(IDPSSODescriptor);
2268 IMPL_XMLOBJECTBUILDER(IndexedEndpointType);
2269 IMPL_XMLOBJECTBUILDER(KeyDescriptor);
2270 IMPL_XMLOBJECTBUILDER(localizedNameType);
2271 IMPL_XMLOBJECTBUILDER(localizedURIType);
2272 IMPL_XMLOBJECTBUILDER(ManageNameIDService);
2273 IMPL_XMLOBJECTBUILDER(NameIDFormat);
2274 IMPL_XMLOBJECTBUILDER(NameIDMappingService);
2275 IMPL_XMLOBJECTBUILDER(Organization);
2276 IMPL_XMLOBJECTBUILDER(OrganizationName);
2277 IMPL_XMLOBJECTBUILDER(OrganizationDisplayName);
2278 IMPL_XMLOBJECTBUILDER(OrganizationURL);
2279 IMPL_XMLOBJECTBUILDER(PDPDescriptor);
2280 IMPL_XMLOBJECTBUILDER(RequestedAttribute);
2281 IMPL_XMLOBJECTBUILDER(ServiceDescription);
2282 IMPL_XMLOBJECTBUILDER(ServiceName);
2283 IMPL_XMLOBJECTBUILDER(SingleLogoutService);
2284 IMPL_XMLOBJECTBUILDER(SingleSignOnService);
2285 IMPL_XMLOBJECTBUILDER(SPSSODescriptor);
2286 IMPL_XMLOBJECTBUILDER(SurName);
2287 IMPL_XMLOBJECTBUILDER(TelephoneNumber);
2289 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);
2290 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);
2291 const XMLCh AdditionalMetadataLocation::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(n,a,m,e,s,p,a,c,e);
2292 const XMLCh AffiliateMember::LOCAL_NAME[] = UNICODE_LITERAL_15(A,f,f,i,l,i,a,t,e,M,e,m,b,e,r);
2293 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);
2294 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);
2295 const XMLCh AffiliationDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2296 const XMLCh AffiliationDescriptor::VALIDUNTIL_ATTRIB_NAME[] = UNICODE_LITERAL_10(v,a,l,i,d,U,n,t,i,l);
2297 const XMLCh AffiliationDescriptor::CACHEDURATION_ATTRIB_NAME[] = UNICODE_LITERAL_13(c,a,c,h,e,D,u,r,a,t,i,o,n);
2298 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);
2299 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);
2300 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);
2301 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);
2302 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);
2303 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);
2304 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);
2305 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);
2306 const XMLCh AttributeConsumingService::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
2307 const XMLCh AttributeConsumingService::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
2308 const XMLCh AttributeProfile::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,P,r,o,f,i,l,e);
2309 const XMLCh AttributeService::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,S,e,r,v,i,c,e);
2310 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);
2311 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);
2312 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);
2313 const XMLCh AuthzService::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,z,S,e,r,v,i,c,e);
2314 const XMLCh Company::LOCAL_NAME[] = UNICODE_LITERAL_7(C,o,m,p,a,n,y);
2315 const XMLCh ContactPerson::LOCAL_NAME[] = UNICODE_LITERAL_13(C,o,n,t,a,c,t,P,e,r,s,o,n);
2316 const XMLCh ContactPerson::TYPE_NAME[] = UNICODE_LITERAL_11(C,o,n,t,a,c,t,T,y,p,e);
2317 const XMLCh ContactPerson::CONTACTTYPE_ATTRIB_NAME[] = UNICODE_LITERAL_11(c,o,n,t,a,c,t,T,y,p,e);
2318 const XMLCh ContactPerson::CONTACT_TECHNICAL[] = UNICODE_LITERAL_9(t,e,c,h,n,i,c,a,l);
2319 const XMLCh ContactPerson::CONTACT_SUPPORT[] = UNICODE_LITERAL_7(s,u,p,p,o,r,t);
2320 const XMLCh ContactPerson::CONTACT_ADMINISTRATIVE[] = UNICODE_LITERAL_14(a,d,m,i,n,i,s,t,r,a,t,i,v,e);
2321 const XMLCh ContactPerson::CONTACT_BILLING[] = UNICODE_LITERAL_7(b,i,l,l,i,n,g);
2322 const XMLCh ContactPerson::CONTACT_OTHER[] = UNICODE_LITERAL_5(o,t,h,e,r);
2323 const XMLCh EmailAddress::LOCAL_NAME[] = UNICODE_LITERAL_12(E,m,a,i,l,A,d,d,r,e,s,s);
2324 const XMLCh EndpointType::LOCAL_NAME[] = {chNull};
2325 const XMLCh EndpointType::TYPE_NAME[] = UNICODE_LITERAL_12(E,n,d,p,o,i,n,t,T,y,p,e);
2326 const XMLCh EndpointType::BINDING_ATTRIB_NAME[] = UNICODE_LITERAL_7(B,i,n,d,i,n,g);
2327 const XMLCh EndpointType::LOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_8(L,o,c,a,t,i,o,n);
2328 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);
2329 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);
2330 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);
2331 const XMLCh EntitiesDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2332 const XMLCh EntitiesDescriptor::VALIDUNTIL_ATTRIB_NAME[] = UNICODE_LITERAL_10(v,a,l,i,d,U,n,t,i,l);
2333 const XMLCh EntitiesDescriptor::CACHEDURATION_ATTRIB_NAME[] = UNICODE_LITERAL_13(c,a,c,h,e,D,u,r,a,t,i,o,n);
2334 const XMLCh EntitiesDescriptor::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e);
2335 const XMLCh EntityDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,D,e,s,c,r,i,p,t,o,r);
2336 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);
2337 const XMLCh EntityDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2338 const XMLCh EntityDescriptor::VALIDUNTIL_ATTRIB_NAME[] = UNICODE_LITERAL_10(v,a,l,i,d,U,n,t,i,l);
2339 const XMLCh EntityDescriptor::CACHEDURATION_ATTRIB_NAME[] = UNICODE_LITERAL_13(c,a,c,h,e,D,u,r,a,t,i,o,n);
2340 const XMLCh EntityDescriptor::ENTITYID_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,n,t,i,t,y,I,D);
2341 const XMLCh Extensions::LOCAL_NAME[] = UNICODE_LITERAL_10(E,x,t,e,n,s,i,o,n,s);
2342 const XMLCh Extensions::TYPE_NAME[] = UNICODE_LITERAL_14(E,x,t,e,n,s,i,o,n,s,T,y,p,e);
2343 const XMLCh GivenName::LOCAL_NAME[] = UNICODE_LITERAL_9(G,i,v,e,n,N,a,m,e);
2344 const XMLCh IDPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(I,D,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
2345 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);
2346 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);
2347 const XMLCh IndexedEndpointType::LOCAL_NAME[] = {chNull};
2348 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);
2349 const XMLCh IndexedEndpointType::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
2350 const XMLCh IndexedEndpointType::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
2351 const XMLCh KeyDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(K,e,y,D,e,s,c,r,i,p,t,o,r);
2352 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);
2353 const XMLCh KeyDescriptor::USE_ATTRIB_NAME[] = UNICODE_LITERAL_3(u,s,e);
2354 const XMLCh KeyDescriptor::KEYTYPE_ENCRYPTION[] = UNICODE_LITERAL_10(e,n,c,r,y,p,t,i,o,n);
2355 const XMLCh KeyDescriptor::KEYTYPE_SIGNING[] = UNICODE_LITERAL_7(s,i,g,n,i,n,g);
2356 const XMLCh localizedNameType::LOCAL_NAME[] = {chNull};
2357 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);
2358 const XMLCh localizedNameType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2359 const XMLCh localizedURIType::LOCAL_NAME[] = {chNull};
2360 const XMLCh localizedURIType::TYPE_NAME[] = UNICODE_LITERAL_16(l,o,c,a,l,i,z,e,d,U,R,I,T,y,p,e);
2361 const XMLCh localizedURIType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2362 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);
2363 const XMLCh NameIDFormat::LOCAL_NAME[] = UNICODE_LITERAL_12(N,a,m,e,I,D,F,o,r,m,a,t);
2364 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);
2365 const XMLCh Organization::LOCAL_NAME[] = UNICODE_LITERAL_12(O,r,g,a,n,i,z,a,t,i,o,n);
2366 const XMLCh Organization::TYPE_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,T,y,p,e);
2367 const XMLCh OrganizationName::LOCAL_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,N,a,m,e);
2368 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);
2369 const XMLCh OrganizationURL::LOCAL_NAME[] = UNICODE_LITERAL_15(O,r,g,a,n,i,z,a,t,i,o,n,U,R,L);
2370 const XMLCh PDPDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(P,D,P,D,e,s,c,r,i,p,t,o,r);
2371 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);
2372 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);
2373 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);
2374 const XMLCh RequestedAttribute::ISREQUIRED_ATTRIB_NAME[] = UNICODE_LITERAL_10(i,s,R,e,q,u,i,r,e,d);
2375 const XMLCh RoleDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2376 const XMLCh RoleDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2377 const XMLCh RoleDescriptor::VALIDUNTIL_ATTRIB_NAME[] = UNICODE_LITERAL_10(v,a,l,i,d,U,n,t,i,l);
2378 const XMLCh RoleDescriptor::CACHEDURATION_ATTRIB_NAME[] = UNICODE_LITERAL_13(c,a,c,h,e,D,u,r,a,t,i,o,n);
2379 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);
2380 const XMLCh RoleDescriptor::ERRORURL_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,r,r,o,r,U,R,L);
2381 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);
2382 const XMLCh ServiceName::LOCAL_NAME[] = UNICODE_LITERAL_11(S,e,r,v,i,c,e,N,a,m,e);
2383 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);
2384 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);
2385 const XMLCh SPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_15(S,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
2386 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);
2387 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);
2388 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);
2389 const XMLCh SSODescriptorType::LOCAL_NAME[] = {chNull};
2390 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);
2391 const XMLCh SurName::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,r,N,a,m,e);
2392 const XMLCh TelephoneNumber::LOCAL_NAME[] = UNICODE_LITERAL_15(T,e,l,e,p,h,o,n,e,N,u,m,b,e,r);