I'm not familiar with a SugarCRM SOAP method called test
, so unless it's a custom method you made yourself, I'd try with some simple valid calls. (Tested with Sugar CE 6.2).
<?php
require_once('include/nusoap/lib/nusoap.php');
$myWsdl = 'http://www.mycrmurl.com/soap.php?wsdl';
$myAuth = array(
'user_name' => 'will',
'password' => MD5('will'),
'version' => '0.1'
);
$soapClient = new nusoap_client($myWsdl,true);
$loginParams = array('user_auth' => $myAuth, 'application_name' => 'MyApp');
$loginResult = $soapClient->call('login', $loginParams);
$sessionId = $loginResult['id'];
echo $sessionId;
?>
If the above still gives you problems, try the following:
- Look in the web server log (Is the call getting through)
- Enable the SugarCRM logging and set the level to debug
- Either enable PHP error output or make PHP log errors to a log file
- Use e.g. SoapUI to test SOAP call
- See question 5396302 for a more thorough SOAP example
- Check the SugarCRM SOAP documentation