我正在发送肥皂请求,并且也从服务器获得正确的响应。但无法将CDATA作为字符串发送。方法类型是对象和字符串
class clsSecurity {
public function __construct()
{
$this->fullname= 'fullname';
$this->username = 'username';
$this->password = 'password';
$this->ip = 'XX.XX.XX.XX';
$this->request = 'XXX';
}
}
$client = new SoapClient("http://wsdlurl?WSDL",['trace' => 1]);
$contact = new clsSecurity();
$par = "<![CDATA[<Availability>
<seat>D</seat>
<room>O</room>
<access>N</access>
</Availability>]]>";
$params = array(
'objSecurity' => $contact,
'avalibility'=>$par
);
$response = $client->__soapCall("roomAvailability", array($params));
echo "<>" . $client->__getLastRequest() . "<>";
我无法将availability
作为字符串发送,第一个参数应该是obj,第二个参数应该是字符串。
在$clinet->__getType();
Availability { clsSecurity objSecurity; string roomAvailability; }