AnsweredAssumed Answered

Soap / Nusoap differences in 6.5.16

Question asked by Yasir Arsalan shaikh on Apr 16, 2014
Latest reply on Apr 27, 2014 by Yasir Arsalan shaikh
When I tried to run following sample code (sample 1) of nusoap, it is working fine on my local machine which has sugarcrm 6.4 deployed on it. But when i try to run the same example on sugar 6.5.16 on windows 2008 server R2, login call does not return anything. I increased the log level to Debug, but nothing found. I checked the wsdl in browser using url http://localhost/sugarcrm/service/v2/soap.php?wsdl it perfectly shows the wsdl file.

When i change the sample 1 code  into sample 2 code in sugar 6.5.16 deployed on Win2K8, it starts working fine. Therefore I assume only old version of soap is working, but not nusoap. Just to let you know i even tried v3 and v4 urls (http://localhost/sugarcrm/service/v3/soap.php?wsdl http://localhost/sugarcrm/service/v4/soap.php?wsdl ) with sample 1, but no luck. I mean login call doesn't return anything.

Can anyone help why it is happening so? Why nusoap is not working in sugar 6.5.16? Why only sample2 is working in sugar6.5.16 on Win2K8 but not the sample 1?

/*************************************** sample 1 ******************************/
if(!defined('sugarEntry'))define('sugarEntry', true);
require_once('include/nusoap/nusoap.php');

$user_name = "admin";
$password = "admin";
$client = new nusoapclient('http://localhost/sugarcrm/service/v2/soap.php?wsdl',true);  
$userAuth = $client->call('login', array('user_auth' => array('user_name' => $user_name, 'password' => md5($password))));
print_r($userAuth);

/****************************************************************************************/
/*************************************** sample 2 ******************************/
if(!defined('sugarEntry'))define('sugarEntry', true);
require_once('include/nusoap/nusoap.php');
$user_name = "admin";
$password = "admin";
  $options = array( 
"location" => 'http://127.0.0.1/sugarcrm/soap.php', 
"uri" => 'http://www.sugarcrm.com/sugarcrm', 
"trace" => 1 
); 


$client = new SoapClient(null,$options);  
 $app_name = 'silahcrm';
$userAuth = $client->login(array('user_name'=>$user_name, 'password'=>md5($password),'version'=>'.1'),$app_name);
print_r($userAuth);

Outcomes