function soap_transport_http::sendRequest in Salesforce Suite 5
Same name in this branch
- 5 includes/nusoap.php \soap_transport_http::sendRequest()
- 5 includes/nusoap.orig.php \soap_transport_http::sendRequest()
Same name and namespace in other branches
- 5.2 includes/nusoap.php \soap_transport_http::sendRequest()
- 5.2 includes/nusoap.orig.php \soap_transport_http::sendRequest()
2 calls to soap_transport_http::sendRequest()
- soap_transport_http::send in includes/nusoap.php
- * send the SOAP message via HTTP
*
*
- soap_transport_http::send in includes/nusoap.orig.php
- * send the SOAP message via HTTP
*
*
File
- includes/nusoap.php, line 2503
Class
- soap_transport_http
- transport class for sending/receiving data via HTTP and HTTPS
NOTE: PHP must be compiled with the CURL extension for HTTPS support
Code
function sendRequest($data, $cookies = NULL) {
$cookie_str = $this
->getCookiesForRequest($cookies, $this->scheme == 'ssl' || $this->scheme == 'https');
$this
->buildPayload($data, $cookie_str);
if ($this->scheme == 'http' || $this->scheme == 'ssl') {
if (!fputs($this->fp, $this->outgoing_payload, strlen($this->outgoing_payload))) {
$this
->setError('couldn\'t write message data to socket');
$this
->debug('couldn\'t write message data to socket');
return false;
}
$this
->debug('wrote data to socket, length = ' . strlen($this->outgoing_payload));
return true;
}
else {
if ($this->scheme == 'https') {
foreach ($this->outgoing_headers as $k => $v) {
$curl_headers[] = "{$k}: {$v}";
}
if ($cookie_str != '') {
$curl_headers[] = 'Cookie: ' . $cookie_str;
}
curl_setopt($this->ch, CURLOPT_HTTPHEADER, $curl_headers);
if ($this->request_method == "POST") {
curl_setopt($this->ch, CURLOPT_POST, 1);
curl_setopt($this->ch, CURLOPT_POSTFIELDS, $data);
}
else {
}
$this
->debug('set cURL payload');
return true;
}
}
}