Ver Mensaje Individual
  #1 (permalink)  
Antiguo 04/01/2011, 22:36
jorge_anibal
 
Fecha de Ingreso: marzo-2003
Mensajes: 164
Antigüedad: 21 años, 1 mes
Puntos: 0
Error en ejemplo de soap con php5

Buen dia, de antemano gracias por la antencion y/o colaboracion.

Estoy explorando sobre soap con php5 y estoy elaborando un programa, este es el programa.

$wsdl = "http://www.webservicex.net/globalweather.asmx?wsdl";
$Soap = new SoapClient($wsdl);
//1ro
echo "<pre>";
print_r ($Soap->__getFunctions());
echo "</pre>";
//2do
echo "<pre>";
print_r ( $Soap->GetWeather("medellin","colombia"));
echo "</pre>";

-En el primer print el me muestra las funciones del webservice y este funciona bien.
-En el 2do print el llama una de las funciones con unos parametros, pero en este me sale el siguiente error.

Fatal error: Uncaught SoapFault exception: [soap:Server] System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Data.SqlClient.SqlException: Procedure or function 'getWeather' expects parameter '@CountryName', which was not supplied.
at System.Data.SqlClient.SqlConnection.OnError(SqlExc eption exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteRead er(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderT ds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClie in C:\AppServ\www\Wsphp5\Ws1.php on line 11

Alguien me podria guiar con este error

de nuevo gracias por la atencion y colaboracion prestada.