Qore SalesforceSoapClient Module Reference 1.4
Loading...
Searching...
No Matches
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 - 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
26
27
28
98
104class SalesforceSoapClient : public SoapClient::SoapClient {
105
106public:
107protected:
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
133public:
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
163protected:
164 processOpts(hash<auto> opts);
165public:
166
167
170
171
174
175
178
179
181
209 auto callOperation(string operation, auto args, *hash<auto> opts, *reference<auto> info);
210
211
213
241protected:
242 auto callIntern(string operation, auto args, *hash<auto> opts, *reference<auto> info);
243public:
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
312protected:
313 logoutIntern();
314public:
315
316
317 // must be called with the lock held
318protected:
319 loginIntern();
320public:
321
322};
323
325
344class SalesforceSoapConnection : public SoapConnection {
345
346public:
348 const ConnectionScheme = ...;
349
350
351protected:
353 hash cache;
354
355public:
356
358
368 constructor(string name, string description, string url, hash<auto> attributes = {}, hash<auto> options = {})
369 ;
370
371
373
390 constructor(hash<auto> config, *hash<auto> attr) ;
391
392
394protected:
396public:
397
398
400 string getType();
401
402
404
408 *hash<auto> getRuntimeOptions();
409
410
412
418
419
421
428protected:
429 SalesforceSoapClient getImpl(bool connect = True, *hash<auto> rtopts);
430public:
431
432
434
438protected:
439 WSDL::WebService getWsdl(string url);
440public:
441
442
444protected:
445 synchronized WSDL::WebService getWsdlFromCache(string path);
446public:
447
448
450protected:
451 WSDL::WebService getWebService(string url);
452public:
453
454
456protected:
457 hash<ConnectionSchemeInfo> getConnectionSchemeInfoImpl();
458public:
459
460};
461};
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
checkOpts()
Ensures that required options are set.
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
constructor(hash< auto > config, *hash< auto > attr)
Creates the SalesforceSoapConnection object.
hash< ConnectionSchemeInfo > getConnectionSchemeInfoImpl()
Returns the ConnectionSchemeInfo hash for this object.
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< auto > getRuntimeOptions()
returns runtime options
main SalesforceSoapClient module namespace
Definition SalesforceSoapClient.qm.dox.h:96