I created a Xamarin.Forms PCL project which gave me a solution with PCL project, Andriond,IOS and Windows projects. I have written my business logic in a WCF service library and hosted it on my LOCAL IIS which is accessible from anywhere in the corporate network. The business logic talks to TFS object model in turn. I tried consuming the service using channel factory (my web service interface class is in a different PCL project and I referenced the PCL dll in xamarin.forms PCL and the endpoint address is my hosted service), but not successful. I tried following the walk through provided by xamarin for consuming WCF service in an android application and was successful, but was not able to consume the service via same approach in xamarin forms android application ( where I used the service client proxy class in PCL and tried to populate the data using app.cs class in PCL). Is there any specific approach for consuming WCF service in xamarin forms with PCL ?
I hope you solved your WCF issue in the meantime. Nonetheless if you are still looking for a solution I wrote a blog post some time ago on how to consume a WCF service from within a PCL using a Xamarin.Forms application.
HTH
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With