2015-03-25 60 views
0

我想消費使用肥皂格式xamarin的Android應用程序的網絡服務,下面是我的代碼:如何在android xamarin項目中使用.net web服務(.asmx)?

System.Net.ServicePointManager.Expect100Continue = false; 
TempConversionService.TempConvert tempConvert = new TempConversionService.TempConvert();     
tempConvert.Url = "http://www.w3schools.com/webservices/tempconvert.asmx"; 
Button button = FindViewById<Button>(Resource.Id.MyButton); 
button.Text = tempConvert.CelsiusToFahrenheit("50"); 

我試圖消耗sample web service,但每次我得到403禁止/ 404 Not Found錯誤可以任何一個請讓我知道是什麼問題

回答