Hello World!
XML;
try {
$client = new WSClient( array("to" => "http://localhost/samples/echo_service_with_rest.php/echoString",
"useSOAP" => FALSE,
"HTTPMethod" => "GET"));
$responseMessage = $client->request($requestPayloadString);
printf("Response = %s
", htmlspecialchars($responseMessage->str));
} catch (Exception $e) {
if ($e instanceof WSFault) {
printf("Error String: %s\n", $e->str);
printf("HTTP Code : %s\n", $e->httpStatusCode);
} else {
printf("Message = %s\n",$e->getMessage());
}
}
?>