Web Services and interfaces

Discussion in 'ASP .Net Web Services' started by msnews.microsoft.com, Jul 14, 2003.

  1. 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...
     
    msnews.microsoft.com, Jul 14, 2003
    #1
    1. Advertising

  2. msnews.microsoft.com

    Jackie_ol Guest

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

    http://www.fawcette.com/archives/premier/mgznarch/vbpj/2001/10oct01/ws0110/ws0110-1.asp

    "Andy Fish" <> wrote in message
    news:_jwQa.6120$...
    > 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" <> wrote in message
    > news:%...
    > > 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...
    > >
    > >

    >
    >
     
    Jackie_ol, Jul 14, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ollie
    Replies:
    0
    Views:
    378
    Ollie
    Sep 9, 2003
  2. Nick
    Replies:
    1
    Views:
    6,272
    Alvin Bruney - ASP.NET MVP
    Sep 12, 2005
  3. Ollie

    Interfaces and web services in .Net.

    Ollie, Sep 9, 2003, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    101
    Dmitriy Lapshin [C# / .NET MVP]
    Sep 9, 2003
  4. Joe

    Interfaces And Web Services

    Joe, Oct 3, 2003, in forum: ASP .Net Web Services
    Replies:
    4
    Views:
    131
  5. John
    Replies:
    4
    Views:
    502
Loading...

Share This Page