Hi
Can anyone please help me out in usage of Sugar Soap API to fetch CRM data.
I have tried using example programs, All of them works fine with local sugarcrm. But not working with my Remote SUGAR CRM.
This is the program i have been using.
I can get the session id when i use local crm url. But i could not get the session id for remote URL.
<?php
require_once("nusoap/nusoap.php");
$config['sugar_server'] = "http://localhost/SugarCRM/soap.php?wsdl=";
//$config['sugar_server'] = "http://www.my-sugarcrm-url.com/soap.php?wsdl=";
$config['login'] = array('user_name' => "admin",'password' => md5("mypassword"));
$config['application_name'] = "Test Soap Application";
// open a connection to the server
$sugarClient = new nusoapclient($config['sugar_server'], TRUE);
$err = $sugarClient->getError();
if ($err) {
return $err;
die();
}
echo $sugarClient; // Sucess till now. Connection opened
echo "<br>";
$sugarClientProxy = $sugarClient->getProxy();
if (!$sugarClientProxy) {
return $err;
die();
}
echo $sugarClientProxy; // Sucessfully executed and proxy was set.
echo "<br>";
// login using the credentials above
$result = $sugarClientProxy->login($config['login'], $config['application_name']); // Problem with this statement.
$session_id = $result['id'];
echo "Session Id: ".$session_id;
?>
My process stops execution at
" $result = $sugarClientProxy->login($config['login'], $config['application_name']); // Problem with this statement. "
Thanks in advance and anybody please help me out in this.


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks