$params = array ( 'pAppCode' => "123" , 'pCinemaID' => '1561', 'pVerifyInfo' => '7d1daac20de86ec2');$result = $client ->call('getCinema', $params);var_dump($result);

//如上的var_dump() 我原来期望的输出含有xml格式是:

<GetCinemaResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <ResultCode>0</ResultCode> <Cinemas> <Cinema> <PlaceNo>54</PlaceNo> <PlaceName>阳光影院</PlaceName> <CityNo></CityNo> <CreateDate></CreateDate> </Cinema> <Cinema> <PlaceNo>123</PlaceNo> <PlaceName>莲花影院</PlaceName> <CityNo>27</CityNo> <CreateDate></CreateDate> </Cinema> <Cinema> <PlaceNo>123</PlaceNo> <PlaceName>莲花影院</PlaceName> <CityNo>27</CityNo> <CreateDate></CreateDate> </Cinema> <Cinema> <PlaceNo>1561</PlaceNo> <PlaceName>中央地面</PlaceName> <CityNo>69</CityNo> <CreateDate></CreateDate> </Cinema> </Cinemas></GetCinemaResult>

soapclientphpxmlphp用soap挪用接话柄例返回值没有见到xml CSS

但是浏览器一贯输出:

array(1) { ["return"]=> string(649) "054阳光影院123莲花影院27123莲花影院271561中央地面69" } 眼看着649字符,却看不到xml标签,后来才想到var_dump出来得的xml标签都被浏览器给解析了。

if ($client ->fault) { echo '<h2>Fault (Expect - The request contains an invalid SOAP body)</h2><pre>'; print_r($result); echo '</pre>';} else { $err = $client ->getError(); if ($err ) { echo '<h2>Error</h2><pre>' . $err . '</pre>' ;} else { echo '<h2>Result</h2><pre>'; print_r( $result); echo '</pre>';}}echo '<h2>Request</h2><pre>' . htmlspecialchars( $client->request, ENT_QUOTES) . '</pre>' ;echo '<h2>Response</h2><pre>' . htmlspecialchars( $client->response, ENT_QUOTES) . '</pre>' ;echo '<h2>Debug</h2><pre>' . htmlspecialchars( $client->getDebug(), ENT_QUOTES) . '</pre>' ;