Código PHP:
<?php
include 'lib/nusoap.php';
$name = "Telefono";
$ns="http://www.servinformacion.com/geo/personalizados/geomarketing/ws/".$name;
$server = new soap_server();
$server->configureWSDL($name,$ns);
$server->wsdl->schemaTargetNamespace=$ns;
$server->register("getDataFromPhone",array("phone" => "xsd:string"),array("arrayResult" => "xsd:string"));
function getDataFromPhone($phone)
{
if ($phone == '6480461')
{
$arrayResult["direccion"] = "Cl 151 14 80";
$arrayResult["titular"] = "Don Raul Hernandez";
}
else
{
$arrayResult["error"] = "telefono no valido";
}
return $arrayResult;
// return implode(";", $arrayResult);
}
$server->service($HTTP_RAW_POST_DATA);
?>
Código PHP:
<?php
include 'lib/nusoap.php';
$cliente = new soapclient('http://www.servinformacion.com/geo/personalizados/geomarketing/ws/server.php?wsdl');
$resultado = $cliente->call("getDataFromPhone", array('phone' =>'6480461'));
$resultado = explode(";",$resultado);
if (count($resultado) == 2)
{
echo "<pre>";
print_r($resultado);
echo "</pre>";
}
else
{
echo "TELEFONO NO VALIDO";
}
?>
Fatal error: Uncaught SoapFault exception: [Client] Function ("call") is not a valid method for this service in C:\ms4w\Apache\htdocs\portalDiveo\geo\personalizad os\geomarketing\ws\client.php:5 Stack trace: #0 [internal function]: SoapClient->__call('call', Array) #1 C:\ms4w\Apache\htdocs\portalDiveo\geo\personalizad os\geomarketing\ws\client.php(5): SoapClient->call('getDataFromPhon...', Array) #2 {main} thrown in C:\ms4w\Apache\htdocs\portalDiveo\geo\personalizad os\geomarketing\ws\client.php on line 5
y pues no he podido encontrar la solucion a este problema, ni entiendo de que se trata