Forum Cross Platform with Xamarin


Hello Community,

I'm searching the whole day for a solution. I found a lot of different possible solutions, but nothing fits to my issue.

Environment: Windows 10 64-bit, Visual Studio 2015 Enterprise

What I like to do: I have installed ILIAS(a learning platform) and would like to use SOAP as Interface to communicate with it. Ilias provides out-of-the-box a WSDL for the SOAP-Service(see and I will create a portable class library which handles this stuff.

Problem: I created a project with a portal class library and tried to add with "Add -> Service Reference" the SOAP-Service via the WSDL-Hyperlink. Then Visual Studio generates some client class and two interfaces, but the functionality is not there.
But if I try it under a Android project, there I can add this Service via "Add -> Web Reference" and all functionality is there.

So how can I use this SOAP-Service in a PCL?

Thank you!

Kind regards,
Daniel E.


  • EdinsonMoralesEdinsonMorales USMember
    edited November 2016

    Same problem, I tried delete projects windows 8.* and windows phone 8.*, a reboot visual and nothings happen. The problems is with this projects. Other solutions, say me, that in xamarin studio that its working.

  • fabiuz84fabiuz84 USMember ✭✭

    You need to remove Windows Phone 8.x from project target in a PCL project settings.
    For do this, you perform for first the removing of any nuget packages from PCL project, and after this you go to project's property -> Library and click to "Change..." button placed under Targeting label and you go to uncheck Windows Phone 8.x from list. After this, you can add Service References as usually in a traditional .Net projects.

  • @FabioPedretti I tried it, but it is still not working. If I create an instance of the client object in the android project, I get a huge ragbag of functions.. And in the protable class library I only get 3 functions..

  • fabiuz84fabiuz84 USMember ✭✭

    Hi @DanielEisenreich, the use of service references in Xamarin is different than classic's c# projects. In PCL, you can use only a async call ( this is good because you don't lock UI during the waiting for the response). For example, in one my service I've only one method named "Execute" that i found in MyService.MyServiceClient , defined in my References.cs.
    MyServiceClient has ExecuteAsync as public method and ExecuteCompleted as public delegate and I've invoked the service like this:

    var myServiceClient.execReq = new MyService.ExecBody("sample body");
    myServiceClient.ExecuteCompleted += myServiceClient_ExecuteCompleted;
    myServiceClient.ExecuteAsync(execReq);  //<<-- this invoke the service, execReq is the object that rapresent the request's message
    private void myServiceClient_ExecuteCompleted (object sender , myService.ExecuteCompletedEventArgs e)
                    if (e.Result != null) {...}
            catch {...}
Sign In or Register to comment.