2012-09-27 84 views
1

我正在嘗試與web服務螳螂bug跟蹤器爲個人應用做肥皂連接。與mantisbt的肥皂連接

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

什麼是錯?

$這個 - >住址= 「HTTP://localhost/mantisbt/api/soap/mantisconnect.php WSDL」

當我走在這ADRESS與瀏覽器我看到正確的XHTML文件

這是這條線,其中有一個錯誤:$client = new SoapClient($this->adresse);

感謝您的幫助。

+0

你說你看到的XHTML當你去到WSDL鏈接?這聽起來不對 - 一個wsdl鏈接不應該給XHTML;它應該提供WSDL格式的XML。 – SDC

+0

當我去這個地址:「http://localhost/mantisbt/api/soap/mantisconnect.php?wsdl」我有這個網頁http://www.hostingpics.net/viewer.php?id=732454Sanstitre.png – LedZelkin

回答

0

我解決了這個問題。我不知道爲什麼,但錯誤是「本地主機」。我把IP地址和腳本工作正常。

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

感謝所有幫助:)

0

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

+0

我嘗試過,但不起作用... – LedZelkin

+0

你會得到什麼錯誤? –