Issue
I added a connection service to my Xamarin.Forms project via WCF, then added these codes:
private async void NumberToWord(ulong num)
{
NumConvert.NumberConversionSoapTypeClient client = new NumConvert.NumberConversionSoapTypeClient(NumConvert.NumberConversionSoapTypeClient.EndpointConfiguration.NumberConversionSoap12);
var result = await client.NumberToWordsAsync(num);
labell.Text = result.ToString();
}
But when i called this function it gives an error like this:
System.Xml.XmlException: 'Element 'NumberToWordsAsyncResponse' with namespace name 'http://www.dataaccess.com/webservicesserver/' was not found. Line 4, position 6.'
Thanks.
Solution
I solved the problem while adding web service referance, checked the "Generate Synchronous Operations" checkbox on specifying the client options section: enter image description here
With this you don't need to use only asynchronous functions but also synchronous ones too which is how i solved my problem.
Answered By - Berkay
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.