<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" >
<soapenv:Header>
<urn:OTAuthentication>
<!--Optional:-->
<urn:AuthenticationToken></urn:AuthenticationToken>
</urn:OTAuthentication>
</soapenv:Header>
<soapenv:Body>
<urn1:GetNodes>
<!--Zero or more repetitions:-->
<urn1:IDs>2005</urn1:IDs>
</urn1:GetNodes>
</soapenv:Body>
</soapenv:Envelope>
<soapenv:Header>
<urn:OTAuthentication>
<!--Optional:-->
<urn:AuthenticationToken></urn:AuthenticationToken>
</urn:OTAuthentication>
</soapenv:Header>
class Token {
public $id;
public function __construct($id) {
$this->id = $id;
}
}
$header = new SoapHeader("пространство имен, которому принаджеит: urn", "OTAuthentication", new Token('id'), false);
$client->__setSoapHeaders(array($header));
$strHeaderComponent_Session = "<ns2:PRostranstvo><ns2:AuthenticationToken>$token</ns2:AuthenticationToken></ns2:PRostranstvo>";
$objVar_Session_Inside = new SoapVar($strHeaderComponent_Session, XSD_ANYXML, null, null, null);
$objHeader_Session_Outside = new SoapHeader('urn:burum burum', 'PRostranstvo', $objVar_Session_Inside);
$this->client->__setSoapHeaders([$objHeader_Session_Outside]);