public function haveSoapHeader($header, $params = [])
    {
        $soap_schema_url = $this->config['schema_url'];
        $xml = $this->xmlRequest;
        $xmlHeader = $xml->documentElement->getElementsByTagNameNS($soap_schema_url, 'Header')->item(0);
        $headerEl = $xml->createElement($header);
        SoapUtils::arrayToXml($xml, $headerEl, $params);
        $xmlHeader->appendChild($headerEl);
    }
public function haveSoapHeader($header, $params = [])
    {
        $soap_schema_url = $this->config['schema_url'];
        $xml = $this->xmlRequest;
        $xmlHeader = $xml->documentElement->getElementsByTagNameNS($soap_schema_url, 'Header')->item(0);
        $headerEl = $xml->createElement($header);
        SoapUtils::arrayToXml($xml, $headerEl, $params);
        $xmlHeader->appendChild($headerEl);
    }
public function haveSoapHeader ( $ header , $ params = [ ] ) { $ soap_schema_url = $ this -> config [ 'schema_url' ] ; $ xml = $ this -> xmlRequest ; $ xmlHeader = $ xml -> documentElement -> getElementsByTagNameNS ( $ soap_schema_url , 'Header' ) -> item ( 0 ) ; $ headerEl = $ xml -> createElement ( $ header ) ; SoapUtils :: arrayToXml ( $ xml , $ headerEl , $ params ) ; $ xmlHeader -> appendChild ( $ headerEl ) ; }
Prepare SOAP header.
Receives header name and parameters as array.

Example:

``` php
<?php
$I->haveSoapHeader('AuthHeader', array('username' => 'davert', 'password' => '123345'));
```

Will produce header:

```
<soapenv:Header>
<SessionHeader>
<AuthHeader>
<username>davert</username>
<password>12345</password>
</AuthHeader>
</soapenv:Header>
```

@param $header
@param array $params
Prepare SOAP header . Receives header name and parameters as array .