G
Guest
I have a Web service and I want it to implement an interface that I specified, say IService. So my Web service class looks like this
public class Service1 : System.Web.Services.WebService, IServic
public Service1(
InitializeComponent()
[WebMethod
...
On the client-side I want to use this Web service using my Interface
IService service = new WebService.Service1()
Unfortunately the last code line doesn't work because I get an error message saying that the conversion from WebService.Service1 to IService is not possible. Also an explicit type cast isn't possible
I think the problem is that my automatically generated proxy class for my Web service doesn't implement the interface IService. Do I have to make my proxy class implement the interface? And if yes how (doing it manually works, but my changes are lost the next time I refresh the reference)? Or is there another solution for my problem?
public class Service1 : System.Web.Services.WebService, IServic
public Service1(
InitializeComponent()
[WebMethod
...
On the client-side I want to use this Web service using my Interface
IService service = new WebService.Service1()
Unfortunately the last code line doesn't work because I get an error message saying that the conversion from WebService.Service1 to IService is not possible. Also an explicit type cast isn't possible
I think the problem is that my automatically generated proxy class for my Web service doesn't implement the interface IService. Do I have to make my proxy class implement the interface? And if yes how (doing it manually works, but my changes are lost the next time I refresh the reference)? Or is there another solution for my problem?