$tmp XML; array_push($requestPayloadStrings,$requestPayloadString); } try { $serviceClient = new WSClient(); for($i = 0 ; $i < 10; $i++) { $msg = new WSMessage($requestPayloadStrings[$i], array( "to" => "http://localhost/samples/echo_service.php")); $responsePayload = $serviceClient->request($msg); printf("Round %s
",$i); printf("--------
"); printf("Response = %s

", htmlspecialchars($responsePayload->str)); printf("Last Request = %s

",htmlspecialchars($serviceClient->getLastRequest())); printf("Last Response = %s

",htmlspecialchars($serviceClient->getLastResponse())); } } catch (Exception $e) { if ($e instanceof WSFault) { printf("Soap Fault : %s
", $e->Reason()); } else { printf("Fault Message = %s
",$e->getMessage()); } } ?>