Hello World! XML; try { $client = new WSClient(array("to"=>"http://localhost/samples/echo_service.php", "useSOAP"=>1.1)); $responseMessage = $client->request($requestPayloadString); printf("Response = %s
", htmlspecialchars($responseMessage->str)); } catch (Exception $e) { if ($e instanceof WSFault) { printf("Soap Fault: %s\n", $e->Reason); } else { printf("Message = %s\n",$e->getMessage()); } } ?>