Forum Xamarin Xamarin.Android

Error: The empty string " is not a valid local name

Hi,

I'm trying to interact with a wcf web service using a Xamarin Android application. I communicated with the service using a console application and the request was processed successfully but from an Android App I get the error ""The empty string " is not a valid local name".

Has anyone else run into this before?

Best Answer

Answers

  • JPatel77JPatel77 ZAMember ✭✭

    Hi Jay, Thanks for the reply, yeah I read that thread but it didn't help much. I think the reason for this error is because the WCF web service is expecting a WSHttpBinding but Xamarin is only allowing me to do a BasicHttpBinding. So because the messages are formatted with different SOAP versions (1.1 for basichttp & 1.2 for wshttp) the service can't read the message.

    I am investigating a work around now, either downgrading Xamarin since I think ws bindings were supported in earlier versions or modifying the web service to accept basichttpbindings or opening a JSON endpoint.

    I'm a bit new to web services so forgive me if anything in here is incorrect.

  • ShawnCastrianniShawnCastrianni USBeta ✭✭✭

    I am not sure WSHttpBindings has anything to do with it. I am trying to use BasicHttpBinding and it still gives me this error.

  • JPatel77JPatel77 ZAMember ✭✭

    As far I know, android can't natively do WSHttpBindings. Although there are packages like kSOAP which allow you to do WS bindings.

    I eventually just created a webservice to handle the communications to the target webservice. Messy, but it works. Ideally the WCF should be made restful.

Sign In or Register to comment.