简体   繁体   中英

Soap connection with 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.

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

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 :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM