I am developing an app which uses third party .asmx
web service. And I am using PCL(Portable class Libraries) in my app.
So I wanted to consume those .asmx
web services in my app. Problem is PCL doesn't support traditional web service viz .asmx
. It supports WCF
web services.
I have read many articles, they suggests me that from wsdl
write WCF
web service. But since all web services are third party, I need to write proxy in client app (Where web service is being called) such that it will convert WCF
call to .asmx
.
Also I have tried this example using PCL. I am using this asmx web service
public class PerformLogIn : ILogInService
{
public string LogIn(string code)
{
ServiceReference1.WeatherSoapClient obj = new ServiceReference1.WeatherSoapClient();
obj.GetCityForecastByZIPAsync(code);
ServiceReference1.WeatherReturn get = new ServiceReference1.WeatherReturn();
return (get.Temperature);
}
But I am not getting any result. So do anybody have idea how to do that??
asych
methods. Whose return type isvoid
. So how to get response of service?? – Rohit