public function __doRequest($request, $location, $action, $version, $one_way = false) {

		// Authenticate with SP online in order to get required authentication cookies
		if (!$this->authCookies) $this->configureAuthCookies($location);

		// Set base headers
		$headers = array();
		$headers[] = "Content-Type: text/xml;";
		$headers[] = "SOAPAction: \"{$action}\"";

		$curl = curl_init($location);

		curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
		curl_setopt($curl, CURLOPT_POST, TRUE);

		// Send request and auth cookies.
		curl_setopt($curl, CURLOPT_POSTFIELDS, $request);
		curl_setopt($curl, CURLOPT_COOKIE, $this->authCookies);

		curl_setopt($curl, CURLOPT_TIMEOUT, 10);
		curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);

		// Useful for debugging
		curl_setopt($curl, CURLOPT_VERBOSE,FALSE);
		curl_setopt($curl, CURLOPT_HEADER, FALSE);

		// Add headers
		curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);

		// Init the cURL
		$response = curl_exec($curl);

		// Throw exceptions if there are any issues
		if (curl_errno($curl)) throw new \SoapFault('Receiver', curl_error($curl));
		if ($response == '') throw new \SoapFault('Receiver', "No XML returned");

		// Close CURL
		curl_close($curl);

		// Return?
		if (!$one_way) return ($response);
	}