SoapClient.qm.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
/* SoapClient.qm Copyright (C) 2012 - 2016 David Nichols
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
// make sure we have the required qore version
// requires XML functionality
// requires the WSDL module
// need mime definitions
// do not use $ for vars
namespace SoapClient {
class SoapClient : public HTTPClient {
public:
const Version = "0.2.4";
const Headers = ("Accept": (MimeTypeSoapXml + "," + MimeTypeXml + "," + MimeTypeXmlApp), "User-Agent": ("Qore-Soap-Client/" + SoapClient::Version));
const HTTPOptions = ("connect_timeout", "http_version", "max_redirects", "proxy", "timeout");
private :
// web service definition
WSDL::WebService wsdl;
// service name
string svc;
*code logc;
*code dbglogc;
// send content encoding hash
*hash seh;
public:
public :
string url;
hash headers = Headers;
const EncodingSupport = (
"gzip": (
"ce": "gzip",
"func": \gzip(),
),
"bzip2": (
"ce": "bzip2",
"func": \bzip2(),
),
"deflate": (
"ce": "deflate",
"func": \compress(),
),
"identity": (
"ce": NOTHING,
),
);
const CompressionThreshold = 1024;
public:
constructor(hash h);
hash getMsg(string operation, any args, *hash header, reference op, *hash nsh);
any call(string operation, any args, *hash header, *hash nsh);
any call(string operation, any args, *reference info);
any call(reference info, string operation, any args, *hash header, *hash nsh);
private any makeCallIntern(*reference info, string operation, any args, *hash header, *hash nsh);
any methodGate(string op, any arg);
hash getType(string type, any v);
WSDL::WebService getWebService();
setSendEncoding(string enc = "auto");
setContentEncoding(string enc = "auto");
addDefaultHeaders(hash h);
hash getDefaultHeaders();
*string getSendEncoding();
log(string msg);
dbglog(string msg);
};
};
WSDL::WebService
SoapClient
main SoapClient namespace
Definition: SoapClient.qm.dox.h:100
SoapClient::SoapClient::url
string url
target URL
Definition: SoapClient.qm.dox.h:132