/
soapClient.cpp
220 lines (210 loc) · 7.22 KB
/
soapClient.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
/* soapClient.cpp
Generated by gSOAP 2.8.11 from service.h
Copyright(C) 2000-2012, Robert van Engelen, Genivia Inc. All Rights Reserved.
The generated code is released under one of the following licenses:
1) GPL or 2) Genivia's license for commercial use.
This program is released under the GPL with the additional exemption that
compiling, linking, and/or using OpenSSL is allowed.
*/
#if defined(__BORLANDC__)
#pragma option push -w-8060
#pragma option push -w-8004
#endif
#include "soapH.h"
SOAP_SOURCE_STAMP("@(#) soapClient.cpp ver 2.8.11 2012-11-29 16:51:33 GMT")
SOAP_FMAC5 int SOAP_FMAC6 soap_call_ns__add(struct soap *soap, const char *soap_endpoint, const char *soap_action, float entry, char *&rresult)
{ struct ns__add soap_tmp_ns__add;
struct ns__addResponse *soap_tmp_ns__addResponse;
soap->encodingStyle = "";
soap_tmp_ns__add.entry = entry;
soap_begin(soap);
soap_serializeheader(soap);
soap_serialize_ns__add(soap, &soap_tmp_ns__add);
if (soap_begin_count(soap))
return soap->error;
if (soap->mode & SOAP_IO_LENGTH)
{ if (soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put_ns__add(soap, &soap_tmp_ns__add, "ns:add", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap))
return soap->error;
}
if (soap_end_count(soap))
return soap->error;
if (soap_connect(soap, soap_endpoint, soap_action)
|| soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put_ns__add(soap, &soap_tmp_ns__add, "ns:add", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap)
|| soap_end_send(soap))
return soap_closesock(soap);
rresult = NULL;
if (soap_begin_recv(soap)
|| soap_envelope_begin_in(soap)
|| soap_recv_header(soap)
|| soap_body_begin_in(soap))
return soap_closesock(soap);
if (soap_recv_fault(soap, 1))
return soap->error;
soap_tmp_ns__addResponse = soap_get_ns__addResponse(soap, NULL, "", "");
if (soap->error)
return soap_recv_fault(soap, 0);
if (soap_body_end_in(soap)
|| soap_envelope_end_in(soap)
|| soap_end_recv(soap))
return soap_closesock(soap);
rresult = soap_tmp_ns__addResponse->rresult;
return soap_closesock(soap);
}
SOAP_FMAC5 int SOAP_FMAC6 soap_call_ns__remove(struct soap *soap, const char *soap_endpoint, const char *soap_action, float entry, char *&rresult)
{ struct ns__remove soap_tmp_ns__remove;
struct ns__removeResponse *soap_tmp_ns__removeResponse;
soap->encodingStyle = "";
soap_tmp_ns__remove.entry = entry;
soap_begin(soap);
soap_serializeheader(soap);
soap_serialize_ns__remove(soap, &soap_tmp_ns__remove);
if (soap_begin_count(soap))
return soap->error;
if (soap->mode & SOAP_IO_LENGTH)
{ if (soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put_ns__remove(soap, &soap_tmp_ns__remove, "ns:remove", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap))
return soap->error;
}
if (soap_end_count(soap))
return soap->error;
if (soap_connect(soap, soap_endpoint, soap_action)
|| soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put_ns__remove(soap, &soap_tmp_ns__remove, "ns:remove", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap)
|| soap_end_send(soap))
return soap_closesock(soap);
rresult = NULL;
if (soap_begin_recv(soap)
|| soap_envelope_begin_in(soap)
|| soap_recv_header(soap)
|| soap_body_begin_in(soap))
return soap_closesock(soap);
if (soap_recv_fault(soap, 1))
return soap->error;
soap_tmp_ns__removeResponse = soap_get_ns__removeResponse(soap, NULL, "", "");
if (soap->error)
return soap_recv_fault(soap, 0);
if (soap_body_end_in(soap)
|| soap_envelope_end_in(soap)
|| soap_end_recv(soap))
return soap_closesock(soap);
rresult = soap_tmp_ns__removeResponse->rresult;
return soap_closesock(soap);
}
SOAP_FMAC5 int SOAP_FMAC6 soap_call_ns__init(struct soap *soap, const char *soap_endpoint, const char *soap_action, float balance, char *&rresult)
{ struct ns__init soap_tmp_ns__init;
struct ns__initResponse *soap_tmp_ns__initResponse;
soap->encodingStyle = "";
soap_tmp_ns__init.balance = balance;
soap_begin(soap);
soap_serializeheader(soap);
soap_serialize_ns__init(soap, &soap_tmp_ns__init);
if (soap_begin_count(soap))
return soap->error;
if (soap->mode & SOAP_IO_LENGTH)
{ if (soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put_ns__init(soap, &soap_tmp_ns__init, "ns:init", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap))
return soap->error;
}
if (soap_end_count(soap))
return soap->error;
if (soap_connect(soap, soap_endpoint, soap_action)
|| soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put_ns__init(soap, &soap_tmp_ns__init, "ns:init", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap)
|| soap_end_send(soap))
return soap_closesock(soap);
rresult = NULL;
if (soap_begin_recv(soap)
|| soap_envelope_begin_in(soap)
|| soap_recv_header(soap)
|| soap_body_begin_in(soap))
return soap_closesock(soap);
if (soap_recv_fault(soap, 1))
return soap->error;
soap_tmp_ns__initResponse = soap_get_ns__initResponse(soap, NULL, "", "");
if (soap->error)
return soap_recv_fault(soap, 0);
if (soap_body_end_in(soap)
|| soap_envelope_end_in(soap)
|| soap_end_recv(soap))
return soap_closesock(soap);
rresult = soap_tmp_ns__initResponse->rresult;
return soap_closesock(soap);
}
SOAP_FMAC5 int SOAP_FMAC6 soap_call_ns__getbalance(struct soap *soap, const char *soap_endpoint, const char *soap_action, char *&rresult)
{ struct ns__getbalance soap_tmp_ns__getbalance;
struct ns__getbalanceResponse *soap_tmp_ns__getbalanceResponse;
soap->encodingStyle = "";
soap_begin(soap);
soap_serializeheader(soap);
soap_serialize_ns__getbalance(soap, &soap_tmp_ns__getbalance);
if (soap_begin_count(soap))
return soap->error;
if (soap->mode & SOAP_IO_LENGTH)
{ if (soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put_ns__getbalance(soap, &soap_tmp_ns__getbalance, "ns:getbalance", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap))
return soap->error;
}
if (soap_end_count(soap))
return soap->error;
if (soap_connect(soap, soap_endpoint, soap_action)
|| soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put_ns__getbalance(soap, &soap_tmp_ns__getbalance, "ns:getbalance", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap)
|| soap_end_send(soap))
return soap_closesock(soap);
rresult = NULL;
if (soap_begin_recv(soap)
|| soap_envelope_begin_in(soap)
|| soap_recv_header(soap)
|| soap_body_begin_in(soap))
return soap_closesock(soap);
if (soap_recv_fault(soap, 1))
return soap->error;
soap_tmp_ns__getbalanceResponse = soap_get_ns__getbalanceResponse(soap, NULL, "", "");
if (soap->error)
return soap_recv_fault(soap, 0);
if (soap_body_end_in(soap)
|| soap_envelope_end_in(soap)
|| soap_end_recv(soap))
return soap_closesock(soap);
rresult = soap_tmp_ns__getbalanceResponse->rresult;
return soap_closesock(soap);
}
#if defined(__BORLANDC__)
#pragma option pop
#pragma option pop
#endif
/* End of soapClient.cpp */