Index: SalesforceClient.php =================================================================== RCS file: /cvsroot/sforce/php-client/SalesforceClient.php,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 SalesforceClient.php --- SalesforceClient.php 16 Dec 2003 18:08:29 -0000 1.1.1.1 +++ SalesforceClient.php 15 Mar 2004 19:52:10 -0000 @@ -23,13 +23,25 @@ function SalesforceClient($sessionId="") { $this->WebService_SforceService_Soap(); if (isset($sessionId) && $sessionId != "") { - $header = new SOAP_Header( - '{urn:partner.soap.sforce.com}SessionHeader', - NULL, - array('sessionId' => $sessionId), - 0); - $this->addHeader($header); + $this->addSessionHeader($sessionId); } + } + + // my added functions + function addSessionHeader($sessionId) + { + $header = new SOAP_Header( + '{urn:partner.soap.sforce.com}SessionHeader', + NULL, + array('sessionId' => $sessionId), + 0); + $this->addHeader($header); + } + + function addSessionParameters($sessionId, $endpoint) + { + $this->addSessionHeader($sessionId); + $this->_endpoint = $endpoint; } function query($query,$limit=10) {