You need to sign in to do that
Don't have an account?
zabah
Multi-Dim Array Errors from SOAP
Hello:
We recently moved our web server from a simple solution to rackspace. We now have the latest PEAR, SOAP, and PHP packages. However, SOAP calls to Salesforce are returning poorly formatted arrays. A call that would return a list of four contacts in one array on our old server is returning the four contacts nested in a multi-dim array on the new server. Has anyone seen this before? Any help would be much appreciated as I've searched all over this board and the web to find some hints, but found none. I've attached sample query results below. Thanks.
Old Server Results for all contacts in Goleta, CA:
New Server Results for all contacts in Goleta, CA:
We recently moved our web server from a simple solution to rackspace. We now have the latest PEAR, SOAP, and PHP packages. However, SOAP calls to Salesforce are returning poorly formatted arrays. A call that would return a list of four contacts in one array on our old server is returning the four contacts nested in a multi-dim array on the new server. Has anyone seen this before? Any help would be much appreciated as I've searched all over this board and the web to find some hints, but found none. I've attached sample query results below. Thanks.
Old Server Results for all contacts in Goleta, CA:
Array
(
[0] => stdClass Object
(
[type] => Contact
[Id] => 00330000002jE3WAAU
[Name] => Susan Rudnicki
[MailingCity] => Goleta
)
[1] => stdClass Object
(
[type] => Contact
[Id] => 00330000002jGWQAA2
[Name] => Eric Heidner
[MailingCity] => Goleta
)
[2] => stdClass Object
(
[type] => Contact
[Id] => 00330000002jFfyAAE
[Name] => Mark Krilanovich
[MailingCity] => Goleta
)
[3] => stdClass Object
(
[type] => Contact
[Id] => 00330000002jFJTAA2
[Name] => Adam Gilberti
[MailingCity] => Goleta
)
)
New Server Results for all contacts in Goleta, CA:
Array
(
[0] => Array
(
[0] => Array
(
[0] => stdClass Object
(
[type] => Contact
[Id] => 00330000002jE3WAAU
[Name] => Susan Rudnicki
[MailingCity] => Goleta
)
[1] => stdClass Object
(
[type] => Contact
[Id] => 00330000002jGWQAA2
[Name] => Eric Heidner
[MailingCity] => Goleta
)
)
[1] => stdClass Object
(
[type] => Contact
[Id] => 00330000002jFfyAAE
[Name] => Mark Krilanovich
[MailingCity] => Goleta
)
)
[1] => stdClass Object
(
[type] => Contact
[Id] => 00330000002jFJTAA2
[Name] => Adam Gilberti
[MailingCity] => Goleta
)
)
I'm also involved in this problem as the CEO of the company that zabah is doing the work for.
Perl version 5.8.5
SOAP version 5.2.5
PHP version 5.2.5
I hope this is what you need to help us figure this problem out.
Richard Hotchkiss
Gvox
$oSC = new SalesforceClient();
$result = $oSC->login(USERNAME, PASSWORD);
$strSession = $result->sessionId;
$strSFUrl = $result->serverUrl;
$oClient = new SalesforceClient($strSession);
$oClient->_endpoint = $strSFUrl;
$query_str = "
SELECT id, name, MailingCity
FROM Contact
WHERE MailingCity = 'Goleta'
";
$LIMIT = 25;
$result = $oClient->query($query_str, $LIMIT);
$records = $result->records;
print_r($records);
Message Edited by zabah on 02-06-2008 04:52 AM