Qore SalesforceSoapClient Module Reference  1.3
SalesforceSoapClient.qm.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
2 // @file SalesforceSoapClient.qm Salesforce SOAP Client Definition Module
3 
4 /* SalesforceSoapClient.qm Copyright (C) 2015 - 2020 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 
26 
27 
90 namespace SalesforceSoapClient {
93 
100 
101 public:
102 protected:
103  // mutex for atomic operations
104  Mutex lck();
105  // logged in flag
106  bool logged_in = False;
107 
108  // Salesforce.com username
109  string username;
110  // Salesforce.com user password
111  string password;
112  // Salesforce.com user token
113  string token;
114 
115  // Salesforce.com server URL
116  string serverurl;
117  // Salesforce.com session ID
118  string sessionid;
119 
120  // default SoapAction value
121  string soapaction = "default";
122 
123  // perform a logout when destroying the object
126  bool force_logout = False;
127 
128 public:
129 
131  const AuthorizationHash = {
132  "username": True,
133  "password": True,
134  "token": True,
135  };
136 
138  const AuthorizationOpts = AuthorizationHash.keys();
139 
141  const RequiredOpts = AuthorizationOpts + (
142  "wsdl",
143  );
144 
146 
152  constructor(hash<auto> opts) ;
153 
154 
156 
158  destructor();
159 
160 
162 protected:
163  processOpts(hash<auto> opts);
164 public:
165 
166 
168  login();
169 
170 
172  logout();
173 
174 
176  disconnect();
177 
178 
180 
208  auto callOperation(string operation, auto args, *hash<auto> opts, *reference<auto> info);
209 
210 
212 
240 protected:
241  auto callIntern(string operation, auto args, *hash<auto> opts, *reference<auto> info);
242 public:
243 
244 
246 
252  auto call(string operation, auto args, *hash<auto> header);
253 
254 
256 
272  auto call(string operation, auto args, reference<auto> info);
273 
274 
276 
293  auto call(reference<auto> info, string operation, auto args, *hash<auto> header);
294 
295 
296  nothing setWarningQueue(int warning_ms, int warning_bs, Queue queue, auto arg, timeout min_ms = 1s);
297 
298 
299  nothing clearWarningQueue();
300 
301 
303 
308  auto methodGate(string op, auto arg);
309 
310 
311 protected:
312  logoutIntern();
313 public:
314 
315 
316  // must be called with the lock held
317 protected:
318  loginIntern();
319 public:
320 
321  };
322 
324 
352 class SalesforceSoapConnection : public SoapConnection {
353 
354 public:
355  const Options = SoapConnection::Options + SalesforceSoapClient::AuthorizationHash;
356 
357 protected:
359  hash cache;
360 
361 public:
362 
364 
375  deprecated
376  constructor(string name, string desc, string url, bool monitor, *hash opts, hash urlh)
377  ;
378 
379 
381 
391  constructor(string name, string description, string url, hash<auto> attributes = {}, hash<auto> options = {})
392  ;
393 
394 
395 private:
396  constructorInit();
397 public:
398 
399 
401  string getType();
402 
403 
405 
412 protected:
413  SalesforceSoapClient getImpl(bool connect = True, *hash<auto> rtopts);
414 public:
415 
416 
418 
422 protected:
423  WSDL::WebService getWsdl(string url);
424 public:
425 
426 
428 protected:
429  synchronized WSDL::WebService getWsdlFromCache(string path);
430 public:
431 
432 
434 protected:
435  WSDL::WebService getWebService(string url);
436 public:
437 
438 
440  hash<auto> getOptions();
441 
442 
444 
448  *hash<auto> getRuntimeOptions();
449 
450 
452 
454  deprecated
455  static SalesforceSoapConnection make(string name, string desc, string url, bool monitor, *hash opts, hash urlh);
456  };
457 };
SalesforceSoapClient::SalesforceSoapConnection::getType
string getType()
returns "sfsoap"
SalesforceSoapClient::SalesforceSoapClient::AuthorizationHash
const AuthorizationHash
authorization key required for logging in to Salesforce.com
Definition: SalesforceSoapClient.qm.dox.h:131
SalesforceSoapClient::SalesforceSoapConnection::getRuntimeOptions
*hash< auto > getRuntimeOptions()
returns runtime options
SalesforceSoapClient::SalesforceSoapConnection::make
static deprecated SalesforceSoapConnection make(string name, string desc, string url, bool monitor, *hash opts, hash urlh)
DEPRECATED: static constructor.
SalesforceSoapClient
main SalesforceSoapClient module namespace
Definition: SalesforceSoapClient.qm.dox.h:91
SoapClient::SoapClient
WSDL::WebService
SalesforceSoapClient::SalesforceSoapConnection
class for SOAP connections to the Salesforce.com SOAP API; returns an object of class SalesforceSoapC...
Definition: SalesforceSoapClient.qm.dox.h:352
SalesforceSoapClient::SalesforceSoapConnection::cache
hash cache
cache of WebService objects keyed by file location
Definition: SalesforceSoapClient.qm.dox.h:359
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::constructor
deprecated constructor(string name, string desc, string url, bool monitor, *hash opts, hash urlh)
DEPRECATED: creates the SalesforceSoapConnection object.
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::SalesforceSoapConnection::getWebService
WSDL::WebService getWebService(string url)
returns a WSDL::WebService object from the given URL
SalesforceSoapClient::SalesforceSoapConnection::getOptions
hash< auto > getOptions()
gets options
SalesforceSoapClient::SalesforceSoapConnection::getImpl
SalesforceSoapClient getImpl(bool connect=True, *hash< auto > rtopts)
returns a SalesforceSoapClient object