From: cantor Date: Thu, 2 Oct 2008 18:41:14 +0000 (+0000) Subject: Remove "hardwired" declaration of encodingStyle attribute. X-Git-Tag: 1.4.1~300 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fxmltooling.git;a=commitdiff_plain;h=36c4f3d4e541b6bcf9e4add255881f4f1e73d764 Remove "hardwired" declaration of encodingStyle attribute. git-svn-id: https://svn.middleware.georgetown.edu/cpp-xmltooling/branches/REL_1@531 de75baf8-a10c-0410-a50a-987c0e22f00f --- diff --git a/xmltooling/soap/SOAP.h b/xmltooling/soap/SOAP.h index ff2de77..641040d 100644 --- a/xmltooling/soap/SOAP.h +++ b/xmltooling/soap/SOAP.h @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2008 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -75,7 +75,8 @@ namespace soap11 { END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,Body,xmltooling::ElementProxy,SOAP 1.1 Body element); - DECL_STRING_ATTRIB(EncodingStyle,ENCODINGSTYLE); + /** encodingStyle attribute name */ + static const XMLCh ENCODINGSTYLE_ATTRIB_NAME[]; /** Body (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 e6fc4d6..f7f13b4 100644 --- a/xmltooling/soap/impl/SOAPImpl.cpp +++ b/xmltooling/soap/impl/SOAPImpl.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2008 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ /** * SOAPImpl.cpp * - * Implementation classes for SOAP schema + * Implementation classes for SOAP 1.1 schema */ #include "internal.h" @@ -199,17 +199,12 @@ namespace { public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { - void init() { - m_EncodingStyle=NULL; - } public: virtual ~BodyImpl() { - XMLString::release(&m_EncodingStyle); } BodyImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType) : AbstractXMLObject(nsURI, localName, prefix, schemaType) { - init(); } BodyImpl(const BodyImpl& src) @@ -217,31 +212,16 @@ namespace { AbstractAttributeExtensibleXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) { - init(); - setEncodingStyle(src.getEncodingStyle()); 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(Body); - IMPL_STRING_ATTRIB(EncodingStyle); IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject, m_children.end()); - using AbstractAttributeExtensibleXMLObject::setAttribute; - void setAttribute(QName& qualifiedName, const XMLCh* value, bool ID=false) { - if (qualifiedName.hasNamespaceURI() && XMLString::equals(qualifiedName.getNamespaceURI(),SOAP11ENV_NS)) { - if (XMLString::equals(qualifiedName.getLocalPart(),ENCODINGSTYLE_ATTRIB_NAME)) { - setEncodingStyle(value); - return; - } - } - AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID); - } - protected: void marshallAttributes(DOMElement* domElement) const { - MARSHALL_STRING_ATTRIB(EncodingStyle,ENCODINGSTYLE,SOAP11ENV_NS); marshallExtensionAttributes(domElement); } @@ -385,12 +365,12 @@ const XMLCh Header::TYPE_NAME[] = UNICODE_LITERAL_6(H,e,a, const XMLCh Header::ACTOR_ATTRIB_NAME[] = UNICODE_LITERAL_5(a,c,t,o,r); const XMLCh Header::MUSTUNDERSTAND_ATTRIB_NAME[] = UNICODE_LITERAL_14(m,u,s,t,U,n,d,e,r,s,t,a,n,d); -static const XMLCh _CLIENT[] = UNICODE_LITERAL_6(C,l,i,e,n,t); -static const XMLCh _SERVER[] = UNICODE_LITERAL_6(S,e,r,v,e,r); -static const XMLCh _MUSTUNDERSTAND[] = UNICODE_LITERAL_14(M,u,s,t,U,n,d,e,r,s,t,a,n,d); -static const XMLCh _VERSIONMISMATCH[] = UNICODE_LITERAL_15(V,e,r,s,i,o,n,M,i,s,m,a,t,c,h); - -QName Faultcode::CLIENT(SOAP11ENV_NS,_CLIENT,SOAP11ENV_PREFIX); -QName Faultcode::SERVER(SOAP11ENV_NS,_SERVER,SOAP11ENV_PREFIX); -QName Faultcode::MUSTUNDERSTAND(SOAP11ENV_NS,_MUSTUNDERSTAND,SOAP11ENV_PREFIX); -QName Faultcode::VERSIONMISMATCH(SOAP11ENV_NS,_VERSIONMISMATCH,SOAP11ENV_PREFIX); +static const XMLCh _CLIENT[] = UNICODE_LITERAL_6(C,l,i,e,n,t); +static const XMLCh _SERVER[] = UNICODE_LITERAL_6(S,e,r,v,e,r); +static const XMLCh _MUSTUNDERSTAND[] = UNICODE_LITERAL_14(M,u,s,t,U,n,d,e,r,s,t,a,n,d); +static const XMLCh _VERSIONMISMATCH[] = UNICODE_LITERAL_15(V,e,r,s,i,o,n,M,i,s,m,a,t,c,h); + +QName Faultcode::CLIENT(SOAP11ENV_NS,_CLIENT,SOAP11ENV_PREFIX); +QName Faultcode::SERVER(SOAP11ENV_NS,_SERVER,SOAP11ENV_PREFIX); +QName Faultcode::MUSTUNDERSTAND(SOAP11ENV_NS,_MUSTUNDERSTAND,SOAP11ENV_PREFIX); +QName Faultcode::VERSIONMISMATCH(SOAP11ENV_NS,_VERSIONMISMATCH,SOAP11ENV_PREFIX);