[eluser]CARP[/eluser]
Hi
I'm trying to make a test for a webservice. I've found a free webservice for weather information, but I can't make it work. I have to make it work through a proxy, but I guess this time proxy is working, because the errors I get are not related to it
I have this code in my soap/index controller
Code:
try
{
$url = 'http://www.webservicex.net/globalweather.asmx?WSDL';
$conn_params = array(
'proxy_host' => '10.2.0.1',
'proxy_port' => '6588'
);
$serv_params = array(
'CityName' => 'San Juan',
'CountryName' => 'Argentina'
);
$client = new SoapClient($url, $conn_params);
$client->__soapCall('GetWeather', $serv_params);
}
catch (Exception $e) {
echo "Error!<br />";
echo $e -> getMessage ();
}
I'm getting all these errors
Quote:Error!
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(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at WebServicex.GlobalWeather.GetWeather(String CityName, String CountryName) --- End of inner exception stack trace ---
Does any1 know what I'm doing badly? Am I sending or calling the functions in bad way?
Thanks