This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function simulateSoapRequest($request, $location, $action, $version) | |
{ | |
$client = new Zend_Http_Client($location); | |
$adapter = new Zend_Http_Client_Adapter_Curl(); | |
$client->setAdapter($adapter); | |
$adapter->setCurlOption(CURLOPT_TIMEOUT, $this->_timeout); | |
$client->setMethod(Zend_Http_Client::POST); | |
$client->setHeaders('Content-Type', $version == 2 ? 'application/soap+xml' : 'text/xml'); | |
$client->setHeaders('SOAPAction', $action); |