Webサービスを作成していますが、オブジェクトを受け取る操作を追加しましたが、soapクライアントがその属性を認識しません
<?php
class Application_Model_Contact {
private $id;
private $name;
private $phone;
/**
*
* @param String $nome
* @param String $phone
*/
public function __construct($nome = null, $phone = null) {
....
}
}
..。
class Application_Model_WebServices
{
/**
*
* @param Application_Model_Contact $contact
* @return boolean
*/
public function adicionar(Application_Model_Contact $contact){
return true;
}
}
...。
if (isset($_GET['wsdl'])) {
$autodiscover = new Zend_Soap_AutoDiscover();
$autodiscover->setClass('Application_Model_WebServices');
$autodiscover->handle();
} else {
$server = new Zend_Soap_Server();
$server->setOptions(array(
'soap_version' => SOAP_1_2,
'actor' => 'http://localhost/AgendaTelefonicaPHPSOAP/public/webservice.php',
'encoding' => 'UTF-8'
));
$server->setWsdl('http://localhost/AgendaTelefonicaPHPSOAP/public/webservice.php?wsdl');
$server->setClass('Application_Model_WebServices');
$server->handle();
}
soapUIを使用して、このオブジェクトを追加するために次のxmlを取得します
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://localhost/AgendaTelefonicaPHPSOAP/public/webservice.php">
<soapenv:Header/>
<soapenv:Body>
<web:adicionar soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<contact xsi:type="web:Application_Model_Contact"/>
</web:adicionar>
</soapenv:Body>
</soapenv:Envelope>
クラス属性が認識されないのはなぜですか?