public function __doRequest($request, $location, $action, $version, $oneWay = 0)
    {
        LogHandler::log([
            'location' => $location,
            'xml' => $request
        ], LoggerInterface::LEVEL_INFO, 'unsigned_request_raw');

        $doc = new DOMDocument('1.0');
        $doc->loadXML($request);
        $objWSSE = new WSSESoap($doc);
        $objKey = new XMLSecurityKey(XMLSecurityKey::RSA_SHA1, array('type' =>
            'private'));
        $objKey->loadKey($this->getPrivateKey());
        $options = array("insertBefore" => true);
        $objWSSE->signSoapDoc($objKey, $options);
        $objWSSE->addIssuerSerial($this->getCertificate());
        $objKey = new XMLSecurityKey(XMLSecurityKey::AES256_CBC);
        $objKey->generateSessionKey();

        $signed_request = $objWSSE->saveXML();
        LogHandler::log([
            'location' => $location,
            'xml' => $signed_request
        ], LoggerInterface::LEVEL_INFO, 'signed_request_raw');

        $retVal = parent::__doRequest(
            $signed_request,
            $location,
            $action,
            $version,
            $oneWay
        );
        $doc = new DOMDocument();
        $doc->loadXML($retVal);
        LogHandler::log([
            'location' => $location,
            'xml' => $retVal
        ], LoggerInterface::LEVEL_INFO, 'response_raw');
        return $doc->saveXML();
    }
public function __doRequest($request, $location, $action, $version, $oneWay = 0)
    {
        LogHandler::log([
            'location' => $location,
            'xml' => $request
        ], LoggerInterface::LEVEL_INFO, 'unsigned_request_raw');

        $doc = new DOMDocument('1.0');
        $doc->loadXML($request);
        $objWSSE = new WSSESoap($doc);
        $objKey = new XMLSecurityKey(XMLSecurityKey::RSA_SHA1, array('type' =>
            'private'));
        $objKey->loadKey($this->getPrivateKey());
        $options = array("insertBefore" => true);
        $objWSSE->signSoapDoc($objKey, $options);
        $objWSSE->addIssuerSerial($this->getCertificate());
        $objKey = new XMLSecurityKey(XMLSecurityKey::AES256_CBC);
        $objKey->generateSessionKey();

        $signed_request = $objWSSE->saveXML();
        LogHandler::log([
            'location' => $location,
            'xml' => $signed_request
        ], LoggerInterface::LEVEL_INFO, 'signed_request_raw');

        $retVal = parent::__doRequest(
            $signed_request,
            $location,
            $action,
            $version,
            $oneWay
        );
        $doc = new DOMDocument();
        $doc->loadXML($retVal);
        LogHandler::log([
            'location' => $location,
            'xml' => $retVal
        ], LoggerInterface::LEVEL_INFO, 'response_raw');
        return $doc->saveXML();
    }
public function __doRequest ( $ request , $ location , $ action , $ version , $ oneWay = 0 ) { LogHandler :: log ( [ 'location' => $ location , 'xml' => $ request ] , LoggerInterface :: LEVEL_INFO , 'unsigned_request_raw' ) ; $ doc = new DOMDocument ( '1.0' ) ; $ doc -> loadXML ( $ request ) ; $ objWSSE = new WSSESoap ( $ doc ) ; $ objKey = new XMLSecurityKey ( XMLSecurityKey :: RSA_SHA1 , array ( 'type' => 'private' ) ) ; $ objKey -> loadKey ( $ this -> getPrivateKey ( ) ) ; $ options = array ( "insertBefore" => true ) ; $ objWSSE -> signSoapDoc ( $ objKey , $ options ) ; $ objWSSE -> addIssuerSerial ( $ this -> getCertificate ( ) ) ; $ objKey = new XMLSecurityKey ( XMLSecurityKey :: AES256_CBC ) ; $ objKey -> generateSessionKey ( ) ; $ signed_request = $ objWSSE -> saveXML ( ) ; LogHandler :: log ( [ 'location' => $ location , 'xml' => $ signed_request ] , LoggerInterface :: LEVEL_INFO , 'signed_request_raw' ) ; $ retVal = parent :: __doRequest ( $ signed_request , $ location , $ action , $ version , $ oneWay ) ; $ doc = new DOMDocument ( ) ; $ doc -> loadXML ( $ retVal ) ; LogHandler :: log ( [ 'location' => $ location , 'xml' => $ retVal ] , LoggerInterface :: LEVEL_INFO , 'response_raw' ) ; return $ doc -> saveXML ( ) ; }
Execute SOAP request

@param string $request request XML
@param string $location request URL
@param string $action SOAP action
@param int $version SOAP version
@param int $oneWay Indicates whether there will be a return
@return string
@throws \Exception
Execute SOAP request