how to consume Webservice proxy class in Xamarin.Forms?

MesutDemir.1969MesutDemir.1969 USMember ✭✭
edited January 2017 in Xamarin.Forms

I'm not able to find a clear answer on web nor in forums nor in xamarin documentation. I'm using Xamarin Studio on Mac and I created a Xamarin.Forms (PCL) project. so It created 3 projects. 1-PCL, 2-iOS, - 3.Android. I've designed my XAML screen and coding stuff in PCL which works fine. I've a button in my XAML screen. The question is simple: How can I call this webservice: http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl from my Xamarin.Forms? I've a proxy class, when I copy this proxy.cs class to the PCL project it requires. System.Web and System.Web.Webservices etc. So that won't work, it has it's own .NET assemblies. And as I learned I can't add, which is fine... Can someone please guide me how can I use that webservice proxy class? How can I call this webservice?

ps: xamarin has published a book about 1200 pages (Creating Mobile Apps with Xamarin.Forms), awesome, but there aren't written any words about SQL, Webservices, Rest services... That's really pity :(.

so the question: How can I consume the webservice ?

Any help would be much appreciated since I'm already struggling for a couple of days :(

I already looked at the site: https://developer.xamarin.com/guides/cross-platform/application_fundamentals/web_services/#asmx . I also tried Add/Add Webreference like: file:///ec.europa.eu/taxation_customs/vies/checkVatService and file:///ec.europa.eu/taxation_customs/vies/checkVatService.wsdl, but I get ThereWasAnErrorDownloading0.

So I have the proxyclass "CheckVatService.CS" file, what to do with this class now?

Answers

Sign In or Register to comment.