MantisBT - TestLink
View Issue Details
0007779TestLinkBug Tracking System - Mantis Integrationpublic2016-12-08 02:302016-12-12 21:15
1.9.15 (2015 Q4) 
0007779: Mantis SOAP connection doesn't work anymore with newest version
I updated now from 1.9.14 to 1.9.15 and now the SOAP interface doesn't work anymore.

I tried to somehow narrow it down by adding some error_log(). I can see that in the file execSetResults.php we are getting up to line 1439 "if( $issueTracker->isConnected() )". With the print_r() I could see that $issueTracker is indeed the correct object but connected is false.

I tried then to added several error_log() into the mantissoapInterface class but non of those entries were written into the error log. So I have no clue what is happening now.
No tags attached.
Issue History
2016-12-08 02:30modirNew Issue
2016-12-11 14:34fmanNote Added: 0025701
2016-12-11 14:34fmanAssigned To => fman
2016-12-11 14:34fmanStatusnew => feedback
2016-12-12 21:15modirNote Added: 0025720
2016-12-12 21:15modirStatusfeedback => assigned

2016-12-11 14:34   
I've experimented some issues related to PHP version (on MAC OS I've always issues)
One user has provided this hint (that was not useful for me on MAC OS)

Today I stumbled over a strange problem with the SOAP interface of
Mantis. In the logs was always this error message:

 failed to load external entity
"https://server/mantisbt/api/soap/mantisconnect.php?wsdl"\n [^] in

The first answer with the 10 points was then my solution: [^]

Given the fact that now more and more SSL is used you might want to add
this to the main code of TestLink as well.

Best Regards,

You need to dig TestLink logs to understand what message you get, i normally get that XML response can not be decoded.

Unfortunately you did not provide (anyway) enough info to reproduce the case.

2016-12-12 21:15   
I sent you this tip back then. I created now a test script which helps to find the real problem:

ini_set('soap.wsdl_cache_enabled', '0');

// You need to set your URL here
$wsdlUrl = 'https://your [^] server/mantisbt/api/soap/mantisconnect.php?wsdl';

$w = stream_get_wrappers();
echo 'openssl: ', extension_loaded ('openssl') ? 'yes':'no', "\n";
echo 'http wrapper: ', in_array('http', $w) ? 'yes':'no', "\n";
echo 'https wrapper: ', in_array('https', $w) ? 'yes':'no', "\n";
echo 'wrappers: ', var_export($w);

// options for ssl in php 5.6.5
$opts = array(
    'ssl' => array('verify_peer'=>false, 'verify_peer_name'=>false),
    'http'=>array('user_agent' => 'PHPSoapClient')
// SOAP 1.2 client
$params = array ('encoding' => 'UTF-8', 'verifypeer' => false, 'cache_wsdl' => WSDL_CACHE_NONE, 'verifyhost' => false, 'soap_version' => SOAP_1_2, 'trace' => 1, 'exceptions' => 1, "connection_timeout" => 180, 'stream_context' => stream_context_create($opts) );

$client = new SoapClient($wsdlUrl, $params);

------------ End of Script -------

In my case it showed me exactly which problems existed with my PHP SSL configuration.