X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-opensaml.git;a=blobdiff_plain;f=saml%2Fsaml1%2Fcore%2Fimpl%2FProtocolsImpl.cpp;h=28a5fe107a9ce141670e8e14d3e4194e5e064ca9;hp=d765e13a1198f158f7d2e69fe2ffeaffafba5f9a;hb=ede749b3b44c70d6b8f5fc59d4f17a81d6e07a1a;hpb=d21164341ad0b4723617413f161864be6c1b0905 diff --git a/saml/saml1/core/impl/ProtocolsImpl.cpp b/saml/saml1/core/impl/ProtocolsImpl.cpp index d765e13..28a5fe1 100644 --- a/saml/saml1/core/impl/ProtocolsImpl.cpp +++ b/saml/saml1/core/impl/ProtocolsImpl.cpp @@ -66,7 +66,7 @@ namespace opensaml { public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { - xmltooling::QName* m_qname; + mutable xmltooling::QName* m_qname; public: virtual ~RespondWithImpl() { delete m_qname; @@ -82,6 +82,9 @@ namespace opensaml { } xmltooling::QName* getQName() const { + if (!m_qname && getDOM() && getDOM()->getTextContent()) { + m_qname = XMLHelper::getNodeValueAsQName(getDOM()); + } return m_qname; } @@ -91,8 +94,9 @@ namespace opensaml { auto_ptr_XMLCh temp(m_qname->toString().c_str()); setTextContent(temp.get()); } - else + else { setTextContent(nullptr); + } } IMPL_XMLOBJECT_CLONE(RespondWith);