wsdl.h

00001 /*
00002 
00003 wsdl.h
00004 
00005 WSDL 1.1 binding schema interface
00006 
00007 --------------------------------------------------------------------------------
00008 gSOAP XML Web services tools
00009 Copyright (C) 2004, Robert van Engelen, Genivia, Inc. All Rights Reserved.
00010 
00011 GPL license.
00012 
00013 This program is free software; you can redistribute it and/or modify it under
00014 the terms of the GNU General Public License as published by the Free Software
00015 Foundation; either version 2 of the License, or (at your option) any later
00016 version.
00017 
00018 This program is distributed in the hope that it will be useful, but WITHOUT ANY
00019 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
00020 PARTICULAR PURPOSE. See the GNU General Public License for more details.
00021 
00022 You should have received a copy of the GNU General Public License along with
00023 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
00024 Place, Suite 330, Boston, MA 02111-1307 USA
00025 
00026 Author contact information:
00027 engelen@genivia.com / engelen@acm.org
00028 --------------------------------------------------------------------------------
00029 
00030 */
00031 
00032 //gsoap wsdl schema documentation:      WSDL 1.1 binding schema
00033 //gsoap wsdl schema namespace:          http://schemas.xmlsoap.org/wsdl/
00034 
00035 #import "imports.h"
00036 #import "schema.h"
00037 #import "soap.h"
00038 #import "http.h"
00039 #import "gwsdl.h"
00040 
00041 class wsdl__definitions;                // forward declaration
00042 
00043 class wsdl__import
00044 { public:
00045         @xsd__anyURI                    namespace_;
00046         @xsd__anyURI                    location;
00047   private:
00048         wsdl__definitions               *definitionsRef;
00049   public:
00050                                         wsdl__import();
00051                                         ~wsdl__import();
00052         int                             traverse(wsdl__definitions&);
00053         void                            definitionsPtr(wsdl__definitions*);
00054         wsdl__definitions               *definitionsPtr() const;
00055 };
00056 
00057 class wsdl__types
00058 { public:
00059         xsd__string                     documentation;          // <wsdl:documentation>?
00060         std::vector<xs__schema*>        xs__schema_;            // <xs:schema>*
00061   public:
00062         int                             traverse(wsdl__definitions&);
00063 };
00064 
00065 class wsdl__part
00066 { public:
00067         @xsd__NMTOKEN                   name;
00068         @xsd__QName                     element;
00069         @xsd__QName                     type;
00070         xsd__string                     documentation;          // <wsdl:documentation>?
00071   private:
00072         xs__element                     *elementRef;            // traverse() finds element
00073         xs__simpleType                  *simpleTypeRef;         // traverse() finds simpleType
00074         xs__complexType                 *complexTypeRef;        // traverse() finds complexType
00075   public:
00076         int                             traverse(wsdl__definitions&);
00077         void                            elementPtr(xs__element*);
00078         void                            simpleTypePtr(xs__simpleType*);
00079         void                            complexTypePtr(xs__complexType*);
00080         xs__element                     *elementPtr() const;
00081         xs__simpleType                  *simpleTypePtr() const;
00082         xs__complexType                 *complexTypePtr() const;
00083 };
00084 
00085 class wsdl__message
00086 { public:
00087         @xsd__NMTOKEN                   name;
00088         xsd__string                     documentation;          // <wsdl:documentation>?
00089         std::vector<wsdl__part>         part;                   // <wsdl:part>*
00090   public:
00091         int                             traverse(wsdl__definitions&);
00092 };
00093 
00094 class wsdl__input
00095 { public:
00096         @xsd__NMTOKEN                   name;
00097         @xsd__QName                     message;
00098         xsd__string                     documentation;          // <wsdl:documentation>?
00099   private:
00100         wsdl__message                   *messageRef;            // traverse() finds message
00101   public:
00102         int                             traverse(wsdl__definitions&);
00103         void                            messagePtr(wsdl__message*);
00104         wsdl__message                   *messagePtr() const;
00105 };
00106 
00107 class wsdl__output
00108 { public:
00109         @xsd__NMTOKEN                   name;
00110         @xsd__QName                     message;
00111         xsd__string                     documentation;          // <wsdl:documentation>?
00112   private:
00113         wsdl__message                   *messageRef;            // traverse() finds message
00114   public:
00115         int                             traverse(wsdl__definitions&);
00116         void                            messagePtr(wsdl__message*);
00117         wsdl__message                   *messagePtr() const;
00118 };
00119 
00120 class wsdl__fault
00121 { public:
00122         @xsd__NMTOKEN                   name;
00123         @xsd__QName                     message;
00124         xsd__string                     documentation;          // <wsdl:documentation>?
00125   private:
00126         wsdl__message                   *messageRef;            // traverse() finds message
00127   public:
00128         int                             traverse(wsdl__definitions&);
00129         void                            messagePtr(wsdl__message*);
00130         wsdl__message                   *messagePtr() const;
00131 };
00132 
00133 class wsdl__operation
00134 { public:
00135         @xsd__NMTOKEN                   name;
00136         @xsd__string                    parameterOrder;
00137         xsd__string                     documentation;          // <wsdl:documentation>?
00138         wsdl__input                     *input;                 // <wsdl:input>?
00139         wsdl__output                    *output;                // <wsdl:output>?
00140         std::vector<wsdl__fault>        fault;                  // <wsdl:fault>*
00141   public:
00142         int                             traverse(wsdl__definitions&);
00143 };
00144 
00145 class wsdl__portType
00146 { public:
00147         @xsd__NMTOKEN                   name;
00148         xsd__string                     documentation;          // <wsdl:documentation>?
00149         std::vector<wsdl__operation>    operation;              // <wsdl:operation>*
00150   public:
00151         int                             traverse(wsdl__definitions&);
00152 };      
00153 
00154 class wsdl__ext_input                   // extensibility element
00155 { public:
00156         xsd__string                     documentation;          // <wsdl:documentation>?
00157         soap__body                      *soap__body_;           // <soap:body>?
00158         std::vector<soap__header>       soap__header_;          // <soap:header>*
00159   public:
00160         int                             traverse(wsdl__definitions&);
00161 };
00162 
00163 class wsdl__ext_output                  // extensibility element
00164 { public:
00165         xsd__string                     documentation;          // <wsdl:documentation>?
00166         soap__body                      *soap__body_;           // <soap:body>?
00167         std::vector<soap__header>       soap__header_;          // <soap:header>*
00168   public:
00169         int                             traverse(wsdl__definitions&);
00170 };
00171 
00172 class wsdl__ext_fault                   // extensibility element
00173 { public:
00174         @xsd__NMTOKEN                   name;
00175         xsd__string                     documentation;          // <wsdl:documentation>?
00176         soap__fault                     *soap__fault_;          // <soap:fault>?
00177   private:
00178         wsdl__message                   *messageRef;
00179   public:
00180         int                             traverse(wsdl__definitions&);
00181         void                            messagePtr(wsdl__message*);
00182         wsdl__message                   *messagePtr() const;
00183 };
00184 
00185 class wsdl__binding_operation
00186 { public:
00187         @xsd__NMTOKEN                   name;
00188         xsd__string                     documentation;          // <wsdl:documentation>?
00189         soap__operation                 *soap__operation_;      // <soap:operation>?
00190         http__operation                 *http__operation_;      // <http:operation>?
00191         wsdl__ext_input                 *input;                 // <wsdl:input>?
00192         wsdl__ext_output                *output;                // <wsdl:output>?
00193         std::vector<wsdl__ext_fault>    fault;                  // <wsdl:fault>*
00194   private:
00195         wsdl__operation                 *operationRef;          // traverse() finds operation in <wsdl:portType>
00196   public:
00197         int                             traverse(wsdl__definitions&, wsdl__portType*);
00198         void                            operationPtr(wsdl__operation*);
00199         wsdl__operation                 *operationPtr() const;
00200 };
00201 
00202 class wsdl__binding
00203 { public:
00204         @xsd__NMTOKEN                   name;
00205         @xsd__QName                     type;
00206         xsd__string                     documentation;          // <wsdl:documentation>?
00207         soap__binding                   *soap__binding_;        // <soap:binding>?
00208         http__binding                   *http__binding_;        // <http:binding>?
00209         std::vector<wsdl__binding_operation>
00210                                         operation;              // <wsdl:operation>*
00211   private:
00212         wsdl__portType                  *portTypeRef;           // traverse() finds portType
00213   public:
00214         int                             traverse(wsdl__definitions&);
00215         void                            portTypePtr(wsdl__portType*);
00216         wsdl__portType                  *portTypePtr() const;
00217 };
00218 
00219 class wsdl__port
00220 { public:
00221         @xsd__NMTOKEN                   name;
00222         @xsd__QName                     binding;
00223         xsd__string                     documentation;          // <wsdl:documentation>?
00224         soap__address                   *soap__address_;        // <soap:address>?
00225         http__address                   *http__address_;        // <http:address>?
00226   private:
00227         wsdl__binding                   *bindingRef;            // traverse() finds binding
00228   public:
00229         int                             traverse(wsdl__definitions&);
00230         void                            bindingPtr(wsdl__binding*);
00231         wsdl__binding                   *bindingPtr() const;
00232 };
00233 
00234 class wsdl__service
00235 { public:
00236         @xsd__NMTOKEN                   name;
00237         xsd__string                     documentation;          // <wsdl:documentation>?
00238         std::vector<wsdl__port>         port;                   // <wsdl:port>*
00239   public:
00240         int                             traverse(wsdl__definitions&);
00241 };
00242 
00243 class wsdl__definitions
00244 { public:
00245         @xsd__NMTOKEN                   name;
00246         @xsd__anyURI                    targetNamespace         = "";
00247         std::vector<wsdl__import>       import;                 // <wsdl:import>*
00248         xsd__string                     documentation;          // <wsdl:documentation>?
00249         wsdl__types                     *types;                 // <wsdl:types>?
00250         std::vector<wsdl__message>      message;                // <wsdl:message>*
00251         std::vector<wsdl__portType>     portType;               // <wsdl:portType>*
00252         std::vector<wsdl__binding>      binding;                // <wsdl:binding>*
00253         std::vector<wsdl__service>      service;                // <wsdl:service>*
00254         std::vector<gwsdl__portType>    gwsdl__portType_;       // <gwsdl:portType>* For the moment, we will hardcode this which makes it easier to access. WSDL 1.1 does not allow this to be extended this anyway
00255         struct soap                     *soap;
00256   private:
00257         SetOfString                     builtinTypeSet;
00258         SetOfString                     builtinElementSet;
00259         SetOfString                     builtinAttributeSet;
00260   public:
00261                                         wsdl__definitions();
00262                                         wsdl__definitions(struct soap*, const char*);
00263                                         ~wsdl__definitions();
00264         int                             get(struct soap*);      // gSOAP getter is triggered after parsing
00265         int                             traverse();
00266         int                             read(const char*);
00267         int                             error();
00268         void                            print_fault();
00269         void                            builtinType(const char*);
00270         void                            builtinTypes(const SetOfString&);
00271         void                            builtinElement(const char*);
00272         void                            builtinElements(const SetOfString&);
00273         void                            builtinAttribute(const char*);
00274         void                            builtinAttributes(const SetOfString&);
00275         const SetOfString&              builtinTypes() const;
00276         const SetOfString&              builtinElements() const;
00277         const SetOfString&              builtinAttributes() const;
00278         friend ostream&         operator<<(ostream&, const wsdl__definitions&);
00279         friend istream&         operator>>(istream&, wsdl__definitions&);
00280 };
00281 
00282 extern ostream &operator<<(ostream &o, const wsdl__definitions &e);
00283 extern istream &operator>>(istream &i, wsdl__definitions &e);

Generated on Mon Jun 5 10:20:42 2006 for Intelligence.kdevelop by  doxygen 1.4.6