阅读Soap Header

时间:2012-04-07 23:11:00

标签: php soap

我在php中发送了一个Soap Request,希望看到完整的xml soap请求。如何输出xml或在Firefox中看到xml? 感谢

1 个答案:

答案 0 :(得分:0)

来自http://www.php.net/manual/en/soapclient.getlastrequest.php

<?php
$client = SoapClient("some.wsdl", array('trace' => 1));
$result = $client->SomeFunction();
echo "REQUEST:\n" . $client->__getLastRequest() . "\n";

还有__getLastRequestHeaders()__getLastResponse()__getLastResponseHeaders()