SoapHeader::SoapHeader

(no version information, might be only in CVS)

SoapHeader::SoapHeader --  SoapHeader constructor

Description

SoapHeader SoapHeader::SoapHeader ( string namespace, string name [, mixed data [, bool mustUnderstand [, mixed actor]]])

SoapHeader is a special low-level class for passing or returning SOAP headers. It is just a data holder and it does not have any special methods except a constructor. It can be used in the SoapClient::__call() method to pass a SOAP header or in a SOAP header handler to return the header in a SOAP response. namespace and name are namespace and name of the SOAP header element. data is a SOAP header's content. It can be a PHP value or SoapVar object. mustUnderstand and actor are values for mustUnderstand and actor attributes of this SOAP Header element.

Example 1. Some examples

<?php
$client
= new SoapClient(null, array('location' => "http://localhost/soap.php",
                                     
'uri'      => "http://test-uri/"));
$client->__call("echoVoid", null, null,
                new
SoapHeader('http://soapinterop.org/echoheader/',
                               
'echoMeStringRequest',
                               
'hello world'));
?>

See also SoapClient::__call(), SoapParam::SoapParam(), and SoapVar::SoapVar().