public static function getSoapHeaderValue($xml, $soapHeaderName)
    {
        $headerValue = '';

        if ($xml === null || $xml === '') {
            return $headerValue;
        }

        $xmlReader = new XMLReader();
        $xmlReader->xml($xml);
        while ($xmlReader->read()) {
            if ($xmlReader->nodeType === XMLReader::ELEMENT
                && $xmlReader->localName === $soapHeaderName) {
                $xmlReader->read();
                $headerValue = $xmlReader->value;
            } elseif ($xmlReader->nodeType === XMLReader::END_ELEMENT
                && $xmlReader->localName === self::$SOAP_HEADER_NODE_NAME) {
                break;
            }
        }
        $xmlReader->close();

        return $headerValue;
    }