SalesforceSoapClient.qm.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
// @file SalesforceSoapClient.qm Salesforce SOAP Client Definition Module
/* SalesforceSoapClient.qm Copyright (C) 2015 - 2017 Qore Technologies, s.r.o.
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.
*/
namespace SalesforceSoapClient {
class SalesforceSoapClient : public SoapClient::SoapClient {
public:
private :
// mutex for atomic operations
Mutex lck();
// logged in flag
bool logged_in = False;
// Salesforce.com username
string username;
// Salesforce.com user password
string password;
// Salesforce.com user token
string token;
// Salesforce.com server URL
string serverurl;
// Salesforce.com session ID
string sessionid;
// default SoapAction value
string soapaction = "default";
// perform a logout when destroying the object
bool force_logout = False;
public:
public :
const AuthorizationHash = (
"username": True,
"password": True,
"token": True,
);
const AuthorizationOpts = AuthorizationHash.keys();
const RequiredOpts = AuthorizationOpts + (
"wsdl",
);
public:
constructor(hash opts) ;
destructor();
private:
processOpts(hash opts);
public:
login();
logout();
disconnect();
any callOperation(string operation, any args, *hash opts, *reference info);
private:
any callIntern(string operation, any args, *hash opts, *reference info);
public:
any call(string operation, any args, *hash header);
any call(string operation, any args, reference info);
any call(reference info, string operation, any args, *hash header);
nothing setWarningQueue(int warning_ms, int warning_bs, Queue queue, any arg, timeout min_ms = 1s);
nothing clearWarningQueue();
any methodGate(string op, any arg);
private:
logoutIntern();
public:
// must be called with the lock held
private:
loginIntern();
public:
};
class SalesforceSoapConnection : public SoapConnection {
public:
public :
const Options = SoapConnection::Options + SalesforceSoapClient::AuthorizationHash;
public:
private :
hash cache;
public:
constructor(string name, string desc, string url, bool monitor, *hash opts, hash urlh) ;
string getType();
private:
SalesforceSoapClient getImpl(bool connect = True, *hash rtopts);
public:
private:
WSDL::WebService getWsdl(string url);
public:
private:
synchronized WSDL::WebService getWsdlFromCache(string path);
public:
private:
WSDL::WebService getWebService(string url);
public:
hash getOptions();
*hash getRuntimeOptions();
static SalesforceSoapConnection make(string name, string desc, string url, bool monitor, *hash opts, hash urlh);
};
};
SalesforceSoapClient::SalesforceSoapClient::AuthorizationHash
const AuthorizationHash
authorization key required for logging in to Salesforce.com
Definition: SalesforceSoapClient.qm.dox.h:122
SalesforceSoapClient::SalesforceSoapConnection::make
static SalesforceSoapConnection make(string name, string desc, string url, bool monitor, *hash opts, hash urlh)
static constructor
SalesforceSoapClient::SalesforceSoapConnection::getWsdlFromCache
synchronized WSDL::WebService getWsdlFromCache(string path)
returns a WSDL::WebService object for the given path from the cache if possible, otherwise creates th...
SalesforceSoapClient
main SalesforceSoapClient module namespace
Definition: SalesforceSoapClient.qm.dox.h:81
SalesforceSoapClient::SalesforceSoapConnection::cache
hash cache
cache of WebService objects keyed by file location
Definition: SalesforceSoapClient.qm.dox.h:359
SalesforceSoapClient::SalesforceSoapConnection::getImpl
SalesforceSoapClient getImpl(bool connect=True, *hash rtopts)
returns a SalesforceSoapClient object
SalesforceSoapClient::SalesforceSoapConnection::constructor
constructor(string name, string desc, string url, bool monitor, *hash opts, hash urlh)
creates the SoapConnection object
SalesforceSoapClient::SalesforceSoapConnection::getOptions
hash getOptions()
gets options
SalesforceSoapClient::SalesforceSoapConnection::getType
string getType()
returns "sfsoap"
WSDL::WebService
SalesforceSoapClient::SalesforceSoapConnection::getWsdl
WSDL::WebService getWsdl(string url)
returns a WSDL::WebService object for the given URL using a cache for local files ...
SalesforceSoapClient::SalesforceSoapConnection
class for SOAP connections to the Salesforce.com SOAP API; returns an object of class SalesforceSoapC...
Definition: SalesforceSoapClient.qm.dox.h:349
SoapClient::SoapClient
SalesforceSoapClient::SalesforceSoapConnection::getWebService
WSDL::WebService getWebService(string url)
returns a WSDL::WebService object from the given URL
SalesforceSoapClient::SalesforceSoapConnection::getRuntimeOptions
*hash getRuntimeOptions()
returns runtime options