src/ET_Client.php
function __doRequest($request, $location, $saction, $version, $one_way = 0) 
	{
		$doc = new DOMDocument();
		$doc->loadXML($request);
		$objWSSE = new WSSESoap($doc);
		$objWSSE->addUserToken("*", "*", FALSE);
		$this->addOAuth($doc, $this->getInternalAuthToken($this->tenantKey));
				
		$content = $objWSSE->saveXML();
		$content_length = strlen($content);
		if ($this->debugSOAP){
			error_log ('FuelSDK SOAP Request: ');
			error_log (str_replace($this->getInternalAuthToken($this->tenantKey),"REMOVED",$content));
		}
		
		$headers = array("Content-Type: text/xml","SOAPAction: ".$saction, "User-Agent: ".ET_Util::getSDKVersion());

		$ch = curl_init();
		curl_setopt ($ch, CURLOPT_URL, $location);
		curl_setopt ($ch, CURLOPT_HTTPHEADER, $headers);
		curl_setopt ($ch, CURLOPT_POSTFIELDS, $content);
		curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
		curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, ET_Util::shouldVerifySslPeer($this->sslVerifyPeer));
		curl_setopt($ch, CURLOPT_USERAGENT, ET_Util::getSDKVersion());

		if (!empty($this->proxyHost)) {
			curl_setopt($ch, CURLOPT_PROXY, $this->proxyHost);
		}
		if (!empty($this->proxyPort)) {
			curl_setopt($ch, CURLOPT_PROXYPORT, $this->proxyPort);
		}
		if (!empty($this->proxyUserName) && !empty($this->proxyPassword)) {
			curl_setopt($ch, CURLOPT_PROXYAUTH, CURLAUTH_BASIC);
			curl_setopt($ch, CURLOPT_PROXYUSERPWD, $this->proxyUserName.':'.$this->proxyPassword);
		}

		$output = curl_exec($ch);
		$this->lastHTTPCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
		curl_close($ch); 

		return $output;
	}
function __doRequest($request, $location, $saction, $version, $one_way = 0) 
	{
		$doc = new DOMDocument();
		$doc->loadXML($request);
		$objWSSE = new WSSESoap($doc);
		$objWSSE->addUserToken("*", "*", FALSE);
		$this->addOAuth($doc, $this->getInternalAuthToken($this->tenantKey));
				
		$content = $objWSSE->saveXML();
		$content_length = strlen($content);
		if ($this->debugSOAP){
			error_log ('FuelSDK SOAP Request: ');
			error_log (str_replace($this->getInternalAuthToken($this->tenantKey),"REMOVED",$content));
		}
		
		$headers = array("Content-Type: text/xml","SOAPAction: ".$saction, "User-Agent: ".ET_Util::getSDKVersion());

		$ch = curl_init();
		curl_setopt ($ch, CURLOPT_URL, $location);
		curl_setopt ($ch, CURLOPT_HTTPHEADER, $headers);
		curl_setopt ($ch, CURLOPT_POSTFIELDS, $content);
		curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
		curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, ET_Util::shouldVerifySslPeer($this->sslVerifyPeer));
		curl_setopt($ch, CURLOPT_USERAGENT, ET_Util::getSDKVersion());

		if (!empty($this->proxyHost)) {
			curl_setopt($ch, CURLOPT_PROXY, $this->proxyHost);
		}
		if (!empty($this->proxyPort)) {
			curl_setopt($ch, CURLOPT_PROXYPORT, $this->proxyPort);
		}
		if (!empty($this->proxyUserName) && !empty($this->proxyPassword)) {
			curl_setopt($ch, CURLOPT_PROXYAUTH, CURLAUTH_BASIC);
			curl_setopt($ch, CURLOPT_PROXYUSERPWD, $this->proxyUserName.':'.$this->proxyPassword);
		}

		$output = curl_exec($ch);
		$this->lastHTTPCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
		curl_close($ch); 

		return $output;
	}
function __doRequest ( $ request , $ location , $ saction , $ version , $ one_way = 0 ) { $ doc = new DOMDocument ( ) ; $ doc -> loadXML ( $ request ) ; $ objWSSE = new WSSESoap ( $ doc ) ; $ objWSSE -> addUserToken ( "*" , "*" , FALSE ) ; $ this -> addOAuth ( $ doc , $ this -> getInternalAuthToken ( $ this -> tenantKey ) ) ; $ content = $ objWSSE -> saveXML ( ) ; $ content_length = strlen ( $ content ) ; if ( $ this -> debugSOAP ) { error_log ( 'FuelSDK SOAP Request: ' ) ; error_log ( str_replace ( $ this -> getInternalAuthToken ( $ this -> tenantKey ) , "REMOVED" , $ content ) ) ; } $ headers = array ( "Content-Type: text/xml" , "SOAPAction: " . $ saction , "User-Agent: " . ET_Util :: getSDKVersion ( ) ) ; $ ch = curl_init ( ) ; curl_setopt ( $ ch , CURLOPT_URL , $ location ) ; curl_setopt ( $ ch , CURLOPT_HTTPHEADER , $ headers ) ; curl_setopt ( $ ch , CURLOPT_POSTFIELDS , $ content ) ; curl_setopt ( $ ch , CURLOPT_RETURNTRANSFER , 1 ) ; curl_setopt ( $ ch , CURLOPT_SSL_VERIFYPEER , ET_Util :: shouldVerifySslPeer ( $ this -> sslVerifyPeer ) ) ; curl_setopt ( $ ch , CURLOPT_USERAGENT , ET_Util :: getSDKVersion ( ) ) ; if ( ! empty ( $ this -> proxyHost ) ) { curl_setopt ( $ ch , CURLOPT_PROXY , $ this -> proxyHost ) ; } if ( ! empty ( $ this -> proxyPort ) ) { curl_setopt ( $ ch , CURLOPT_PROXYPORT , $ this -> proxyPort ) ; } if ( ! empty ( $ this -> proxyUserName ) && ! empty ( $ this -> proxyPassword ) ) { curl_setopt ( $ ch , CURLOPT_PROXYAUTH , CURLAUTH_BASIC ) ; curl_setopt ( $ ch , CURLOPT_PROXYUSERPWD , $ this -> proxyUserName . ':' . $ this -> proxyPassword ) ; } $ output = curl_exec ( $ ch ) ; $ this -> lastHTTPCode = curl_getinfo ( $ ch , CURLINFO_HTTP_CODE ) ; curl_close ( $ ch ) ; return $ output ; }
Perfoms an soap request.

@param string $request Soap request xml
@param string $location Url as string
@param string $saction Soap action name
@param string $version Future use
@param integer $one_way Future use
@return string Soap web service request result
Perfoms an soap request .