We run a simple Apacha / PHP server on CentOS 5.0. One of the PHP scripts I use calls a (PHP) XML Webservice using this call:
echo "<br>Before Encode" . date("H:i:s");
$request = xmlrpc_encode_request($WebService, $InputFieldList, $XMLOptions);
echo "<br>Before Stream Context" . date("H:i:s");
$context = stream_context_create(array('http' => array(
'method' => "POST",
'header' => "Content-Type: text/xml",
'content' => $request)));
echo "<br>Before Get Content" . date("H:i:s");
$XMLReply = file_get_contents($ComplateURL , false, $context);
echo "<br>Before Decode" . date("H:i:s");
$DecodedXMLReply = xmlrpc_decode($XMLReply);
echo "<br>Done" . date("H:i:s");
When this page is diplayed, the difference between the lines "Befor Get Content" - "Before Decode" takes 12 seconds....
If I call exactly the same XML call using a Java Application the same call, to the same server takes < 1 second. I've tried using CURL instead and that makes no difference.
Any suggestions would be very much appreciated.
ASKER