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
using mantisconnect from a php script
Moderators: Developer, Contributor
Re: using mantisconnect from a php script
This works for me:
output is "1.2.0a1"
Code: Select all
<?php
require_once('nusoap.php');
$endpoint = "http://www.mantisbt.org/bugs/api/soap/mantisconnect.php";
$client = new soapclient($endpoint);
$result = $client->call('mc_version',array());
print_r($result);
Re: using mantisconnect from a php script
hi !
I have test your example in my local machine
an have this error
PHP Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://localhost/mantis/api/soap/mantisconnect.php' : Extra content at the end of the document
in /var/www/mantis/test.php:4
Stack trace:
#0 /var/www/mantis/test.php(4): SoapClient->SoapClient('http://localhos...')
thanks by advance
I have test your example in my local machine
an have this error
PHP Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://localhost/mantis/api/soap/mantisconnect.php' : Extra content at the end of the document
in /var/www/mantis/test.php:4
Stack trace:
#0 /var/www/mantis/test.php(4): SoapClient->SoapClient('http://localhos...')
thanks by advance
Re: using mantisconnect from a php script
I'm playing this a bit..
You need to add "?wsdl" to the end of the url..
Now I'm getting different errors!
You need to add "?wsdl" to the end of the url..
Now I'm getting different errors!
Re: using mantisconnect from a php script
Hi,
Please Expain me where to put this code, in order to test iti
Thanks By Adavance
Nourdine Chabane
Please Expain me where to put this code, in order to test iti
Thanks By Adavance
Nourdine Chabane