[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Jackie Ol.

7/14/2003 10:26:00 AM

Hi!
I wrote a simple web service that has four web methods in it. This web
service is designed to run on four different machines. There is a central
asp.net application which consumes the web services running on four
different machines. I want to run these web service methods by using
interfaces only.
I wrote an interface, and implemented the methods of interface in my web
service class, but when I cast the web service to the interface I receive an
invalid cast exception. Isn't it possible to use web services with
interfaces?

Any advices?

Thanks...


1 Answer

Jackie Ol.

7/14/2003 11:56:00 AM

0

Ok, I've found an article which describes the process:

http://www.fawcette.com/archives/premier/mgznarch/vbpj/2001/10oct01/ws0110/ws...

"Andy Fish" <ajfish@blueyonder.co.uk> wrote in message
news:_jwQa.6120$qf3.4737@news-binary.blueyonder.co.uk...
> the short answer is that no, it isn't possible to user interfaces
directly.
> For all the web service knows, it could be consumed by a java application,
> perl script or any language that has no concept of interfaces. If you want
a
> "rich" interface and are prepared to limit yourself to .net clients,
> consider using remoting instead.
>
> what I did for a web service was write a thin layer in the consuming side
> that implements the same interface and calls the web service.
>
> Andy
>
>
> "msnews.microsoft.com" <jackie_ol@hotmail.com> wrote in message
> news:%23uGYBJfSDHA.3132@tk2msftngp13.phx.gbl...
> > Hi!
> > I wrote a simple web service that has four web methods in it. This web
> > service is designed to run on four different machines. There is a
central
> > asp.net application which consumes the web services running on four
> > different machines. I want to run these web service methods by using
> > interfaces only.
> > I wrote an interface, and implemented the methods of interface in my web
> > service class, but when I cast the web service to the interface I
receive
> an
> > invalid cast exception. Isn't it possible to use web services with
> > interfaces?
> >
> > Any advices?
> >
> > Thanks...
> >
> >
>
>