note 102387 added to soapclient.soapcall
[email protected] Fri, 11 Feb 2011 03:23:14 -0800
| Newsgroups | php.notes |
|---|---|
| Message-ID | <[email protected]> |
I am using SOAP call response headers to sign request results.
After alot of hours, I finally got the best way to get SOAP response headers (other than parsing __getLastResponse() witch requires trace option enabled) is using __soapCall() wrapper.
You can extend SoapClient class and wrap some functions to make sure you get the headers.
<?php
class API extends SoapClient
{
// ... Constructor, etc.
// Get SOAP Server response headers
public function __soapCall($function, $arguments, $options = array(), $input_headers = null, &$output_headers = null)
{
parent::__soapCall($function, $arguments, $options, $input_headers, $output_headers);
print_r($output_headers); // Array of response headers
}
// If you are using WSDL you need this, so you still can call functions directly without calling __soapCall manualy
public function __call($func, $args)
{
return $this->__soapCall($func, $args);
}
?>
----
Server IP: 69.147.83.197
Probable Submitter: 83.99.168.145
----
Manual Page -- http://www.php.net/manual/en/soapclient.soapcall.php
Edit -- https://master.php.net/note/edit/102387
Del: integrated -- https://master.php.net/note/delete/102387/integrated
Del: useless -- https://master.php.net/note/delete/102387/useless
Del: bad code -- https://master.php.net/note/delete/102387/bad+code
Del: spam -- https://master.php.net/note/delete/102387/spam
Del: non-english -- https://master.php.net/note/delete/102387/non-english
Del: in docs -- https://master.php.net/note/delete/102387/in+docs
Del: other reasons-- https://master.php.net/note/delete/102387
Reject -- https://master.php.net/note/reject/102387
Search -- https://master.php.net/manage/user-notes.php