public function request(
        DOMDocument $doc,
        $xsdName,
        $uri,
        $timeout = self::DEFAULT_TIMEOUT,
        $adapter = self::DEFAULT_ADAPTER,
        Zend_Http_Client $client = null,
        $apiKey = null
    ) {
        if (!$apiKey) {
            $apiKey = Mage::helper('radial_core')->getConfigModel()->apiKey;
        }
        $xmlStr = $doc->C14N();
        $logData = array_merge(['rom_request_body' => $xmlStr], $this->_logAppContext);
        $logMessage = 'Validating request.';
        $this->_logger->debug($logMessage, $this->_context->getMetaData(__CLASS__, $logData));

        $this->schemaValidate($doc, $xsdName);
        $client = $this->_setupClient($client, $apiKey, $uri, $xmlStr, $adapter, $timeout);
        $logData = array_merge(['rom_request_url' => $uri], $this->_logAppContext);
        $logMessage = 'Sending request.';
        $this->_logger->info($logMessage, $this->_context->getMetaData(__CLASS__, $logData));

        try {
            $response = $client->request(self::DEFAULT_METHOD);
            return $this->_processResponse($response, $uri);
        } catch (Zend_Http_Client_Exception $e) {
            return $this->_processException($e, $uri);
        }
    }
public function request(
        DOMDocument $doc,
        $xsdName,
        $uri,
        $timeout = self::DEFAULT_TIMEOUT,
        $adapter = self::DEFAULT_ADAPTER,
        Zend_Http_Client $client = null,
        $apiKey = null
    ) {
        if (!$apiKey) {
            $apiKey = Mage::helper('radial_core')->getConfigModel()->apiKey;
        }
        $xmlStr = $doc->C14N();
        $logData = array_merge(['rom_request_body' => $xmlStr], $this->_logAppContext);
        $logMessage = 'Validating request.';
        $this->_logger->debug($logMessage, $this->_context->getMetaData(__CLASS__, $logData));

        $this->schemaValidate($doc, $xsdName);
        $client = $this->_setupClient($client, $apiKey, $uri, $xmlStr, $adapter, $timeout);
        $logData = array_merge(['rom_request_url' => $uri], $this->_logAppContext);
        $logMessage = 'Sending request.';
        $this->_logger->info($logMessage, $this->_context->getMetaData(__CLASS__, $logData));

        try {
            $response = $client->request(self::DEFAULT_METHOD);
            return $this->_processResponse($response, $uri);
        } catch (Zend_Http_Client_Exception $e) {
            return $this->_processException($e, $uri);
        }
    }
public function request ( DOMDocument $ doc , $ xsdName , $ uri , $ timeout = self :: DEFAULT_TIMEOUT , $ adapter = self :: DEFAULT_ADAPTER , Zend_Http_Client $ client = null , $ apiKey = null ) { if ( ! $ apiKey ) { $ apiKey = Mage :: helper ( 'radial_core' ) -> getConfigModel ( ) -> apiKey ; } $ xmlStr = $ doc -> C14N ( ) ; $ logData = array_merge ( [ 'rom_request_body' => $ xmlStr ] , $ this -> _logAppContext ) ; $ logMessage = 'Validating request.' ; $ this -> _logger -> debug ( $ logMessage , $ this -> _context -> getMetaData ( __CLASS__ , $ logData ) ) ; $ this -> schemaValidate ( $ doc , $ xsdName ) ; $ client = $ this -> _setupClient ( $ client , $ apiKey , $ uri , $ xmlStr , $ adapter , $ timeout ) ; $ logData = array_merge ( [ 'rom_request_url' => $ uri ] , $ this -> _logAppContext ) ; $ logMessage = 'Sending request.' ; $ this -> _logger -> info ( $ logMessage , $ this -> _context -> getMetaData ( __CLASS__ , $ logData ) ) ; try { $ response = $ client -> request ( self :: DEFAULT_METHOD ) ; return $ this -> _processResponse ( $ response , $ uri ) ; } catch ( Zend_Http_Client_Exception $ e ) { return $ this -> _processException ( $ e , $ uri ) ; } }
Call the API.

@param DOMDocument $doc The document to send in the request body
@param string $xsdName The basename of the xsd file to validate $doc (The dirname is in config.xml)
@param string $uri The uri to send the request to
@param int $timeout The amount of time in seconds after which the connection is terminated
@param string $adapter The classname of a Zend_Http_Client_Adapter
@param Zend_Http_Client $client
@param string $apiKey Alternate API Key to use
@return string The response from the server
Call the API .