From c34a0ec3de77f3c8b7ea47414e8b0c095c04b29b Mon Sep 17 00:00:00 2001 From: cantor Date: Tue, 6 Nov 2007 18:45:02 +0000 Subject: [PATCH] SOAP header attributes don't appear on the actual Header element. git-svn-id: https://svn.middleware.georgetown.edu/cpp-xmltooling/trunk@412 de75baf8-a10c-0410-a50a-987c0e22f00f --- xmltooling/soap/SOAP.h | 6 ++++-- xmltooling/soap/impl/SOAPImpl.cpp | 27 --------------------------- 2 files changed, 4 insertions(+), 29 deletions(-) diff --git a/xmltooling/soap/SOAP.h b/xmltooling/soap/SOAP.h index 3c79da4..031599b 100644 --- a/xmltooling/soap/SOAP.h +++ b/xmltooling/soap/SOAP.h @@ -81,8 +81,10 @@ namespace soap11 { END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,Header,xmltooling::ElementProxy,SOAP 1.1 Header element); - DECL_BOOLEAN_ATTRIB(MustUnderstand,MUSTUNDERSTAND,false); - DECL_STRING_ATTRIB(Actor,ACTOR); + /** Actor header block attribute name */ + static const XMLCh ACTOR_ATTRIB_NAME[]; + /** mustUnderstand header block attribute name */ + static const XMLCh MUSTUNDERSTAND_ATTRIB_NAME[]; /** Header (type) local name */ static const XMLCh TYPE_NAME[]; END_XMLOBJECT; diff --git a/xmltooling/soap/impl/SOAPImpl.cpp b/xmltooling/soap/impl/SOAPImpl.cpp index 62315ca..1822776 100644 --- a/xmltooling/soap/impl/SOAPImpl.cpp +++ b/xmltooling/soap/impl/SOAPImpl.cpp @@ -260,18 +260,12 @@ namespace { public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { - void init() { - m_Actor=NULL; - m_MustUnderstand=xmlconstants::XML_BOOL_NULL; - } public: virtual ~HeaderImpl() { - XMLString::release(&m_Actor); } HeaderImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) { - init(); } HeaderImpl(const HeaderImpl& src) @@ -279,37 +273,16 @@ namespace { AbstractAttributeExtensibleXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) { - init(); - setActor(src.getActor()); - MustUnderstand(m_MustUnderstand); VectorOf(XMLObject) v=getUnknownXMLObjects(); for (vector::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i) v.push_back((*i)->clone()); } IMPL_XMLOBJECT_CLONE(Header); - IMPL_STRING_ATTRIB(Actor); - IMPL_BOOLEAN_ATTRIB(MustUnderstand); IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject, m_children.end()); - void setAttribute(QName& qualifiedName, const XMLCh* value, bool ID=false) { - if (qualifiedName.hasNamespaceURI() && XMLString::equals(qualifiedName.getNamespaceURI(),SOAP11ENV_NS)) { - if (XMLString::equals(qualifiedName.getLocalPart(),MUSTUNDERSTAND_ATTRIB_NAME)) { - setMustUnderstand(value); - return; - } - else if (XMLString::equals(qualifiedName.getLocalPart(),ACTOR_ATTRIB_NAME)) { - setActor(value); - return; - } - } - AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID); - } - protected: void marshallAttributes(DOMElement* domElement) const { - MARSHALL_STRING_ATTRIB(Actor,ACTOR,SOAP11ENV_NS); - MARSHALL_BOOLEAN_ATTRIB(MustUnderstand,MUSTUNDERSTAND,SOAP11ENV_NS); marshallExtensionAttributes(domElement); } -- 2.1.4