1

我正在尝试与个人应用程序的网络服务螳螂错误跟踪器建立肥皂连接。

  public function issues_get($username, $password) {
    try {
       $client = new SoapClient($this->adresse);
        $response = $client->mc_filter_get_issues($username, $password, $this->projectId, $this->ersFilter, 0, 0);
        $response = convert::object2array($response);
        return $response;
    }
    catch (SoapFault $e){
        echo $e->faultcode; 
        //$e->getMessage();
    }
}

怎么了 ?

$this->adresse = "http://localhost/mantisbt/api/soap/mantisconnect.php?wsdl"

当我用浏览器访问这个地址时,我看到了正确的 XHTML 文件

这是有错误的这一行:$client = new SoapClient($this->adresse);

感谢帮助。

4

2 回答 2

0

正确的入口点是http://localhost/mantisbt/api/soap/mantisconnect.php(省略?wsdl部分)。

于 2012-09-27T13:12:14.767 回答
0

我解决了这个问题。我不知道为什么,但错误是“localhost”。我把IP地址和脚本工作正常。

$this->adresse = "http://192.x.x.x.x/mantisbt/api/soap/mantisconnect.php?wsdl" 

谢谢大家的帮助:)

于 2012-09-27T15:02:51.293 回答