dotnet / dotnet/wcf

Calling any WCF service Task-based Async methods from Xamarin fails

Open
#2,463 75 comments 11 reactions 1 assignee Assigned to @marek-safar View on GitHub
Blocked tooling Xamarin
Dominant language
C#
Stars
1.8k
Forks
576
Avg merge
6d 9h
Merged PRs (30d)
2

Description

I have hit the same issue noted here https://bugzilla.xamarin.com/show_bug.cgi?id=51959

To reproduce
1) Using VS 2017 15.5.2
2) Create a Xamarin cross platform app and select '.NET standard option' and 'Android'
3) Since it's not possible to add a web service reference to the shared assembly (will open separate bug) add a .NET standard 2.0 class library project to host the web service reference.
4) Create a reference to a WCF service from the class library. Using basicHttpBinding will do.
5) All methods in the service are async, which is fine, except calling one (called GetVersion in this case) results in:

Error in deserializing body of request message for operation 'GetVersion'. OperationFormatter encountered an invalid Message body. Expected to find node type 'Element' with name 'GetVersion' and namespace 'hexcel.com'. Found node type 'Element' with name 'GetVersionAsync' and namespace 'hexcel.com'

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.