Hi,
I have implemented a WCF service hosted on Windows Service. I want to consume it with PHP. Everything works OK for now, but problem is when I stop my win. service.
Consuming it with .NET application I get EndpointNotFoundException. But using PHP I get HTTP Error 500.0 - Internal Server Error
This is my PHP code:
<?php
header('Content-Type: text/plain');
try
{
$client = new
SoapClient(
"http://localhost:8000/TestService/service?wsdl"
);
$webService = $client->CheckStatus();
$wsResult = $webService->CheckStatusResult;
print $wsResult;
}
catch (Exception $e)
{
print "Caught exception: " . $e->getMessage(). "\n";
} ?>
My question is: how to check if endpoint is accessible, because error I described occurs after timeout. I want to quickly check this, and not get internal server error