Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Element {}item invalid at this location #34

Open
kevin-schmitt opened this issue Oct 27, 2018 · 0 comments
Open

Element {}item invalid at this location #34

kevin-schmitt opened this issue Oct 27, 2018 · 0 comments

Comments

@kevin-schmitt
Copy link

kevin-schmitt commented Oct 27, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant