将Drupal连接到Salesforce时出现SOAP错误

时间:2016-01-21 11:09:31

标签: salesforce

我创建了一个Drupal7模块来从Salesforce中提取数据

我的想法是,我应该能够运行SOQL查询并将其加载到数组中。

我收到一条错误消息 “SOAP错误解析WSDL:无法从'soapclient / partner.wsdl.xml'

加载

无法在SoapClient-> SoapClient()中加载外部实体“soapclient / partner.wsdl.xml”

我已检查路径并确认这指向正确的文件。

这是我的代码

define("USERNAME", "salesforce@decawave.com");
define("PASSWORD", "Decawave3");
define("SECURITY_TOKEN", "MfNG8OgO06l4hVWFpi0MjDMeN");
require_once ('soapclient/SforcePartnerClient.php');

$connection = new SforcePartnerClient();
$connection->createConnection("soapclient/partner.wsdl.xml");
$connection->login(USERNAME, PASSWORD.SECURITY_TOKEN);

$query = "SELECT Name FROM TREK__c";
$result = $Connection->query($query);

foreach($result as $record)
{
$id[] = $record->Name;
}

0 个答案:

没有答案