From: Scott Cantor Date: Sat, 26 May 2007 19:27:36 +0000 (+0000) Subject: Add SOAP fault codes. X-Git-Tag: 1.0-alpha1~10 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-xmltooling.git;a=commitdiff_plain;h=321e474353b0c77c8c6b9bcd3ac351c824890e3e Add SOAP fault codes. --- diff --git a/xmltooling/soap/SOAP.h b/xmltooling/soap/SOAP.h index b84c9f1..8ef5de0 100644 --- a/xmltooling/soap/SOAP.h +++ b/xmltooling/soap/SOAP.h @@ -50,6 +50,14 @@ namespace soap11 { virtual const xmltooling::QName* getCode() const=0; /** Sets the QName content of the element. */ virtual void setCode(const xmltooling::QName* qname)=0; + /** Client Fault code. **/ + static xmltooling::QName CLIENT; + /** Server Fault code. **/ + static xmltooling::QName SERVER; + /** MustUnderstand Fault code. **/ + static xmltooling::QName MUSTUNDERSTAND; + /** Version Mismatch Fault code. **/ + static xmltooling::QName VERSIONMISMATCH; END_XMLOBJECT; BEGIN_XMLOBJECT(XMLTOOL_API,Detail,xmltooling::ElementProxy,SOAP 1.1 detail element); diff --git a/xmltooling/soap/impl/SOAPImpl.cpp b/xmltooling/soap/impl/SOAPImpl.cpp index 2b33a47..57c7fde 100644 --- a/xmltooling/soap/impl/SOAPImpl.cpp +++ b/xmltooling/soap/impl/SOAPImpl.cpp @@ -36,6 +36,7 @@ using namespace soap11; using namespace xmltooling; using namespace std; using xmlconstants::SOAP11ENV_NS; +using xmlconstants::SOAP11ENV_PREFIX; #if defined (_MSC_VER) #pragma warning( push ) @@ -409,3 +410,13 @@ const XMLCh Header::LOCAL_NAME[] = UNICODE_LITERAL_6(H,e,a, const XMLCh Header::TYPE_NAME[] = UNICODE_LITERAL_6(H,e,a,d,e,r); 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);