2 * Copyright 2001-2007 Internet2
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * @file xmltooling/soap/SOAP.h
20 * XMLObjects representing SOAP content
23 #ifndef __xmltooling_soap_h__
24 #define __xmltooling_soap_h__
26 #include <xmltooling/ElementProxy.h>
27 #include <xmltooling/XMLObjectBuilder.h>
28 #include <xmltooling/util/XMLConstants.h>
29 #include <xercesc/util/XMLUniDefs.hpp>
32 * Macro for declaring SOAP builders.
34 * @param cname name of class being built
36 #define DECL_SOAP11OBJECTBUILDER(cname) \
37 DECL_XMLOBJECTBUILDER(XMLTOOL_API,cname,xmlconstants::SOAP11ENV_NS,xmlconstants::SOAP11ENV_PREFIX)
41 * Namespace for SOAP 1.1 schema objects
45 DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,Faultstring,String,SOAP 1.1 faultstring element);
46 DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,Faultactor,Actor,SOAP 1.1 faultactor element);
48 BEGIN_XMLOBJECT(XMLTOOL_API,Faultcode,xmltooling::XMLObject,SOAP 1.1 faultcode element);
49 /** Gets the QName content of the element. */
50 virtual const xmltooling::QName* getCode() const=0;
51 /** Sets the QName content of the element. */
52 virtual void setCode(const xmltooling::QName* qname)=0;
55 BEGIN_XMLOBJECT(XMLTOOL_API,Detail,xmltooling::ElementProxy,SOAP 1.1 detail element);
56 /** detail (type) local name */
57 static const XMLCh TYPE_NAME[];
60 BEGIN_XMLOBJECT(XMLTOOL_API,Fault,xmltooling::XMLObject,SOAP 1.1 Fault element);
61 DECL_TYPED_CHILD(Faultcode);
62 DECL_TYPED_CHILD(Faultstring);
63 DECL_TYPED_CHILD(Faultactor);
64 DECL_TYPED_CHILD(Detail);
65 /** Fault (type) local name */
66 static const XMLCh TYPE_NAME[];
69 BEGIN_XMLOBJECT(XMLTOOL_API,Body,xmltooling::ElementProxy,SOAP 1.1 Body element);
70 DECL_STRING_ATTRIB(EncodingStyle,ENCODINGSTYLE);
71 /** Body (type) local name */
72 static const XMLCh TYPE_NAME[];
75 BEGIN_XMLOBJECT(XMLTOOL_API,Header,xmltooling::ElementProxy,SOAP 1.1 Header element);
76 DECL_BOOLEAN_ATTRIB(MustUnderstand,MUSTUNDERSTAND,false);
77 DECL_STRING_ATTRIB(Actor,ACTOR);
78 /** Header (type) local name */
79 static const XMLCh TYPE_NAME[];
82 BEGIN_XMLOBJECT(XMLTOOL_API,Envelope,xmltooling::AttributeExtensibleXMLObject,SOAP 1.1 Envelope element);
83 DECL_TYPED_CHILD(Header);
84 DECL_TYPED_CHILD(Body);
85 /** Envelope (type) local name */
86 static const XMLCh TYPE_NAME[];
89 DECL_SOAP11OBJECTBUILDER(Body);
90 DECL_SOAP11OBJECTBUILDER(Detail);
91 DECL_SOAP11OBJECTBUILDER(Envelope);
92 DECL_SOAP11OBJECTBUILDER(Fault);
93 DECL_SOAP11OBJECTBUILDER(Faultactor);
94 DECL_SOAP11OBJECTBUILDER(Faultcode);
95 DECL_SOAP11OBJECTBUILDER(Faultstring);
96 DECL_SOAP11OBJECTBUILDER(Header);
99 * Registers builders and validators for SOAP 1.1 classes into the runtime.
101 void XMLTOOL_API registerSOAPClasses();
104 #endif /* __xmltooling_soap_h__ */