doutuoshou8915 2012-09-27 12:16
浏览 120
已采纳

与mantisbt的肥皂连接

I'm trying to make a soap connection with the web service mantis bug tracker for an personnal appli.

  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();
    }
}

What is wrong ?

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

when i go at this adress with the browser i see the correct XHTML file

it's this line where ther is an error : $client = new SoapClient($this->adresse);

Thanks for help.

  • 写回答

2条回答 默认 最新

  • dongzhuan1185 2012-09-27 15:02
    关注

    i solved the problem. I dont know why but the error was "localhost". I put the IP adress and the script work fine.

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

    thanks all for help :)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?