Adding a WCF Web Services problem

vkt_rbvkt_rb USMember ✭✭✭

Hi guys, I'm trying to connect a webservices references to my crossplataform solution in Xamarin Studio 6.0, I'm using a shared project with a other project in android(UI), in this case I'm trying to connect the web services references in the .Droid solution, but I've a problem and it's that when I connect the web services using Visual Studio 2015, I don't have any problem and it connect perfectly but when I try to use the webservices references in the Xamrin Studio, with the same configuration that I use in Visual Studio, it doesn't connect to my web services, and it doesn't show all the methods in the WCF web services. Attached at this question are the two types of webservices one adding by VS2015 and the other one using Xamarin Studio.

I would like to know if there is like a bug of Xamarin Studio, because I was working with the versions 5.0, 5.09, 5,10 and now with 6.0.2 and I still have the same problem, and I would like to know how to connect it using Xamarin Studio to not depend of the use of Visual Studio. Thank you by your help.

Best Answer

Answers

  • DaveHuntDaveHunt USMember ✭✭✭✭✭

    Have you been through Walkthrough - Working with WCF, specifically the section titled Creating a Xamarin.Android Application?

    Consuming WCF from a Xamarin application is a bit different from the usual way of just adding a web reference. It's a more manual process.

  • vkt_rbvkt_rb USMember ✭✭✭

    Hi DaveHunt actually I already tried to use the way in the WCF Walkthrough of the Xamarin Documentation, but I got the same problem, at this moment only adding the web services references by VisualStudio works well.

  • DaveHuntDaveHunt USMember ✭✭✭✭✭

    You'll have to explain more about the steps you are using in Xamarin Studio for us to help you.

  • vkt_rbvkt_rb USMember ✭✭✭

    For example what I'm doing to add the references of the web server is use the Add Web References of Xamarin Studio, for example, in MyProject.Droid, I press right click on it -> Add -> Web References.. After of that in Add Web References Window I set the URL of my webservices in WCF, and in Config button I set these values

  • DaveHuntDaveHunt USMember ✭✭✭✭✭

    @vkt_rb said:
    For example what I'm doing to add the references of the web server is use the Add Web References of Xamarin Studio

    That's your first mistake. If you go back to the walkthrough, you will see that they don't use Add Web References. You need to manually generate the proxy source files using SLSvcUtil.exe, manually add the generated source files to your project and manually add references to System.Runtime.Serialization, System.ServiceModel, and System.ServiceModel.Web in your project references (not Web References).

  • vkt_rbvkt_rb USMember ✭✭✭

    Hi @DaveHunt actually it didn't work to me, I used the walkthrough and still not adding in right way the webservices, my question in here is what's the different that have VS to XF, and why I can add the web service using in MyProject.Droid, I press right click on it -> Add -> Web References, in VS, I would like to know, because I rater to use the IDE from Xamarin and not depend from VS.
    Right now I used VS to connect my webservice and continue with the develop of my App, because is easier and faster.

  • DaveHuntDaveHunt USMember ✭✭✭✭✭

    @vkt_rb - Xamarin Studio doesn't support using Add -> Web References. That's the difference. You have to do it the way the walkthrough for Xamarin Studio shows. If you followed the walkthrough and are still having problems, you'll need to post exactly the steps you took and what error you're seeing.

    At any rate, if you're running on Windows, Xamarin doesn't want you to use Xamarin Studio. That's why they no longer include it in the universal installer for Windows. If you insist on using it, you'll have to accept the limitations and work within them.

  • DaveHuntDaveHunt USMember ✭✭✭✭✭

    @vkt_rb said:
    but at the same time is a kind of disappointment know that if xamarin provide an IDE it is so different between O.S, they would try to give to us a tool that not be so restricted in one plataform to other.

    I'm not sure what you mean there. Xamarin Studio doesn't work any different on MacOS with regard to supporting WCF web references and the IDE itself is pretty much identical between the MacOS and Windows versions, at least with regard to Android development.

    Also, remember that Xamarin is part of Microsoft now. Microsoft wants you to use Visual Studio on Windows, so Xamarin has to want that, too. :wink:

Sign In or Register to comment.