1
我使用xamarin studio來構建我的第一個android應用程序,以使用web服務,並且我無法在文檔中找到任何幫助: 單擊here!c# - 使用Xamarin.droid消耗肥皂web服務
我想觀看一些影片,所有我發現是關於xamarin.forms
我使用xamarin studio來構建我的第一個android應用程序,以使用web服務,並且我無法在文檔中找到任何幫助: 單擊here!c# - 使用Xamarin.droid消耗肥皂web服務
我想觀看一些影片,所有我發現是關於xamarin.forms
,如果你的服務是不是一個WCF服務,您必須導入Web引用作爲.NET 2.0的Web服務:
調用服務:
Button button = FindViewById<Button> (Resource.Id.myButton);
button.Click += delegate {
SoapApp.www.webservicex.net.GlobalWeather soapservice = new SoapApp.www.webservicex.net.GlobalWeather();
var cities = soapservice.GetCitiesByCountry("peru");
button.Text = cities;
};
這就是結果:
如果它不工作,嘗試這樣做,建立在Visual Studio中的代理在一個新的項目,並將它們複製類的Xamarin Studio項目,我知道這不是最好的方法,但是是一種解決方法。
不要忘記添加System.Web.Services
和System.ServiceModel
參考。
對不起,Xamarin工作室西班牙文版,希望它可以幫助你