Envelope* env = EnvelopeBuilder::buildEnvelope();
Body* body = BodyBuilder::buildBody();
env->setBody(body);
- body->getXMLObjects().push_back(request);
+ body->getUnknownXMLObjects().push_back(request);
try {
send(env, peer, endpoint);
m_correlate = XMLString::replicate(request->getRequestID());
Body* body = env->getBody();
if (body && body->hasChildren()) {
// Check for SAML Response.
- Response* response = dynamic_cast<Response*>(body->getXMLObjects().front());
+ Response* response = dynamic_cast<Response*>(body->getUnknownXMLObjects().front());
if (response) {
// Check InResponseTo.
Body* body = env->getBody();
if (body && body->hasChildren()) {
- Request* request = dynamic_cast<Request*>(body->getXMLObjects().front());
+ Request* request = dynamic_cast<Request*>(body->getUnknownXMLObjects().front());
if (request) {
// Run through the policy at two layers.
policy.evaluate(*env, &genericRequest);
Envelope* env = EnvelopeBuilder::buildEnvelope();
Body* body = BodyBuilder::buildBody();
env->setBody(body);
- body->getXMLObjects().push_back(response);
+ body->getUnknownXMLObjects().push_back(response);
if (credResolver ) {
if (response->getSignature()) {
log.debug("response already signed, skipping signature operation");
Envelope* env = EnvelopeBuilder::buildEnvelope();
Body* body = BodyBuilder::buildBody();
env->setBody(body);
- body->getXMLObjects().push_back(fault);
+ body->getUnknownXMLObjects().push_back(fault);
rootElement = env->marshall();
string xmlbuf;
bool error =
(env->getBody() &&
env->getBody()->hasChildren() &&
- dynamic_cast<Fault*>(env->getBody()->getXMLObjects().front()));
+ dynamic_cast<Fault*>(env->getBody()->getUnknownXMLObjects().front()));
string xmlbuf;
XMLHelper::serialize(rootElement, xmlbuf);
#include <saml/RootObject.h>
#include <saml/util/SAMLConstants.h>
-#include <xmltooling/AttributeExtensibleXMLObject.h>
#include <xmltooling/ElementProxy.h>
#include <xmltooling/XMLObjectBuilder.h>
#include <xmltooling/signature/KeyInfo.h>
static const XMLCh WIN_DOMAIN_QUALIFIED[];
END_XMLOBJECT;
- BEGIN_XMLOBJECT2(SAML_API,SubjectConfirmationData,xmltooling::ElementProxy,xmltooling::AttributeExtensibleXMLObject,SAML 1.x SubjectConfirmationData element);
+ BEGIN_XMLOBJECT(SAML_API,SubjectConfirmationData,xmltooling::ElementProxy,SAML 1.x SubjectConfirmationData element);
END_XMLOBJECT;
BEGIN_XMLOBJECT(SAML_API,SubjectConfirmation,xmltooling::XMLObject,SAML 1.x SubjectConfirmation element);
static const XMLCh TYPE_NAME[];
END_XMLOBJECT;
- BEGIN_XMLOBJECT2(SAML_API,AttributeValue,xmltooling::ElementProxy,xmltooling::AttributeExtensibleXMLObject,SAML 1.x AttributeValue element);
+ BEGIN_XMLOBJECT(SAML_API,AttributeValue,xmltooling::ElementProxy,SAML 1.x AttributeValue element);
END_XMLOBJECT;
BEGIN_XMLOBJECT(SAML_API,AttributeStatement,SubjectStatement,SAML 1.x AttributeStatement element);
static const XMLCh TYPE_NAME[];
END_XMLOBJECT;
- BEGIN_XMLOBJECT(SAML_API,Advice,xmltooling::XMLObject,SAML 1.x Advice element);
+ BEGIN_XMLOBJECT(SAML_API,Advice,xmltooling::ElementExtensibleXMLObject,SAML 1.x Advice element);
DECL_TYPED_CHILDREN(AssertionIDReference);
DECL_TYPED_CHILDREN(Assertion);
- DECL_XMLOBJECT_CHILDREN(Other);
/** AdviceType local name */
static const XMLCh TYPE_NAME[];
END_XMLOBJECT;
#include <saml/RootObject.h>
#include <saml/util/SAMLConstants.h>
-#include <xmltooling/AttributeExtensibleXMLObject.h>
-#include <xmltooling/ElementProxy.h>
#include <xmltooling/XMLObjectBuilder.h>
#include <xmltooling/signature/KeyInfo.h>
#include <xmltooling/signature/Signature.h>
static xmltooling::QName VERSIONMISMATCH;
END_XMLOBJECT;
- BEGIN_XMLOBJECT(SAML_API,StatusDetail,xmltooling::XMLObject,SAML 1.x StatusDetail element);
- DECL_XMLOBJECT_CHILDREN(Detail);
+ BEGIN_XMLOBJECT(SAML_API,StatusDetail,xmltooling::ElementExtensibleXMLObject,SAML 1.x StatusDetail element);
/** StatusDetailType local name */
static const XMLCh TYPE_NAME[];
END_XMLOBJECT;
#include "saml1/core/Assertions.h"
#include <xmltooling/AbstractComplexElement.h>
-#include <xmltooling/AbstractElementProxy.h>
#include <xmltooling/AbstractSimpleElement.h>
#include <xmltooling/impl/AnyElement.h>
#include <xmltooling/io/AbstractXMLObjectMarshaller.h>
continue;
}
- getOthers().push_back((*i)->clone());
+ getUnknownXMLObjects().push_back((*i)->clone());
}
}
}
IMPL_XMLOBJECT_CLONE(Advice);
IMPL_TYPED_CHILDREN(AssertionIDReference,m_children.end());
IMPL_TYPED_CHILDREN(Assertion,m_children.end());
- IMPL_XMLOBJECT_CHILDREN(Other,m_children.end());
+ IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
protected:
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
// Unknown child.
const XMLCh* nsURI=root->getNamespaceURI();
if (!XMLString::equals(nsURI,SAML1_NS) && nsURI && *nsURI) {
- getOthers().push_back(childXMLObject);
+ getUnknownXMLObjects().push_back(childXMLObject);
return;
}
};
BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,Advice);
- const vector<XMLObject*>& anys=ptr->getOthers();
+ const vector<XMLObject*>& anys=ptr->getUnknownXMLObjects();
for_each(anys.begin(),anys.end(),checkWildcardNS());
END_XMLOBJECTVALIDATOR;
#include "saml1/core/Protocols.h"
#include <xmltooling/AbstractComplexElement.h>
-#include <xmltooling/AbstractElementProxy.h>
#include <xmltooling/AbstractSimpleElement.h>
#include <xmltooling/impl/AnyElement.h>
#include <xmltooling/io/AbstractXMLObjectMarshaller.h>
StatusDetailImpl(const StatusDetailImpl& src)
: AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
- VectorOf(XMLObject) v=getDetails();
- for (vector<XMLObject*>::const_iterator i=src.m_Details.begin(); i!=src.m_Details.end(); i++) {
- if (*i) {
- v.push_back((*i)->clone());
- }
- }
+ VectorOf(XMLObject) v=getUnknownXMLObjects();
+ for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
+ v.push_back((*i)->clone());
}
IMPL_XMLOBJECT_CLONE(StatusDetail);
- IMPL_XMLOBJECT_CHILDREN(Detail,m_children.end());
+ IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
protected:
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
- getDetails().push_back(childXMLObject);
+ getUnknownXMLObjects().push_back(childXMLObject);
}
};
Envelope* env = EnvelopeBuilder::buildEnvelope();
Body* body = BodyBuilder::buildBody();
env->setBody(body);
- body->getXMLObjects().push_back(request);
+ body->getUnknownXMLObjects().push_back(request);
try {
send(env, peer, endpoint);
m_correlate = XMLString::replicate(request->getID());
Body* body = env->getBody();
if (body && body->hasChildren()) {
// Check for SAML Response.
- StatusResponseType* response = dynamic_cast<StatusResponseType*>(body->getXMLObjects().front());
+ StatusResponseType* response = dynamic_cast<StatusResponseType*>(body->getUnknownXMLObjects().front());
if (response) {
// Check InResponseTo.
Body* body = env->getBody();
if (body && body->hasChildren()) {
- RequestAbstractType* request = dynamic_cast<RequestAbstractType*>(body->getXMLObjects().front());
+ RequestAbstractType* request = dynamic_cast<RequestAbstractType*>(body->getUnknownXMLObjects().front());
if (request) {
// Run through the policy at two layers.
policy.evaluate(*env, &genericRequest);
Envelope* env = EnvelopeBuilder::buildEnvelope();
Body* body = BodyBuilder::buildBody();
env->setBody(body);
- body->getXMLObjects().push_back(response);
+ body->getUnknownXMLObjects().push_back(response);
if (credResolver ) {
if (response->getSignature()) {
log.debug("response already signed, skipping signature operation");
Envelope* env = EnvelopeBuilder::buildEnvelope();
Body* body = BodyBuilder::buildBody();
env->setBody(body);
- body->getXMLObjects().push_back(fault);
+ body->getUnknownXMLObjects().push_back(fault);
rootElement = env->marshall();
string xmlbuf;
bool error =
(env->getBody() &&
env->getBody()->hasChildren() &&
- dynamic_cast<Fault*>(env->getBody()->getXMLObjects().front()));
+ dynamic_cast<Fault*>(env->getBody()->getUnknownXMLObjects().front()));
string xmlbuf;
XMLHelper::serialize(rootElement, xmlbuf);
#include <saml/RootObject.h>
#include <saml/util/SAMLConstants.h>
-#include <xmltooling/AttributeExtensibleXMLObject.h>
-#include <xmltooling/ElementProxy.h>
#include <xmltooling/XMLObjectBuilder.h>
#include <xmltooling/encryption/Encryption.h>
#include <xmltooling/signature/KeyResolver.h>
static const XMLCh TYPE_NAME[];
END_XMLOBJECT;
- BEGIN_XMLOBJECT2(SAML_API,SubjectConfirmationData,xmltooling::ElementProxy,xmltooling::AttributeExtensibleXMLObject,SAML 2.0 SubjectConfirmationData element);
+ BEGIN_XMLOBJECT(SAML_API,SubjectConfirmationData,xmltooling::ElementProxy,SAML 2.0 SubjectConfirmationData element);
DECL_DATETIME_ATTRIB(NotBefore,NOTBEFORE);
DECL_DATETIME_ATTRIB(NotOnOrAfter,NOTONORAFTER);
DECL_STRING_ATTRIB(Recipient,RECIPIENT);
static const XMLCh DECISION_INDETERMINATE[];
END_XMLOBJECT;
- BEGIN_XMLOBJECT2(SAML_API,AttributeValue,xmltooling::ElementProxy,xmltooling::AttributeExtensibleXMLObject,SAML 2.0 AttributeValue element);
+ BEGIN_XMLOBJECT(SAML_API,AttributeValue,xmltooling::ElementProxy,SAML 2.0 AttributeValue element);
END_XMLOBJECT;
BEGIN_XMLOBJECT(SAML_API,Attribute,xmltooling::AttributeExtensibleXMLObject,SAML 2.0 Attribute element);
BEGIN_XMLOBJECT(SAML_API,EncryptedAssertion,EncryptedElementType,SAML 2.0 EncryptedAssertion element);
END_XMLOBJECT;
- BEGIN_XMLOBJECT(SAML_API,Advice,xmltooling::XMLObject,SAML 2.0 Advice element);
+ BEGIN_XMLOBJECT(SAML_API,Advice,xmltooling::ElementExtensibleXMLObject,SAML 2.0 Advice element);
DECL_TYPED_CHILDREN(AssertionIDRef);
DECL_TYPED_CHILDREN(AssertionURIRef);
DECL_TYPED_CHILDREN(Assertion);
DECL_TYPED_CHILDREN(EncryptedAssertion);
- DECL_XMLOBJECT_CHILDREN(Other);
/** AdviceType local name */
static const XMLCh TYPE_NAME[];
END_XMLOBJECT;
DECL_XMLOBJECT_SIMPLE(SAML_API,RespondTo,Name,SAML 2.0 third-party request RespondTo extension element);
- BEGIN_XMLOBJECT(SAML_API,Extensions,xmltooling::ElementProxy,SAML 2.0 protocol Extensions element);
+ BEGIN_XMLOBJECT(SAML_API,Extensions,xmltooling::ElementExtensibleXMLObject,SAML 2.0 protocol Extensions element);
/** ExtensionsType local name */
static const XMLCh TYPE_NAME[];
END_XMLOBJECT;
/*@{*/
END_XMLOBJECT;
- BEGIN_XMLOBJECT(SAML_API,StatusDetail,xmltooling::XMLObject,SAML 2.0 StatusDetail element);
- DECL_XMLOBJECT_CHILDREN(Detail);
+ BEGIN_XMLOBJECT(SAML_API,StatusDetail,xmltooling::ElementExtensibleXMLObject,SAML 2.0 StatusDetail element);
/** StatusDetailType local name */
static const XMLCh TYPE_NAME[];
END_XMLOBJECT;
#include "saml2/core/Assertions.h"
#include <xmltooling/AbstractComplexElement.h>
-#include <xmltooling/AbstractElementProxy.h>
#include <xmltooling/AbstractSimpleElement.h>
#include <xmltooling/encryption/Decrypter.h>
#include <xmltooling/impl/AnyElement.h>
setInResponseTo(src.getInResponseTo());
setAddress(src.getAddress());
VectorOf(KeyInfo) v=getKeyInfos();
- for (vector<KeyInfo*>::const_iterator i=src.m_KeyInfos.begin(); i!=src.m_KeyInfos.end(); i++) {
- if (*i) {
- v.push_back((*i)->cloneKeyInfo());
- }
- }
+ for (vector<KeyInfo*>::const_iterator i=src.m_KeyInfos.begin(); i!=src.m_KeyInfos.end(); ++i)
+ v.push_back((*i)->cloneKeyInfo());
}
IMPL_XMLOBJECT_CLONE(KeyInfoConfirmationDataType);
continue;
}
- getOthers().push_back((*i)->clone());
+ getUnknownXMLObjects().push_back((*i)->clone());
}
}
}
IMPL_TYPED_CHILDREN(AssertionURIRef,m_children.end());
IMPL_TYPED_CHILDREN(Assertion,m_children.end());
IMPL_TYPED_CHILDREN(EncryptedAssertion,m_children.end());
- IMPL_XMLOBJECT_CHILDREN(Other,m_children.end());
+ IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
protected:
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
// Unknown child.
const XMLCh* nsURI=root->getNamespaceURI();
if (!XMLString::equals(nsURI,SAML20_NS) && nsURI && *nsURI) {
- getOthers().push_back(childXMLObject);
+ getUnknownXMLObjects().push_back(childXMLObject);
return;
}
};
BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,Advice);
- const vector<XMLObject*>& anys=ptr->getOthers();
+ const vector<XMLObject*>& anys=ptr->getUnknownXMLObjects();
for_each(anys.begin(),anys.end(),checkWildcardNS());
END_XMLOBJECTVALIDATOR;
#include "saml2/core/Protocols.h"
#include <xmltooling/AbstractComplexElement.h>
-#include <xmltooling/AbstractElementProxy.h>
#include <xmltooling/AbstractSimpleElement.h>
#include <xmltooling/encryption/Decrypter.h>
#include <xmltooling/impl/AnyElement.h>
//TODO need unit test for this, using objects from another namespace
class SAML_DLLLOCAL ExtensionsImpl : public virtual Extensions,
- public AbstractElementProxy,
+ public AbstractComplexElement,
public AbstractDOMCachingXMLObject,
public AbstractXMLObjectMarshaller,
public AbstractXMLObjectUnmarshaller
}
ExtensionsImpl(const ExtensionsImpl& src)
- : AbstractXMLObject(src), AbstractElementProxy(src), AbstractDOMCachingXMLObject(src) {
- for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
- if (*i) {
- getXMLObjects().push_back((*i)->clone());
- }
- }
+ : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
+ VectorOf(XMLObject) v=getUnknownXMLObjects();
+ for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
+ v.push_back((*i)->clone());
}
IMPL_XMLOBJECT_CLONE(Extensions);
+ IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
protected:
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
// Unknown child.
const XMLCh* nsURI=root->getNamespaceURI();
if (!XMLString::equals(nsURI,SAML20P_NS) && nsURI && *nsURI) {
- getXMLObjects().push_back(childXMLObject);
+ getUnknownXMLObjects().push_back(childXMLObject);
return;
}
StatusDetailImpl(const StatusDetailImpl& src)
: AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
- VectorOf(XMLObject) v=getDetails();
- for (vector<XMLObject*>::const_iterator i=src.m_Details.begin(); i!=src.m_Details.end(); i++) {
- if (*i) {
- v.push_back((*i)->clone());
- }
- }
+ VectorOf(XMLObject) v=getUnknownXMLObjects();
+ for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
+ v.push_back((*i)->clone());
}
IMPL_XMLOBJECT_CLONE(StatusDetail);
- IMPL_XMLOBJECT_CHILDREN(Detail,m_children.end());
+ IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
protected:
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
- getDetails().push_back(childXMLObject);
- AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
+ getUnknownXMLObjects().push_back(childXMLObject);
}
};
BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,Extensions);
if (!ptr->hasChildren())
throw ValidationException("Extensions must have at least one child element.");
- const list<XMLObject*>& anys=ptr->getXMLObjects();
+ const vector<XMLObject*>& anys=ptr->getUnknownXMLObjects();
for_each(anys.begin(),anys.end(),checkWildcardNS());
END_XMLOBJECTVALIDATOR;
DECL_SIMPLE_CONTENT(URL);
END_XMLOBJECT;
- BEGIN_XMLOBJECT(SAML_API,Extensions,xmltooling::ElementProxy,SAML 2.0 Extensions element);
+ BEGIN_XMLOBJECT(SAML_API,Extensions,xmltooling::ElementExtensibleXMLObject,SAML 2.0 Extensions element);
/** ExtensionsType local name */
static const XMLCh TYPE_NAME[];
END_XMLOBJECT;
DECL_TYPED_CHILDREN(ContactPerson);
END_XMLOBJECT;
- BEGIN_XMLOBJECT2(SAML_API,EndpointType,xmltooling::ElementProxy,xmltooling::AttributeExtensibleXMLObject,SAML 2.0 EndpointType type);
+ BEGIN_XMLOBJECT(SAML_API,EndpointType,xmltooling::ElementProxy,SAML 2.0 EndpointType type);
DECL_STRING_ATTRIB(Binding,BINDING);
DECL_STRING_ATTRIB(Location,LOCATION);
DECL_STRING_ATTRIB(ResponseLocation,RESPONSELOCATION);
if ((*i)->hasSupport(samlconstants::SAML10_PROTOCOL_ENUM) || (*i)->hasSupport(samlconstants::SAML11_PROTOCOL_ENUM)) {
// Check for SourceID extension element.
const Extensions* exts=(*i)->getExtensions();
- if (exts) {
- const list<XMLObject*>& children=exts->getXMLObjects();
- for (list<XMLObject*>::const_iterator ext=children.begin(); ext!=children.end(); ext++) {
+ if (exts && exts->hasChildren()) {
+ const vector<XMLObject*>& children=exts->getUnknownXMLObjects();
+ for (vector<XMLObject*>::const_iterator ext=children.begin(); ext!=children.end(); ++ext) {
SourceID* sid=dynamic_cast<SourceID*>(*ext);
if (sid) {
auto_ptr_char sourceid(sid->getID());
#include "saml2/metadata/MetadataKeyInfoIterator.h"
#include <xmltooling/AbstractComplexElement.h>
-#include <xmltooling/AbstractElementProxy.h>
#include <xmltooling/AbstractSimpleElement.h>
#include <xmltooling/impl/AnyElement.h>
#include <xmltooling/io/AbstractXMLObjectMarshaller.h>
};
class SAML_DLLLOCAL ExtensionsImpl : public virtual Extensions,
- public AbstractElementProxy,
+ public AbstractComplexElement,
public AbstractDOMCachingXMLObject,
public AbstractXMLObjectMarshaller,
public AbstractXMLObjectUnmarshaller
}
ExtensionsImpl(const ExtensionsImpl& src)
- : AbstractXMLObject(src), AbstractElementProxy(src), AbstractDOMCachingXMLObject(src) {
- for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
- if (*i) {
- getXMLObjects().push_back((*i)->clone());
- }
- }
+ : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
+ VectorOf(XMLObject) v=getUnknownXMLObjects();
+ for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
+ v.push_back((*i)->clone());
}
IMPL_XMLOBJECT_CLONE(Extensions);
+ IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
protected:
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
// Unknown child.
const XMLCh* nsURI=root->getNamespaceURI();
if (!XMLString::equals(nsURI,SAML20MD_NS) && nsURI && *nsURI) {
- getXMLObjects().push_back(childXMLObject);
+ getUnknownXMLObjects().push_back(childXMLObject);
return;
}
};
class SAML_DLLLOCAL EndpointTypeImpl : public virtual EndpointType,
- public AbstractElementProxy,
public AbstractAttributeExtensibleXMLObject,
+ public AbstractComplexElement,
public AbstractDOMCachingXMLObject,
public AbstractXMLObjectMarshaller,
public AbstractXMLObjectUnmarshaller
}
EndpointTypeImpl(const EndpointTypeImpl& src)
- : AbstractXMLObject(src), AbstractElementProxy(src),
- AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
+ : AbstractXMLObject(src),
+ AbstractAttributeExtensibleXMLObject(src),
+ AbstractComplexElement(src),
+ AbstractDOMCachingXMLObject(src) {
setBinding(src.getBinding());
setLocation(src.getLocation());
setResponseLocation(src.getResponseLocation());
- for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
- if (*i) {
- getXMLObjects().push_back((*i)->clone());
- }
- }
+ VectorOf(XMLObject) v=getUnknownXMLObjects();
+ for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
+ v.push_back((*i)->clone());
}
IMPL_XMLOBJECT_CLONE(EndpointType);
IMPL_STRING_ATTRIB(Binding);
IMPL_STRING_ATTRIB(Location);
IMPL_STRING_ATTRIB(ResponseLocation);
+ IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
if (!qualifiedName.hasNamespaceURI()) {
// Unknown child.
const XMLCh* nsURI=root->getNamespaceURI();
if (!XMLString::equals(nsURI,SAML20MD_NS) && nsURI && *nsURI) {
- getXMLObjects().push_back(childXMLObject);
+ getUnknownXMLObjects().push_back(childXMLObject);
return;
}
AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,Extensions);
if (!ptr->hasChildren())
throw ValidationException("Extensions must have at least one child element.");
- const list<XMLObject*>& anys=ptr->getXMLObjects();
+ const vector<XMLObject*>& anys=ptr->getUnknownXMLObjects();
for_each(anys.begin(),anys.end(),checkWildcardNS());
END_XMLOBJECTVALIDATOR;
BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,EndpointType);
XMLOBJECTVALIDATOR_REQUIRE(EndpointType,Binding);
XMLOBJECTVALIDATOR_REQUIRE(EndpointType,Location);
- const list<XMLObject*>& anys=ptr->getXMLObjects();
+ const vector<XMLObject*>& anys=ptr->getUnknownXMLObjects();
for_each(anys.begin(),anys.end(),checkWildcardNS());
END_XMLOBJECTVALIDATOR;
TSM_ASSERT_EQUALS("# of AssertionURIRef child elements", 0, advice->getAssertionURIRefs().size());
TSM_ASSERT_EQUALS("# of Assertion child elements", 0, advice->getAssertions().size());
TSM_ASSERT_EQUALS("# of EncryptedAssertion child elements", 0, advice->getEncryptedAssertions().size());
- TSM_ASSERT_EQUALS("# of Other child elements", 0, advice->getOthers().size());
+ TSM_ASSERT_EQUALS("# of Other child elements", 0, advice->getUnknownXMLObjects().size());
}
void testChildElementsUnmarshall() {
TSM_ASSERT_EQUALS("# of AssertionURIRef child elements", 2, advice->getAssertionURIRefs().size());
TSM_ASSERT_EQUALS("# of Assertion child elements", 2, advice->getAssertions().size());
TSM_ASSERT_EQUALS("# of EncryptedAssertion child elements", 1, advice->getEncryptedAssertions().size());
- TSM_ASSERT_EQUALS("# of Other child elements", 0, advice->getOthers().size());
+ TSM_ASSERT_EQUALS("# of Other child elements", 0, advice->getUnknownXMLObjects().size());
}
void testSingleElementMarshall() {
auto_ptr<XMLObject> xo(unmarshallElement(singleElementFile));
StatusDetail* sd= dynamic_cast<StatusDetail*>(xo.get());
TS_ASSERT(sd!=NULL);
- TSM_ASSERT_EQUALS("StatusDetail child elements", sd->getDetails().size(), 0);
+ TSM_ASSERT_EQUALS("StatusDetail child elements", sd->getUnknownXMLObjects().size(), 0);
}
//TODO test with some XMLObject child elements from another namespace
auto_ptr<XMLObject> xo(unmarshallElement(childElementsFile));
StatusDetail* sd= dynamic_cast<StatusDetail*>(xo.get());
TS_ASSERT(sd!=NULL);
- TSM_ASSERT_EQUALS("StatusDetail child elements", sd->getDetails().size(), 3);
+ TSM_ASSERT_EQUALS("StatusDetail child elements", sd->getUnknownXMLObjects().size(), 3);
}
void testSingleElementMarshall() {