foinf
-
Posts
3 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by foinf
-
-
The pbx_soap() function call shown below is taking way too long to respond.
Here's the body of the soap_call has as suggested by the abstract code body given here :
function pbx_soap($req) { $start = microtime(true); global $dbadr, $dbport, $dbdebug; $dbhandle = fsockopen($dbadr, $dbport, $errno, $errstr); if (!$dbhandle) { echo "error hash"; if($dbdebug) echo "$errstr ($errno)<br>\n"; return; } $request = "POST /soap.xml HTTP/1.1\r\n"; $request .= "Content-Type: text/xml\r\n"; $request .= "Content-Length: " . strlen($req) . "\r\n"; $request .= "Connection: close\r\n\r\n"; $request .= $req; //echo $request; //exit; fputs($dbhandle, $request); $data = ""; $count=0; while(!feof($dbhandle)) { $count++; $data.=fread($dbhandle, 128); } fclose($dbhandle); $pos = strpos($data,"\r\n\r\n"); if($pos != false) { $body = substr($data, $pos); return $body; } } // pbx_soap
Every call takes about 6 seconds (As determined by using microtimers.)
Also, the following statistics show how much time is being spent on the pbx_soap calls GREATLY slowing down the web apps.
-
*Resolved*
SOAP calls taking too long.
in Web Interface
Posted
Hello, thanks for your response. Could you provide a sample code or example or at least a few lines of code which Illustrate how to use the modern technique instead of using SOAP?
The documentation (which i have quoted as a link in the OP) only illustrated the call using soap.