lib/AdobeMarketingCloud/HttpClient/SoapClient.php
protected function doRequest($url, array $parameters = array(), $httpMethod = 'GET', array $options = array())
    {
        $headers = isset($options['headers']) ? $options['headers'] : array();

        if ($auth = $this->getAuthService()) {
            $options['url'] = $url;
            $options['http_method'] = $httpMethod;
            list($headers, $parameters) = $auth->setAuthHeadersAndParameters($headers, $parameters, $options);
        }

        // parse out the method being requested
        $parts = parse_url($url);
        parse_str($parts['query'], $query);
        $method = $query['method'];

        $soapHeaders = $this->createSoapAuthHeader($headers);
        $soap = $this->getSoapClient($options);

        $template = $this->getMethodParameters($soap, $method);
        $parameters = $this->orderParameters($parameters, $template);
        $error = null;
        $response = null;

        try {
            $response = $soap->__soapCall($method, $parameters, null, $soapHeaders);
        } catch (SoapFault $e) {
            if ($e->faultcode == 'Server') {
                $error = $e->getMessage();
            } else {
                $response = array(
                    'error' => $e->faultcode == 'Client' ? 'Bad Request' : $e->faultcode,
                    'error_description' => $e->getMessage(),
                );
            }
        }

        return array(
            'response' => $soap->__getLastResponse(),
            'response_obj' => $response,
            'headers'  => $soap->__getLastResponseHeaders(),
            'errorMessage' => $error,
        );
    }
protected function doRequest($url, array $parameters = array(), $httpMethod = 'GET', array $options = array())
    {
        $headers = isset($options['headers']) ? $options['headers'] : array();

        if ($auth = $this->getAuthService()) {
            $options['url'] = $url;
            $options['http_method'] = $httpMethod;
            list($headers, $parameters) = $auth->setAuthHeadersAndParameters($headers, $parameters, $options);
        }

        // parse out the method being requested
        $parts = parse_url($url);
        parse_str($parts['query'], $query);
        $method = $query['method'];

        $soapHeaders = $this->createSoapAuthHeader($headers);
        $soap = $this->getSoapClient($options);

        $template = $this->getMethodParameters($soap, $method);
        $parameters = $this->orderParameters($parameters, $template);
        $error = null;
        $response = null;

        try {
            $response = $soap->__soapCall($method, $parameters, null, $soapHeaders);
        } catch (SoapFault $e) {
            if ($e->faultcode == 'Server') {
                $error = $e->getMessage();
            } else {
                $response = array(
                    'error' => $e->faultcode == 'Client' ? 'Bad Request' : $e->faultcode,
                    'error_description' => $e->getMessage(),
                );
            }
        }

        return array(
            'response' => $soap->__getLastResponse(),
            'response_obj' => $response,
            'headers'  => $soap->__getLastResponseHeaders(),
            'errorMessage' => $error,
        );
    }
Send a request to the server, receive a response

@param  string   $apiPath       Request API path
@param  array    $parameters    Parameters
@param  string   $httpMethod    HTTP method to use

@return string   HTTP response