Thanks for the feedback, guys. I was trying to implement soap.php as a the transport object, when it only carries the web service definitions. I need to instantiate the nusoap class as my transport object with the soap.php file as its set of definitions. Here is the code I got working:
PHP Code:
function GetSugarSessionId($myUsername,$myPassword){
// create SOAP object; connect to SOAP.PHP definitions through NUSOAP protocol
if(!defined('sugarEntry'))define('sugarEntry', true); // bypass entryPoint restrictions on NUSOAP
require_once(SUGAR_PATH.'include/nusoap/nusoap.php'); // re-use the NUSOAP class from the remote side
$soapclient = new nusoapclient(SUGAR_URL.'soap.php'); // create a NUSOAP object that uses the soap.php definitions
// setup parameters to send to function through the SOAP object
$config = array();
$config['login'] = array();
$config['login']['user_name'] = $myUsername;
$config['login']['password'] = md5($myPassword);
$config['application_name'] = 'test';
// login through the SOAP object
$result = $soapclient->call('login',$config);
$session_id = $result['id'];
// run seamless_login function
$result = $soapclient->call('seamless_login',$session_id);
echo("<a href='".SUGAR_URL."/?MSID=".$session_id."'>click here to login</a>");
}
Bookmarks