i build a web service with .net
http://ofir0803.somee.com/Service1.asmx
and i am tryinn to call him with php
http://ofir0803.200u.com/britannia/client.php
but i keep getting a error:
this is the client.php code:wsdl error: HTTP ERROR: Couldn't open socket connection
to server http://www.ofir0803.somee.com/Service1.asmx?WSDL prior to connect().
This is often a problem looking up the host name.
Code: Select all
<?php
require_once("../nusoap/nusoap.php");
$client = new nusoap_client("http://www.ofir0803.somee.com/Service1.asmx?WSDL", "wsdl",”, ”, ”, ”);
$err = $client->getError();
if ($err) {
echo "<h2>Constructor error</h2><pre>" . $err . "</pre>";
}
$param = "";
$result = $client->call("functionName", $param, ”, ”, false, true);
if ($client->fault) {
echo "<h2>Fault</h2><pre>";
print_r($result);
echo "</pre>";
} else {
// Check for errors
$err = $client->getError();
if ($err) {
// Display the error
echo "<h2>Error</h2><pre>" . $err . "</pre>";
} else {
// Display the result
echo "<h2>Result</h2><pre>";
print_r($result);
echo "</pre>";
}
}
?>Please help