android - Passing parameters to web service method in c# -


I am developing an Android application .. which will send location data to the web service to store in the server database.

In Java: I have used this protocol, so URI: HTTP request instead of REST

  http post request = new HTTP post ("http: // trafficmapsa .com / GService.asmx / GPSdata? Lon = "+ Lon +" & Lat = "+ Lat +" and speed = "+ speed); Asp.net (c #) web service will be in: 

 [WebMethod] Public countryname GPSdata (double lawn, double wave, double speed) {String ConnStr = ConfigurationManager.ConnectionStrings ["TrafficMapConnectionString"] ConnectionString SqlConnection myConnection = New SqlConnection (ConnStr); SqlCommand myCommand = new SqlCommand ("Enter values ​​('" + (@ lane) in Traffic (longitude, latitude, speed, distance, time, MAC_ederator). Toaster () + "', '" + (@wat) .ostring ) + "','" + (@ Speed) .restring ()) ", Mignonation; sql data adapter sadp = new sql data adapter; sadp.SelectCommand = myCommand; myConnection.Open (); dataset ds = new dataset () ; MyCommand.ExecuteNonQuery (); myConnection.Close (); 

After passing data from Android .. There is no refund in the back .. and there is no data in the database I have no idea what the problem is.

If you need to use REST instead of ASP.NET Web Services, there is no possibility of ASMX services.


Comments