protected void Button2_Click(object sender, EventArgs e) { try { // weather.ndfdXML currentweather = new weather.ndfdXML(); //Console.WriteLine(currentweather);//printing on console for debugging and tracing data lat = Convert.ToDecimal(TextBox1.Text); lng = Convert.ToDecimal(TextBox2.Text); Console.WriteLine(lat); //printing on console for debugging and tracing data //decimal lng = -117.1979M; Console.WriteLine(lng); //printing on console for debugging and tracing data //weather.weatherParametersType Paramtype = new weather.weatherParametersType(); //Console.WriteLine(wtp);//printing on console for debugging and tracing data //Label2.Text =Convert.ToString(paramtype); Paramtype.temp = true; //parameter required from the web service // wind speed Paramtype.wspd = true; //parameter required from the web service //wind Direction Paramtype.wdir = true; //parameter required from the web service //Wave height Paramtype.waveh = true; //parameter required from the web service //dew precipitation Paramtype.dew = true; //parameter required from the web service //ice accumulation Paramtype.iceaccum = true; //parameter required from the web service //max temperature Paramtype.maxt = true; //parameter required from the web service // min temperature Paramtype.mint = true; //parameter required from the web service xmlstmt = currentweather.NDFDgen(lat, lng, weather.productType.timeseries, DateTime.Now, DateTime.Now, weather.unitType.e, Paramtype); //calling web service Console.WriteLine(xmlstmt); //printing on console for debugging and tracing data Console.WriteLine("SOAP Refresh RESPONSE"); //printing on console for debugging and tracing data Label3.Text = xmlstmt; string xmlstmt2 = xmlstmt.Substring(xmlstmt.IndexOf("Temperature")); //stripping required responses from the response string Label2.Text = xmlstmt2; } catch (Exception ee) { Console.WriteLine(ee); } }