title: Mantis SOAP-Error accessing mantisconnect.php (Eclipse Mylyn-Plugin)
body: <p>I installed Mantis BT 1.2.19 on my server and it works well. To benefit from it in my Eclipse-IDE (Mars) I installed the Task-Repo Plugin for Mantis and tried to add the connection.</p>
  
  <p>When I click on "Validate settings" in Eclipse I get the following error:</p>
  
  <pre><code> SOAP-ERROR: Parsing WSDL: Couldn't load from '/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl' : failed to load external entity "/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl"
  </code></pre>
  
  <p>In my error-log on the server are the following entries </p>
  
  <pre><code>[14-Oct-2015 11:25:05 Europe/Berlin] [mantisconnect.php] Error Type: SYSTEM WARNING,
  Error Description: SoapServer::SoapServer(): I/O warning : failed to load external entity &amp;quot;/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl&amp;quot;
  Stack Trace:
  mantisconnect.php L121 SoapServer(&lt;string&gt;'mantisconnect.wsdl', &lt;Array&gt; { ['features'] =&gt; 5 })
  
  [14-Oct-2015 11:25:05 Europe/Berlin] PHP Warning:  Uncaught SoapFault exception: [Server] Error Type: SYSTEM WARNING,
  Error Description: SoapServer::SoapServer(): I/O warning : failed to load external entity &amp;quot;/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl&amp;quot; in /var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mc_api.php:107
  Stack trace:
  #0 /var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mc_api.php(530): SoapActions::sendSoapFault('Server', 'Error Type: SYS...')
  #1 [internal function]: mc_error_handler(2, 'SoapServer::Soa...', '/var/www/vhosts...', 121, Array)
  #2 /var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.php(121): SoapServer-&gt;SoapServer('mantisconnect.w...', Array)
  #3 {main}
    thrown in /var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mc_api.php on line 107
  [14-Oct-2015 11:25:05 Europe/Berlin] PHP Fatal error:  SOAP-ERROR: Parsing WSDL: Couldn't load from '/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl' : failed to load external entity "/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl"
   in /var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.php on line 121
  </code></pre>
  
  <p>The errors above are produced by the Mantis plugin on accessing the URL</p>
  
  <pre><code>188.109.171.76 - - [14/Oct/2015:11:25:05 +0200] "POST /mantis/api/soap/mantisconnect.php HTTP/1.0" 500 1067 "-" "Mylyn/3.17.0 Mylyn-Mantis Connector/3.10.1 Apache Axis/1.4 Eclipse (org.eclipse.epp.package.jee.product) HttpClient/3.1 Java/1.8.0_60 (Oracle) Windows 7/6.1 (amd64; de_DE)"
  </code></pre>
  
  <p>But even a "normal" GET-access to the URL mentioned above produces the same error</p>
  
  <pre><code>https://{myhost}/mantis/api/soap/mantisconnect.php
  </code></pre>
  
  <p>No error is produced on accessing</p>
  
  <pre><code>https://{myhost}/mantis/api/soap/mantisconnect.php?wsdl
  </code></pre>
  
  <p>To solve the problem on my own I checked several ideas:</p>
  
  <ul>
  <li>The file IS existant ... {myhost} is just a placeholder here obviously - placed by me</li>
  <li>I switched to the context of the webserver <code>www-data</code> and tried accessing the file ... it IS accessible</li>
  </ul>
  
  <p>So I´ve no idea...</p>
  
  <p>PHP version is <code>5.5.9-1ubuntu4.13</code> on <code>Ubuntu 14.04.3 LTS</code></p>
  
  <p><strong>€dit:</strong></p>
  
  <p>Tracked down the error to the following PHP-line in <code>mantis/api/soap/mantisconnect.php</code></p>
  
  <pre><code> $server = new SoapServer("mantisconnect.wsdl",
                          array('features' =&gt; SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS)
          );
  </code></pre>
  
  <p>I don´t understand why there an error is thrown - because as I said: it exists and is readable by the webserver...</p>
  
  <p><strong>€edit2:</strong></p>
  
  <p>I replaced the line </p>
  
  <pre><code> $server = new SoapServer("mantisconnect.wsdl",
  </code></pre>
  
  <p>with</p>
  
  <pre><code>$server = new SoapServer("http://{myhost}/mantis/api/soap/mantisconnect.wsdl",
  </code></pre>
  
  <p>THIS works... so I´ve a "solution" but I don´t know why the access via file does not work</p>