How to use WCF services in .netstandard with Xamarin.Forms project?

后端 未结 2 685
栀梦
栀梦 2021-02-09 14:38

I\'ve created a Xamarin.Forms project with .netstandard 2.0 as PCL project. I\'m trying to consume WCF services in that project. I\'ve added the connected service for WCF servic

2条回答
  •  被撕碎了的回忆
    2021-02-09 15:30

    Generate an older compatible style of WCF proxy methods via checked "Generate Synchronous Operations" checkbox on Configure WCF Web Service Reference screen:

    Consume the web service:

    KimlikServiceReference.KPSPublicSoapClient soapClient = new KimlikServiceReference.KPSPublicSoapClient(KimlikServiceReference.KPSPublicSoapClient.EndpointConfiguration.KPSPublicSoap);
    //KimlikServiceReference.TCKimlikNoDogrulaResponse response = soapClient.TCKimlikNoDogrulaAsync(TCKimlikNo, Ad, Soyad, DogumYili).Result;
    bool result = soapClient.TCKimlikNoDogrula(TCKimlikNo, Ad, Soyad, DogumYili);
    

提交回复
热议问题