public function SoapClientInterface::trySoap in Salesforce Suite 5.0.x
Same name and namespace in other branches
- 8.4 modules/salesforce_soap/src/Soap/SoapClientInterface.php \Drupal\salesforce_soap\Soap\SoapClientInterface::trySoap()
- 8.3 modules/salesforce_soap/src/Soap/SoapClientInterface.php \Drupal\salesforce_soap\Soap\SoapClientInterface::trySoap()
Salesforce SOAP API resource wrapper.
Ensures the connection is established with the SOAP API prior to making the call and automatically attempts a re-auth when the API responds with invalid session ID / access token.
Parameters
string $function: The name of the SOAP API function to attempt.
array $params: (Optional) An array of parameters to pass through to the function.
bool $refresh: (Optional) Refresh the access token prior to making the call. Defaults to FALSE, in which case a refresh is only attempted if the API responds invalid session ID / access token.
Return value
mixed The return value from $function.
Throws
\SoapFault
\Exception
See also
\SforcePartnerClient
1 method overrides SoapClientInterface::trySoap()
- SoapClient::trySoap in modules/
salesforce_soap/ src/ Soap/ SoapClient.php - Salesforce SOAP API resource wrapper.
File
- modules/
salesforce_soap/ src/ Soap/ SoapClientInterface.php, line 44
Class
- SoapClientInterface
- A client for communicating with the Salesforce SOAP API.
Namespace
Drupal\salesforce_soap\SoapCode
public function trySoap($function, array $params = [], $refresh = FALSE);