我使用螳螂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