Qore SoapClient Module Reference  0.2.4
SoapClient.qm.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3 
4 /* SoapClient.qm Copyright (C) 2012 - 2016 David Nichols
5 
6  Permission is hereby granted, free of charge, to any person obtaining a
7  copy of this software and associated documentation files (the "Software"),
8  to deal in the Software without restriction, including without limitation
9  the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  and/or sell copies of the Software, and to permit persons to whom the
11  Software is furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  DEALINGS IN THE SOFTWARE.
23 */
24 
25 // make sure we have the required qore version
26 
27 // requires XML functionality
28 
29 // requires the WSDL module
30 
31 // need mime definitions
32 
33 // do not use $ for vars
34 
35 
99 namespace SoapClient {
102 class SoapClient : public HTTPClient {
103 
104 public:
106  const Version = "0.2.4";
107 
109  const Headers = ("Accept": (MimeTypeSoapXml + "," + MimeTypeXml + "," + MimeTypeXmlApp), "User-Agent": ("Qore-Soap-Client/" + SoapClient::Version));
110 
112  const HTTPOptions = ("connect_timeout", "http_version", "max_redirects", "proxy", "timeout");
113 
115  private :
116  // web service definition
117  WSDL::WebService wsdl;
118  // service name
119  string svc;
120 
121  *code logc;
122  *code dbglogc;
123 
124  // send content encoding hash
125  *hash seh;
126 
127 public:
129 
130  public :
132  string url;
134  hash headers = Headers;
135 
137 
143  const EncodingSupport = (
144  "gzip": (
145  "ce": "gzip",
146  "func": \gzip(),
147  ),
148  "bzip2": (
149  "ce": "bzip2",
150  "func": \bzip2(),
151  ),
152  "deflate": (
153  "ce": "deflate",
154  "func": \compress(),
155  ),
156  "identity": (
157  "ce": NOTHING,
158  ),
159  );
160 
162  const CompressionThreshold = 1024;
163 
164 public:
165 
167 
180  constructor(hash h);
181 
182 
184 
197  hash getMsg(string operation, any args, *hash header, reference op, *hash nsh);
198 
199 
201 
207  any call(string operation, any args, *hash header, *hash nsh);
208 
209 
211 
217  any call(string operation, any args, *reference info);
218 
219 
221 
228  any call(reference info, string operation, any args, *hash header, *hash nsh);
229 
230 
232  private any makeCallIntern(*reference info, string operation, any args, *hash header, *hash nsh);
233 
234 
236 
241  any methodGate(string op, any arg);
242 
243 
245  hash getType(string type, any v);
246 
247 
249  WSDL::WebService getWebService();
250 
251 
253 
268  setSendEncoding(string enc = "auto");
269 
270 
272 
287  setContentEncoding(string enc = "auto");
288 
289 
291 
305  addDefaultHeaders(hash h);
306 
307 
309 
322  hash getDefaultHeaders();
323 
324 
326 
339  *string getSendEncoding();
340 
341 
343  log(string msg);
344 
345 
347  dbglog(string msg);
348 
349  };
350 };
main SoapClient namespace
Definition: SoapClient.qm.dox.h:100
string url
target URL
Definition: SoapClient.qm.dox.h:132