locked
how to consume Webservice proxy class in Xamarin.Forms? RRS feed

  • Question

  • User223397 posted

    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/applicationfundamentals/webservices/#asmx . I also tried Add/Add Webreference like: file:///ec.europa.eu/taxationcustoms/vies/checkVatService and file:///ec.europa.eu/taxationcustoms/vies/checkVatService.wsdl, but I get ThereWasAnErrorDownloading0.

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

    Wednesday, January 25, 2017 11:07 AM

All replies

  • User308454 posted

    https://developer.xamarin.com/guides/xamarin-forms/cloud-services/consuming/asmx/ this might help you

    Wednesday, April 5, 2017 8:47 AM
  • User277909 posted

    @Indrayani said: https://developer.xamarin.com/guides/xamarin-forms/cloud-services/consuming/asmx/ this might help you

    I dont see in this article anything about how to create proxy class. It talks about it but does not show the details at all

    Monday, September 24, 2018 7:26 PM
  • User76049 posted

    @dinob said:

    @Indrayani said: https://developer.xamarin.com/guides/xamarin-forms/cloud-services/consuming/asmx/ this might help you

    I dont see in this article anything about how to create proxy class. It talks about it but does not show the details at all

    Any suggestions? :*

    Monday, September 24, 2018 10:32 PM
  • User277909 posted

    @NMackay said: @dinob said:

           @Indrayani said:
     https://developer.xamarin.com/guides/xamarin-forms/cloud-services/consuming/asmx/
     this might help you
    
      I dont see in this article anything about how to create proxy class.  It talks about it but does not show the details at all
    

    Any suggestions? :*

    No, no suggestion

    Monday, September 24, 2018 10:56 PM