private function addHeader()
    {
        $auth = '<NS1:Security xmlns:NS1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><NS2:Timestamp xmlns:NS2="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><Created xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">' . date('Y-m-d\TH:i:s.811P') . '</Created><Expires xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">' . date('Y-m-d\TH:i:s.811P',
                time() + (5 * 60)) . '</Expires></NS2:Timestamp><NS1:UsernameToken><Username xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">' . $this->login . '</Username><Password xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">' . $this->password . '</Password></NS1:UsernameToken></NS1:Security>';


        $authvalues = new \SoapVar($auth, XSD_ANYXML);
        $header     = new \SoapHeader("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd",
            "Security", $authvalues, true);

        $this->getSoap()->__setSoapHeaders($header);
    }
private function addHeader()
    {
        $auth = '<NS1:Security xmlns:NS1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><NS2:Timestamp xmlns:NS2="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><Created xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">' . date('Y-m-d\TH:i:s.811P') . '</Created><Expires xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">' . date('Y-m-d\TH:i:s.811P',
                time() + (5 * 60)) . '</Expires></NS2:Timestamp><NS1:UsernameToken><Username xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">' . $this->login . '</Username><Password xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">' . $this->password . '</Password></NS1:UsernameToken></NS1:Security>';


        $authvalues = new \SoapVar($auth, XSD_ANYXML);
        $header     = new \SoapHeader("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd",
            "Security", $authvalues, true);

        $this->getSoap()->__setSoapHeaders($header);
    }
private function addHeader ( ) { $ auth = '<NS1:Security xmlns:NS1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><NS2:Timestamp xmlns:NS2="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><Created xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">' . date ( 'Y-m-d\TH:i:s.811P' ) . '</Created><Expires xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">' . date ( 'Y-m-d\TH:i:s.811P' , time ( ) + ( 5 * 60 ) ) . '</Expires></NS2:Timestamp><NS1:UsernameToken><Username xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">' . $ this -> login . '</Username><Password xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">' . $ this -> password . '</Password></NS1:UsernameToken></NS1:Security>' ; $ authvalues = new \ SoapVar ( $ auth , XSD_ANYXML ) ; $ header = new \ SoapHeader ( "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" , "Security" , $ authvalues , true ) ; $ this -> getSoap ( ) -> __setSoapHeaders ( $ header ) ; }
Adding of auth header
Adding of auth header