私の SOAP サーバーは、応答ヘッダーで Content-Type: text/html を送信します。Content-type: text/xml が必要です。
public function index()
{
$this->layout = 'soap';
ini_set("soap.wsdl_cache_enabled", "0");
$this->server = new SoapServer('wsdl/tur.wsdl', array(
'soap_version' => SOAP_1_2,
));
$this->server->setObject($this);
$this->server->handle();
}
サーバーの応答は次のとおりです。
HTTP/1.1 200 OK
日付: 2012 年 3 月 19 日月曜日 12:17:10 GMT
サーバー: Apache/2.2.20 (Ubuntu)
X-Powered-By: PHP/5.3.6-13ubuntu3.6
Set-Cookie: CAKEPHP=msmid2fijgrj1efjs0otl8qfj1 ; expires=Mon, 19-Mar-2012 16:17:10 GMT; path=/
P3P: CP="NOI ADM DEV PSAi COM NAV OUR ORo STP IND DEM"
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 877
Content-Type: text/html ; 文字セット=UTF-8
text/xml コンテンツ タイプで header() を呼び出そうとしました
public function index()
{
$this->layout = 'soap';
ini_set("soap.wsdl_cache_enabled", "0");
header("Content-Type: text/xml");
$this->server = new SoapServer('wsdl/tur.wsdl', array(
'soap_version' => SOAP_1_2,
));
$this->server->setObject($this);
$this->server->handle();
}
SoapServer の構築前後ですが、結果はありません。