using mantisconnect from a php script
Posted: 26 May 2008, 06:57
In mantis 1.1.1 version, I'm trying to test mantisconnect creating my own php script, but I can't find any example of how to use it, and the standards nusoap examples are not working.
I have tried creating a test.php with the following code:
<?
include('api/soap/nusoap/nusoap.php');
$url = 'api/soap/mantisconnect.php';
$soapclient = new soapclient($url);
$function = 'mc_version';
$params = array('name' => 'Pepe');
$result = $soapclient->call( $function , $params );
echo $result;
?>
But I get this error:
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://www.mantisbt.org/bugs/api/soap/mantisconnect.php' in /var/www/apache2-default/test.php:7 Stack trace: #0 /var/www/apache2-default/test.php(7): SoapClient->SoapClient('http://www.mant...') #1 {main} thrown in /var/www/apache2-default/test.php on line 7
I have tried creating a test.php with the following code:
<?
include('api/soap/nusoap/nusoap.php');
$url = 'api/soap/mantisconnect.php';
$soapclient = new soapclient($url);
$function = 'mc_version';
$params = array('name' => 'Pepe');
$result = $soapclient->call( $function , $params );
echo $result;
?>
But I get this error:
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://www.mantisbt.org/bugs/api/soap/mantisconnect.php' in /var/www/apache2-default/test.php:7 Stack trace: #0 /var/www/apache2-default/test.php(7): SoapClient->SoapClient('http://www.mant...') #1 {main} thrown in /var/www/apache2-default/test.php on line 7