~vcs-imports/simias/trunk

« back to all changes in this revision

Viewing changes to simias/tools/gsoap/gsoap-linux-2.7/wsdl/service.h

  • Committer: kalidasbala
  • Date: 2007-08-25 12:48:51 UTC
  • Revision ID: vcs-imports@canonical.com-20070825124851-vlfvzun3732ld196
Latest gsoap code update

Show diffs side-by-side

added added

removed removed

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