Open
Description
Hello,
Can you help me please?
I have problem with connection to salesforce, when i use query i have this error Element {}item invalid at this location
vendor\phpforce\soap-client\src\Phpforce\SoapClient\Client.php (line 560)
In method
$requestEvent = new Event\RequestEvent($method, $params); $this->dispatch(Events::REQUEST, $requestEvent); try { $result = $this->soapClient->$method($params); } catch (\SoapFault $soapFault) { $faultEvent = new Event\FaultEvent($soapFault, $requestEvent); $this->dispatch(Events::FAULT, $faultEvent); throw $soapFault;
my code
class Salesforce
{
const USERNAME_SF = "username";
const TOKEN_SF = "token";
const PASSWORD_SF = "pass";
private $client;
private function login()
{
if(!is_null($this->client)) return;
// check if l'utilisateur existe mot de pass dynamique
$auth= new \Phpforce\SoapClient\ClientBuilder(
__DIR__ . '/../../config/wsdl/PartnerWSDL.xml',
self::USERNAME_SF,
self::PASSWORD_SF,
self::TOKEN_SF
);
$this->client = $auth->build();
}
public function get_information()
{
$this->login();
$results = $this->client->query('select Id from Contact');
}
}
Thanks
Metadata
Metadata
Assignees
Labels
No labels