(PHP 5 >= 5.0.5, PHP 7)
Sets SOAP headers for subsequent calls
public bool SoapClient::__setSoapHeaders ([ mixed $soapheaders ] )
Defines headers to be sent along with the SOAP requests.
Note:
Calling this method will replace any previous values.
Parameters:
soapheaders
The headers to be set. It could be SoapHeader object or array of SoapHeader objects. If not specified or set to NULL
, the headers will be deleted.
Returns:
Returns TRUE
on success or FALSE
on failure.
Examples:
SoapClient::__setSoapHeaders() example
1 2 3 4 5 6 7 8 9 10 11 12 | <?php 'echoMeStringRequest' , 'hello world' ); $client ->__setSoapHeaders( $header ); $client ->__soapCall( "echoVoid" , null); ?> |
Set Multiple Headers
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | <?php $headers = array (); 'echoMeStringRequest' , 'hello world' ); 'echoMeStringRequest' , 'hello world again' ); $client ->__setSoapHeaders( $headers ); $client ->__soapCall( "echoVoid" , null); ?> |
Please login to continue.