Skip to content

Element {}item invalid at this location #34

Open
@kevin-schmitt

Description

@kevin-schmitt

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions