Multi-line svn commit, see body.
[shibboleth/cpp-xmltooling.git] / xmltooling / soap / SOAP.h
1 /*
2  *  Copyright 2001-2006 Internet2
3  * 
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
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 /**
18  * @file xmltooling/soap/SOAP.h
19  * 
20  * XMLObjects representing SOAP content
21  */
22
23 #ifndef __xmltooling_soap_h__
24 #define __xmltooling_soap_h__
25
26 #include <xmltooling/AttributeExtensibleXMLObject.h>
27 #include <xmltooling/ElementProxy.h>
28 #include <xmltooling/XMLObjectBuilder.h>
29 #include <xmltooling/util/XMLConstants.h>
30 #include <xercesc/util/XMLUniDefs.hpp>
31
32 #define DECL_SOAP11OBJECTBUILDER(cname) \
33     DECL_XMLOBJECTBUILDER(XMLTOOL_API,cname,xmltooling::XMLConstants::SOAP11ENV_NS,xmltooling::XMLConstants::SOAP11ENV_PREFIX)
34
35 /**
36  * @namespace soap11
37  * Namespace for SOAP 1.1 schema objects
38  */
39 namespace soap11 {
40
41     DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,Faultstring,String,SOAP 1.1 faultstring element);
42     DECL_XMLOBJECT_SIMPLE(XMLTOOL_API,Faultactor,Actor,SOAP 1.1 faultactor element);
43
44     BEGIN_XMLOBJECT(XMLTOOL_API,Faultcode,xmltooling::XMLObject,SOAP 1.1 faultcode element);
45         /** Gets the QName content of the element. */
46         virtual xmltooling::QName* getCode() const=0;
47         /** Sets the QName content of the element. */
48         virtual void setCode(const xmltooling::QName* qname)=0;
49     END_XMLOBJECT;
50
51     BEGIN_XMLOBJECT2(XMLTOOL_API,Detail,xmltooling::ElementProxy,xmltooling::AttributeExtensibleXMLObject,SOAP 1.1 detail element);
52         /** detail (type) local name */
53         static const XMLCh TYPE_NAME[];
54     END_XMLOBJECT;
55
56     BEGIN_XMLOBJECT(XMLTOOL_API,Fault,xmltooling::XMLObject,SOAP 1.1 Fault element);
57         DECL_TYPED_CHILD(Faultcode);
58         DECL_TYPED_CHILD(Faultstring);
59         DECL_TYPED_CHILD(Faultactor);
60         DECL_TYPED_CHILD(Detail);
61         /** Fault (type) local name */
62         static const XMLCh TYPE_NAME[];
63     END_XMLOBJECT;
64
65     BEGIN_XMLOBJECT2(XMLTOOL_API,Body,xmltooling::ElementProxy,xmltooling::AttributeExtensibleXMLObject,SOAP 1.1 Body element);
66         DECL_STRING_ATTRIB(EncodingStyle,ENCODINGSTYLE);
67         /** Body (type) local name */
68         static const XMLCh TYPE_NAME[];
69     END_XMLOBJECT;
70
71     BEGIN_XMLOBJECT2(XMLTOOL_API,Header,xmltooling::ElementProxy,xmltooling::AttributeExtensibleXMLObject,SOAP 1.1 Header element);
72         DECL_BOOLEAN_ATTRIB(MustUnderstand,MUSTUNDERSTAND,false);
73         DECL_STRING_ATTRIB(Actor,ACTOR);
74         /** Header (type) local name */
75         static const XMLCh TYPE_NAME[];
76     END_XMLOBJECT;
77
78     BEGIN_XMLOBJECT(XMLTOOL_API,Envelope,xmltooling::AttributeExtensibleXMLObject,SOAP 1.1 Envelope element);
79         DECL_TYPED_CHILD(Header);
80         DECL_TYPED_CHILD(Body);
81         /** Envelope (type) local name */
82         static const XMLCh TYPE_NAME[];
83     END_XMLOBJECT;
84
85     DECL_SOAP11OBJECTBUILDER(Body);
86     DECL_SOAP11OBJECTBUILDER(Detail);
87     DECL_SOAP11OBJECTBUILDER(Envelope);
88     DECL_SOAP11OBJECTBUILDER(Fault);
89     DECL_SOAP11OBJECTBUILDER(Faultactor);
90     DECL_SOAP11OBJECTBUILDER(Faultcode);
91     DECL_SOAP11OBJECTBUILDER(Faultstring);
92     DECL_SOAP11OBJECTBUILDER(Header);
93
94     /**
95      * Registers builders and validators for SOAP 1.1 classes into the runtime.
96      */
97     void XMLTOOL_API registerSOAPClasses();
98 };
99
100 #endif /* __xmltooling_soap_h__ */