service.h

00001 /*
00002 
00003 service.h
00004 
00005 WSDL parser and converter to gSOAP header file format
00006 
00007 --------------------------------------------------------------------------------
00008 gSOAP XML Web services tools
00009 Copyright (C) 2004, Robert van Engelen, Genivia, Inc. All Rights Reserved.
00010 
00011 This program is free software; you can redistribute it and/or modify it under
00012 the terms of the GNU General Public License as published by the Free Software
00013 Foundation; either version 2 of the License, or (at your option) any later
00014 version.
00015 
00016 This program is distributed in the hope that it will be useful, but WITHOUT ANY
00017 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
00018 PARTICULAR PURPOSE. See the GNU General Public License for more details.
00019 
00020 You should have received a copy of the GNU General Public License along with
00021 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
00022 Place, Suite 330, Boston, MA 02111-1307 USA
00023 
00024 Author contact information:
00025 engelen@genivia.com / engelen@acm.org
00026 --------------------------------------------------------------------------------
00027 
00028 */
00029 
00030 #ifndef SERVICE_H
00031 #define SERVICE_H
00032 
00033 #include "includes.h"
00034 #include "wsdlH.h"
00035 
00036 class Message
00037 { public:
00038     const char *name;
00039     const char *URI;
00040     soap__useChoice use;
00041     const char *encodingStyle;
00042     wsdl__message *message;
00043     wsdl__part *part;
00044     vector<soap__header> header;
00045     const char *documentation;
00046     const char *ext_documentation;
00047     void generate(Types&, const char *sep, bool anonymous, bool remark);
00048 };
00049 
00050 typedef map<const char*, Message*, ltstr> MapOfStringToMessage;
00051 
00052 class Operation
00053 { public:
00054     const char *prefix;
00055     const char *URI;
00056     const char *name;
00057     soap__styleChoice style;
00058     const char *parameterOrder;
00059     const char *soapAction;
00060     const char *input_name;
00061     const char *output_name;
00062     Message *input; // name, use, and parts
00063     Message *output; // name, use, and parts
00064     vector<Message*> fault;
00065     const char *documentation;
00066     const char *operation_documentation;
00067     void generate(Types&);
00068 };
00069 
00070 class Service
00071 { public:
00072     const char *prefix;                 // a gSOAP service has a unique namespace
00073     const char *URI;
00074     const char *name;                   // binding name
00075     const char *type;                   // portType
00076     SetOfString location;               // WSDL may specify multiple locations via <Port> -> <Binding>
00077     vector<Operation*> operation;
00078     MapOfStringToMessage header;
00079     MapOfStringToMessage headerfault;
00080     MapOfStringToMessage fault;
00081     MapOfStringToString service_documentation;
00082     MapOfStringToString port_documentation;
00083     MapOfStringToString binding_documentation;
00084     Service();
00085     void generate(Types&);
00086 };
00087 
00088 typedef map<const char*, Service*, ltstr> MapOfStringToService;
00089 
00090 class Definitions
00091 { public:
00092     Types types;                                // to process schema type information
00093     MapOfStringToService services;              // service information gathered
00094     Definitions();
00095     void collect(const wsdl__definitions&);
00096     void compile(const wsdl__definitions&);
00097   private:
00098     void analyze(const wsdl__definitions&);
00099     void generate();
00100 };
00101 
00102 #endif

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