我使用螳螂Bug跟蹤SOAP API,可惜每次都返回到我的消息像螳螂Bug跟蹤SOAP API響應XML錯誤
「looks like we got no XML document
」,
跟蹤的上一個響應後,我得到了以下消息
"<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body><SOAP-ENV:Fault><faultcode xsi:type="xsd:string">Client</faultcode><faultactor xsi:type="xsd:string"></faultactor><faultstring xsi:type="xsd:string">Issue does not exist.</faultstring><detail xsi:type="xsd:string"></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>"
我希望,我得到XML respose回來,看來是有另外的在開始""
字符。
任何線索或幫助將是偉大的,在刪除這些字符。
連接到MANTIS SOAP API服務器
<?php
$c = new \SoapClient("http://dev06/api/soap/mantisconnect.php?wsdl", array('trace'=> true, 'encoding'=>' UTF-8', 'soap_version'=>1.2));
$username = "xxxxx";
$password = "xxxxx";
try {
$c->mc_issue_get(trim($username), trim($password), 2331);
} catch (SoapFault $exception) {
var_dump($c->__getLastResponse());
}
?>
請提供更多信息,如Mantis版本和連接到螳螂的源代碼。 – libregeek
嗨,感謝您的回覆。我正在使用最新版本的Mantis 1.2.15。請在上面找到連接到螳螂SOAP api服務器的代碼。 – bharatesh