Qore SoapClient Module Reference 0.5
Loading...
Searching...
No Matches
SoapClient.qm.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
4/* SoapClient.qm Copyright (C) 2012 - 2023 Qore Technologies, s.r.o.
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
28// do not use $ for vars
29
30// do not ignore argument errors
31
32// require type declarations
33
34// enable all warnings
35
36
150namespace SoapClient {
152 const Version = "1.0.1";
153
155 const Headers = {"User-Agent": ("Qore-Soap-Client/" + SoapClient::Version)};
156
158 const HTTPOptions = keys HttpConnection::ConnectionScheme.options;
159
161 private {
162 // web service definition
163 WSDL::WebService wsdl;
164 // service name
165 string svc;
166 string port;
167 string binding;
168 *string url_path;
169
170 *code logc;
171 *code dbglogc;
172
173 // send content encoding hash
174 *hash<auto> seh;
175 }
177
178 public {
180 string url;
183
185
191 const EncodingSupport = ...;
192
193
196 }
197
199
212 constructor(hash<auto> h) ;
213
214
216
235 hash<auto> getMsg(string operation, auto args, *hash<auto> soap_header, reference<auto> op, *hash<auto> http_header, *int xml_opts, *string soapaction);
236
237
239
271 auto callOperation(string operation, auto args, *hash<auto> opts, *reference info);
272
273
275
293 auto call(string operation, auto args, *hash<auto> soap_header, *hash<auto> http_header, *string binding);
294
295
297
324 auto call(string operation, auto args, *reference info, *string binding);
325
326
328
356 auto call(reference info, string operation, auto args, *hash<auto> soap_header, *hash<auto> http_header);
357
358
360private:
361 auto makeCallIntern(*reference info, string operation, auto args, *hash<auto> opts);
362public:
363
364
366
378 auto methodGate(string op);
379
380
382 hash<auto> getType(string type, auto v);
383
384
386 WSDL::WebService getWebService();
387
388
390
396 hash<auto> getInfo();
397
398
400
415 setSendEncoding(string enc = 'auto');
416
417
419
434 setContentEncoding(string enc = 'auto');
435
436
438
452 addDefaultHeaders(hash<auto> h);
453
454
456
469 hash<auto> getDefaultHeaders();
470
471
473
487
488
490 log(string msg);
491
492
494 dbglog(string msg);
495
511protected:
512 nothing msglog(hash<auto> msg);
513public:
514
515}
516
518
534class SoapConnection : public HttpBasedConnection {
535
536public:
537 hash<auto> real_opts;
538
540 const ConnectionScheme = ...;
541
542
544
552 constructor(string name, string description, string url, hash<auto> attributes = {}, hash<auto> options = {})
553 ;
554
555
557
574 constructor(hash<auto> config, *hash<auto> attr) ;
575
576
578 string getType();
579
580
582
586 *hash<auto> getRuntimeOptions();
587
588
590
594 DataProvider::AbstractDataProvider getDataProvider();
595
596
598
603
604
606
612
613
615protected:
617public:
618
619
621protected:
623public:
624
625
627
634protected:
635 SoapClient getImpl(bool connect = True, *hash<auto> rtopts);
636public:
637
638
640protected:
641 hash<ConnectionSchemeInfo> getConnectionSchemeInfoImpl();
642public:
643
644};
645}
class for SOAP connections; returns an object of class SoapClient for connecting to SOAP servers
Definition SoapClient.qm.dox.h:534
bool hasDataProvider()
returns True as this connection returns a data provider with the getDataProvider() method
*hash< auto > getRuntimeOptions()
returns runtime options
SoapClient getImpl(bool connect=True, *hash< auto > rtopts)
returns a SoapClient object
bool supportsPollingApi()
returns False
soapSetup()
Common constructor initialization.
DataProvider::AbstractDataProvider getDataProvider()
returns a data provider object for this connection
string getType()
returns "soap"
constructor(hash< auto > config, *hash< auto > attr)
Creates the SoapConnection object.
setChildCapabilities()
Set child capabilities.
hash< ConnectionSchemeInfo > getConnectionSchemeInfoImpl()
Returns the ConnectionSchemeInfo hash for this object.
const ConnectionScheme
Connection entry info.
Definition SoapClient.qm.dox.h:540
constructor(string name, string description, string url, hash< auto > attributes={}, hash< auto > options={})
creates the SoapConnection object
main SoapClient namespace
Definition SoapClient.qm.dox.h:150
dbglog(string msg)
sends a log message to the debug log closure or call reference, if any
*string getSendEncoding()
returns the current data content encoding (compression) object or nothing if no encoding option is se...
hash< auto > getType(string type, auto v)
returns a hash that can be used to ensure serialization with the XSD type given as the type argument
addDefaultHeaders(hash< auto > h)
adds default headers to each request; these headers will be sent in all requests but can be overridde...
hash< auto > getDefaultHeaders()
returns the hash of default headers to sent in all requests
constructor(hash< auto > h)
creates the object based on a WSDL which is parsed to a WebService object which provides the basis fo...
const HTTPOptions
option keys passed to the HTTPClient constructor
Definition SoapClient.qm.dox.h:158
setContentEncoding(string enc='auto')
sets the request and desired response encoding for the object; see EncodingSupport for valid options
auto callOperation(string operation, auto args, *hash< auto > opts, *reference info)
makes a server call with the given operation, arguments, options, and optional info hash reference an...
const CompressionThreshold
default threadhold for data compressions; transfers smaller than this size will not be compressed
Definition SoapClient.qm.dox.h:195
hash< auto > getInfo()
returns a hash of information about the current WSDL
const Headers
default HTTP headers
Definition SoapClient.qm.dox.h:155
hash< auto > getMsg(string operation, auto args, *hash< auto > soap_header, reference< auto > op, *hash< auto > http_header, *int xml_opts, *string soapaction)
returns a hash representing the serialized SOAP request for a given WSOperation
hash headers
HTTP headers to use.
Definition SoapClient.qm.dox.h:182
setSendEncoding(string enc='auto')
change the data content encoding (compression) option for the object; see EncodingSupport for valid o...
const Version
SOAP client class implementation, publically inherits qore's HTTPClient class public class SoapClient...
Definition SoapClient.qm.dox.h:152
auto methodGate(string op)
uses SoapClient::call() to transparently serialize the argument and make a call to the given operatio...
log(string msg)
sends a log message to the log closure or call reference, if any
nothing msglog(hash< auto > msg)
auto makeCallIntern(*reference info, string operation, auto args, *hash< auto > opts)
makes the call to the SOAP server and ensures that SOAP fault responses returned with a 500-series st...
WSDL::WebService getWebService()
returns the WSDL::WebService object associated with this object
auto call(string operation, auto args, *hash< auto > soap_header, *hash< auto > http_header, *string binding)
makes a server call with the given operation and arguments and returns the deserialized result
const EncodingSupport
Send content encoding options.
Definition SoapClient.qm.dox.h:191