Mercurial > repos > ktnyt > gembassy
comparison GEMBASSY-1.0.3/gsoap/wsdl/service.h @ 0:8300eb051bea draft
Initial upload
author | ktnyt |
---|---|
date | Fri, 26 Jun 2015 05:19:29 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:8300eb051bea |
---|---|
1 /* | |
2 service.h | |
3 | |
4 Service structures | |
5 | |
6 -------------------------------------------------------------------------------- | |
7 gSOAP XML Web services tools | |
8 Copyright (C) 2001-2012, Robert van Engelen, Genivia Inc. All Rights Reserved. | |
9 This software is released under one of the following licenses: | |
10 GPL or Genivia's license for commercial use. | |
11 -------------------------------------------------------------------------------- | |
12 GPL license. | |
13 | |
14 This program is free software; you can redistribute it and/or modify it under | |
15 the terms of the GNU General Public License as published by the Free Software | |
16 Foundation; either version 2 of the License, or (at your option) any later | |
17 version. | |
18 | |
19 This program is distributed in the hope that it will be useful, but WITHOUT ANY | |
20 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A | |
21 PARTICULAR PURPOSE. See the GNU General Public License for more details. | |
22 | |
23 You should have received a copy of the GNU General Public License along with | |
24 this program; if not, write to the Free Software Foundation, Inc., 59 Temple | |
25 Place, Suite 330, Boston, MA 02111-1307 USA | |
26 | |
27 Author contact information: | |
28 engelen@genivia.com / engelen@acm.org | |
29 -------------------------------------------------------------------------------- | |
30 A commercial use license is available from Genivia, Inc., contact@genivia.com | |
31 -------------------------------------------------------------------------------- | |
32 | |
33 */ | |
34 | |
35 #ifndef SERVICE_H | |
36 #define SERVICE_H | |
37 | |
38 #include "includes.h" | |
39 #include "wsdlH.h" | |
40 | |
41 class Message | |
42 { public: | |
43 const char *name; | |
44 const char *URI; | |
45 soap__styleChoice style; | |
46 soap__useChoice use; | |
47 const char *encodingStyle; | |
48 const char *action; | |
49 wsdl__message *message; | |
50 xs__element *element; | |
51 const char *body_parts; | |
52 wsdl__part *part; | |
53 bool mustUnderstand; | |
54 vector<soap__header> header; | |
55 vector<wsoap__header> wheader; | |
56 mime__multipartRelated *multipartRelated; // MIME | |
57 mime__content *content; // REST/MIME | |
58 const char *layout; // DIME | |
59 const char *documentation; | |
60 const char *ext_documentation; | |
61 vector<const wsp__Policy*> policy; | |
62 void generate(Types&, const char *sep, bool anonymous, bool remark, bool response, bool optional); | |
63 }; | |
64 | |
65 typedef map<const char*, Message*, ltstr> MapOfStringToMessage; | |
66 | |
67 class Operation | |
68 { public: | |
69 const char *prefix; | |
70 const char *URI; | |
71 const char *name; | |
72 const char *mep; // WSDL 2.0 | |
73 const char *protocol; | |
74 soap__styleChoice style; | |
75 const char *parameterOrder; | |
76 const char *action; | |
77 const char *input_name; | |
78 const char *output_name; | |
79 Message *input; // name, use, and parts | |
80 Message *output; // name, use, and parts | |
81 vector<Message*> infault; | |
82 vector<Message*> outfault; | |
83 const char *documentation; | |
84 const char *operation_documentation; | |
85 vector<const wsp__Policy*> policy; | |
86 void generate(Types&, Service&); | |
87 }; | |
88 | |
89 class Service | |
90 { public: | |
91 const char *prefix; // a gSOAP service has a unique namespace | |
92 const char *URI; | |
93 const char *name; // binding name | |
94 const char *type; // portType | |
95 const char *transport; // binding transport | |
96 SetOfString location; // WSDL may specify multiple locations via <Port> -> <Binding> | |
97 vector<Operation*> operation; | |
98 MapOfStringToMessage header; | |
99 MapOfStringToMessage headerfault; | |
100 MapOfStringToMessage fault; | |
101 MapOfStringToString service_documentation; | |
102 MapOfStringToString port_documentation; | |
103 MapOfStringToString binding_documentation; | |
104 vector<const wsp__Policy*> policy; | |
105 VectorOfString imports; | |
106 Service(); | |
107 void generate(Types&); | |
108 void add_import(const char*); | |
109 void del_import(const char*); | |
110 }; | |
111 | |
112 typedef map<const char*, Service*, ltstr> MapOfStringToService; | |
113 | |
114 class Definitions | |
115 { public: | |
116 Types types; // to process schema type information | |
117 MapOfStringToService services; // service information gathered | |
118 bool soap12; | |
119 Definitions(); | |
120 void collect(const wsdl__definitions&); | |
121 void compile(const wsdl__definitions&); | |
122 private: | |
123 void analyze(const wsdl__definitions&); | |
124 void analyze_headers(const wsdl__definitions&, Service*, wsdl__ext_ioput*, wsdl__ext_ioput*); | |
125 void analyze_faults(const wsdl__definitions&, Service*, Operation*, vector<wsdl__ext_operation>::const_iterator&); | |
126 Message *analyze_fault(const wsdl__definitions&, Service*, const wsdl__ext_fault&); | |
127 void generate(); | |
128 }; | |
129 | |
130 #endif |