Qore SalesforceSoapClient Module Reference  1.4
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 - 2022 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 }
28 
98 
105 
106 public:
107 protected:
108  // mutex for atomic operations
109  Mutex lck();
110  // logged in flag
111  bool logged_in = False;
112 
113  // Salesforce.com username
114  string username;
115  // Salesforce.com user password
116  string password;
117  // Salesforce.com user token
118  string token;
119 
120  // Salesforce.com server URL
121  string serverurl;
122  // Salesforce.com session ID
123  string sessionid;
124 
125  // default SoapAction value
126  string soapaction = "default";
127 
128  // perform a logout when destroying the object
131  bool force_logout = False;
132 
133 public:
134 
136  const AuthorizationHash = ...;
137 
138 
140  const AuthorizationOpts = AuthorizationHash.keys();
141 
143  const RequiredOpts = ...;
144 
145 
147 
153  constructor(hash<auto> opts) ;
154 
155 
157 
160 
161 
163 protected:
164  processOpts(hash<auto> opts);
165 public:
166 
167 
169  login();
170 
171 
174 
175 
178 
179 
181 
209  auto callOperation(string operation, auto args, *hash<auto> opts, *reference<auto> info);
210 
211 
213 
241 protected:
242  auto callIntern(string operation, auto args, *hash<auto> opts, *reference<auto> info);
243 public:
244 
245 
247 
253  auto call(string operation, auto args, *hash<auto> header);
254 
255 
257 
273  auto call(string operation, auto args, reference<auto> info);
274 
275 
277 
294  auto call(reference<auto> info, string operation, auto args, *hash<auto> header);
295 
296 
297  nothing setWarningQueue(int warning_ms, int warning_bs, Queue queue, auto arg, timeout min_ms = 1s);
298 
299 
300  nothing clearWarningQueue();
301 
302 
304 
309  auto methodGate(string op, auto arg);
310 
311 
312 protected:
313  logoutIntern();
314 public:
315 
316 
317  // must be called with the lock held
318 protected:
319  loginIntern();
320 public:
321 
322 };
323 
325 
344 class SalesforceSoapConnection : public SoapConnection {
345 
346 public:
348  const ConnectionScheme = ...;
349 
350 
351 protected:
353  hash cache;
354 
355 public:
356 
358 
368  constructor(string name, string description, string url, hash<auto> attributes = {}, hash<auto> options = {})
369  ;
370 
371 
373  string getType();
374 
375 
377 
381  *hash<auto> getRuntimeOptions();
382 
383 
385 
392 protected:
393  SalesforceSoapClient getImpl(bool connect = True, *hash<auto> rtopts);
394 public:
395 
396 
398 
402 protected:
404 public:
405 
406 
408 protected:
409  synchronized WSDL::WebService getWsdlFromCache(string path);
410 public:
411 
412 
414 protected:
416 public:
417 
418 
420 protected:
421  hash<ConnectionSchemeInfo> getConnectionSchemeInfoImpl();
422 public:
423 
424 };
425 };
logout()
performs a manual logout to Salesforce.com
auto call(reference< auto > info, string operation, auto args, *hash< auto > header)
makes a server call with the given operation and arguments and returns the deserialized result with a...
auto callIntern(string operation, auto args, *hash< auto > opts, *reference< auto > info)
makes the internal call and returns the deserialized response
auto callOperation(string operation, auto args, *hash< auto > opts, *reference< auto > info)
makes a server call with the given operation, arguments, options, and optional info hash reference an...
processOpts(hash< auto > opts)
processes options given in the constructor()
constructor(hash< auto > opts)
creates the object with the given options
disconnect()
disconnects from Salesforce.com; if the force_logout option was given in the constructor(),...
login()
performs a manual login to Salesforce.com
auto call(string operation, auto args, reference< auto > info)
makes a server call with the given operation and arguments and returns the deserialized result
auto methodGate(string op, auto arg)
uses call() to transparently serialize the argument and make a call to the given operation and return...
auto call(string operation, auto args, *hash< auto > header)
makes a server call with the given operation and arguments and returns the deserialized result
class for SOAP connections to the Salesforce.com SOAP API; returns an object of class SalesforceSoapC...
Definition: SalesforceSoapClient.qm.dox.h:344
WSDL::WebService getWsdl(string url)
returns a WSDL::WebService object for the given URL using a cache for local files
synchronized WSDL::WebService getWsdlFromCache(string path)
returns a WSDL::WebService object for the given path from the cache if possible, otherwise creates th...
hash cache
cache of WebService objects keyed by file location
Definition: SalesforceSoapClient.qm.dox.h:353
*hash< auto > getRuntimeOptions()
returns runtime options
constructor(string name, string description, string url, hash< auto > attributes={}, hash< auto > options={})
creates the SalesforceSoapConnection object
SalesforceSoapClient getImpl(bool connect=True, *hash< auto > rtopts)
returns a SalesforceSoapClient object
const ConnectionScheme
Connection entry info.
Definition: SalesforceSoapClient.qm.dox.h:348
WSDL::WebService getWebService(string url)
returns a WSDL::WebService object from the given URL
hash< ConnectionSchemeInfo > getConnectionSchemeInfoImpl()
Returns the ConnectionSchemeInfo hash for this object.
main SalesforceSoapClient module namespace
Definition: SalesforceSoapClient.qm.dox.h:96