Re: [SOAP] Re: PHP4 SOAP Request problem logging in to salesforce.com

From: Date: Tue, 25 Oct 2005 23:11:54 +0000
Subject: Re: [SOAP] Re: PHP4 SOAP Request problem logging in to salesforce.com
References: 1 2 3  Groups: php.soap 
Request: Send a blank email to php-soap+get-2033@lists.php.net to get a copy of this message
On Tue, 25 Oct 2005 18:20:00 -0400, Colin Goldberg wrote: > WebService_SforceService_Soap.php, whose login function was as follows: > > function &login($username, $password) { > $login =& new > > SOAP_Value('{urn:partner.soap.sforce.com}login',false,$v=array("username"=>$username, > "password"=>$password)); > return $this->call("login", > $v = array('login'=>$login), > > array('namespace'=>'urn:partner.soap.sforce.com', > 'soapaction'=>'', > 'style'=>'document', > 'use'=>'literal' )); > } > } This is wrong because authentication must be part of the header in every succeeding request from the client. To do that you add a new SOAP_Header to your client in which case your client will transmit this header as part of every request to the server. > > and then: > $request = array(....); (??) > > $response =& $client->call('login', $request, $namespace); > This was just to show you that requests for the various services provided by the server must be done after adding the header to the client -- Hilsen/Regards Michael Rasmussen http://keyserver.veridis.com:11371/pks/lookup?op=get&search=0xE3E80917

« previous php.soap (#2033) next »