You need to sign in to do that
Don't have an account?
jhilgeman
PHP Toolkit 11 - Invalid SOAP Headers - describeSObject
I'm using the new 11.0 PHP Toolkit, connecting with the Enterprise client library. I log in, everything is working okay, and then I try to run:
$result = $connection->describeSObject("Organization");
It used to work fine in 1.0 and 1.1, but now it just fails every time. I used XDebug to trace it back, and here's the error:
PHP Fatal error: SoapClient::__setSoapHeaders() [<a href='function.--setSoapHeaders'>function.--setSoapHeaders</a>]: Invalid SOAP header in /....yada yada.../11.0/soapclient/SforceBaseClient.php on line 250
I looked at that line, and it's just setting a SOAP header of "describeSObject" - not sure why it's failing. Any guesses or suggestions?
$result = $connection->describeSObject("Organization");
It used to work fine in 1.0 and 1.1, but now it just fails every time. I used XDebug to trace it back, and here's the error:
PHP Fatal error: SoapClient::__setSoapHeaders() [<a href='function.--setSoapHeaders'>function.--setSoapHeaders</a>]: Invalid SOAP header in /....yada yada.../11.0/soapclient/SforceBaseClient.php on line 250
I looked at that line, and it's just setting a SOAP header of "describeSObject" - not sure why it's failing. Any guesses or suggestions?
I'm having a little trouble with that, since it is a fatal error and is exiting before I can run the next command. However, I did a few other things. First, I went into the BaseClient class and went to line 250, which is the following line in the setHeaders function:
I ran the getLastRequest right before that line, and I got this output:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:enterprise.soap.sforce.com"><SOAP-ENV:Body><ns1:login><ns1:username>--- removed ---</ns1:username><ns1:password>--- also removed ---</ns1:password></ns1:login></SOAP-ENV:Body></SOAP-ENV:Envelope>
So it looks like this is the first command after logging in. My next step was to put a few more debugging lines into the BaseClient class to figure out what was going on. Here's the original setHeaders function:
I dumped the argument $call, which came out to be "describeSObject" (without quotes)