function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jkropkajkropka 

Interfacing to the

I'm using the interface through:
https://www.salesforce.com/services/Soap/c/6.0

to log in and retrieve data OK, but when I try to create records
I get the message :
soapenv:Server common.exception.ApiException: Must send a concrete entity type. INVALID_TYPE Must send a concrete entity type. -1 -1
I'm logging into the Enterprise account.


my code:

$sfobj = new SalesforceClient();
$ds_login = "validuser";
$ds_pass = "validpass";
$res=$sfobj->login($ds_login, $ds_pass);


if (PEAR::isError($res))
{
$errors = "Error: " . $res->getMessage() . "\n";
$_SESSION['err'] = '2';
$_SESSION['msg'] = $errors;
header("Location: /sserv/");

}
else
{
//$debug = new array_parse($_SESSION,"session VARS - ".__LINE__."-".__FILE__); echo $debug->output_var;
$_SESSION['serverUrl']=$res->serverUrl;
$_SESSION['sessionId']=$res->sessionId;
$_SESSION['loggedInName'] = $loggedInName;

$_SESSION['err']="";
$_SESSION['msg']="";

}

$sfobj->addSessionParameters($_SESSION['sessionId'],$_SESSION['serverUrl']);


After the session is happy I can build my sql's and execute queries with no
problem using the client code, but the create fails

Create code:
function &create($sObjects)
{
$this->addSessionHeader();
return parent::create($sObjects);
}
(from the samples)
and my code to do the create:


$contact->type="Contact";
$contact->AccountId = "validid";
$contact->Email - "one@two.com";
$contact->LastName = "Last";

$args->sObjects = new SoapVar($contact, SOAP_ENC_OBJECT, "Contact", "http://soapinterop.org/xsd");

$sfobj->create($args);

anyone see what I am doing wrong?
jkropkajkropka
I forgot, my Development environment is PHP 5.04