WEBService Client(PHP)->Server(JAVA)
最近在做WEBService开发,我这边是做请求端,去请求JAVA做的WEBService,疑问如下,
$ViewProjectNumber['Project'] = '<number>1</number>';
$encodded = new SoapVar($ViewProjectNumber, SOAP_ENC_OBJECT);
$result = $client->oaProjectRequest($encodded);
Server接收$encodded显示出来的值??<number>1</number>? 被转义了,请问如何解决呢?
?
------解决方案--------------------print_r($encodded);
SoapVar Object
(
[enc_type] => 301
[enc_value] => Array
(
[Project] => <number>1</number>
)
)
显然不是在客户端转义的
但作为xml节点数据的话,则被转义是正确的,不然就被当做节点了
你或许要使用 CDATA