Ver Mensaje Individual
  #3 (permalink)  
Antiguo 03/01/2013, 13:27
Avatar de enlinea777
enlinea777
 
Fecha de Ingreso: mayo-2008
Ubicación: frente al pc
Mensajes: 1.830
Antigüedad: 16 años, 9 meses
Puntos: 127
Respuesta: Problema con respuesta de nusoap

Prueba esto

Código PHP:
Error_reporting(0);
require_once('lib/nusoap.php');
 
$ciudad=$_POST["ciudad"];
$pais=$_POST["pais"]; 


$wsdl = 'http://www.webservicex.net/globalweather.asmx?wsdl';

$soapclient = new nusoap_client($wsdl,true);

$function = 'GetWeather';

$params = array('CityName' => $ciudad,'CountryName' => $pais);

$result = $soapclient->call($function , $params);
 
$xml=$result['GetWeatherResult'];
$xml=str_replace('<?xml version="1.0" encoding="utf-16"?>',"",$xml);
$xml=simplexml_load_string($xml);
$xml=(array)$xml;
foreach($xml as $K=>$V){
    $data.=$K.": ".$V."<br>";
}
echo "<pre>".$data."</pre>";
este es el resultado http://creaelicita.cl/ayuda/foro_1030122.php