Re: PHP4 SOAP Request problem logging in to salesforce.com
| From: | Michael Rasmussen | Date: | Tue, 25 Oct 2005 19:09:51 +0000 |
| Subject: | Re: PHP4 SOAP Request problem logging in to salesforce.com | ||
| References: | 1 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-2031@lists.php.net to get a copy of this message | ||
On Tue, 25 Oct 2005 13:08:27 -0400, Colin Goldberg wrote:
> Can you help me discover why parameters username and password do not
> appear in the request?
In your client you need to do this:
require_once("../SalesforceClient.php");
$client = new SalesforceClient();
$header =& new SOAP_Header(
'{urn:partner.soap.sforce.com}login',
'Struct',
array('username'=>'foo','password'=>'bar'),
1);
$client->addHeader($header);
....
$resquest = array(....);
$response =& $client->call('theFunction', $request, $namespace);
if (PEAR::isError($response))
echo "Fault: " . $response->message. "\n";
else
echo "Response from server:\n $response\n\n";
--
Hilsen/Regards
Michael Rasmussen
http://keyserver.veridis.com:11371/pks/lookup?op=get&search=0xE3E80917