簡體   English   中英

與螳螂的肥皂連接

[英]Soap connection with mantisbt

我正在嘗試與一個個人應用程序的Web服務螳螂錯誤跟蹤器建立連接。

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

感謝幫助。

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

我解決了這個問題。 我不知道為什么,但是錯誤是“ localhost”。 我把IP地址和腳本工作得很好。

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

謝謝大家的幫助:)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM