Webservices (Vs) .cs class files

Discussion in 'ASP .Net' started by =?Utf-8?B?RGlmZmlkZW50?=, Nov 5, 2004.

  1. Hello Guys,

    I have a question with regards to the efficiency and best practices in .NET
    framework.

    We are currently using Webservices as normal classes. The way we are
    invoking methods in these Webservices is by instantiating objects of these
    Webservices and not by adding web references to these services...

    My question is "Would there be any performance or efficiency overhead, if we
    are using Webservices in this fashion instead of using normal .CS class
    files?"

    Is there any difference in how a Webservice is loaded and a class's object
    is instantiated. I would like to know the low-level mechanism on how a
    webservice is loaded.....

    Thanks for any pointers!!!
    =?Utf-8?B?RGlmZmlkZW50?=, Nov 5, 2004
    #1
    1. Advertising

  2. =?Utf-8?B?RGlmZmlkZW50?=

    bruce barker Guest

    there is no additional overhead with your approach.

    when you add a web reference to your project, it create a new class file
    that is a proxy for the web service. your code then calls this proxy which
    makes a soap call to the server hosting the actual class object. the web
    service code on the server creats a instance of the class, calls the
    approiate method, serialies the results and sends back to the caller.

    in your case you are creating the class instance directly, so there is no
    overhead. the web service attributes you see in the class files are used
    when hosting the web serverice. its just meta data to help in knowning what
    methods to expose as a web service entry point.

    -- bruce (sqlwork.com)



    "Diffident" <> wrote in message
    news:...
    | Hello Guys,
    |
    | I have a question with regards to the efficiency and best practices in
    ..NET
    | framework.
    |
    | We are currently using Webservices as normal classes. The way we are
    | invoking methods in these Webservices is by instantiating objects of these
    | Webservices and not by adding web references to these services...
    |
    | My question is "Would there be any performance or efficiency overhead, if
    we
    | are using Webservices in this fashion instead of using normal .CS class
    | files?"
    |
    | Is there any difference in how a Webservice is loaded and a class's object
    | is instantiated. I would like to know the low-level mechanism on how a
    | webservice is loaded.....
    |
    | Thanks for any pointers!!!
    |
    |
    bruce barker, Nov 5, 2004
    #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. E11
    Replies:
    1
    Views:
    4,684
    Thomas Weidenfeller
    Oct 12, 2005
  2. Dan

    Is WebServices ok to send files

    Dan, Jan 6, 2010, in forum: ASP .Net
    Replies:
    4
    Views:
    348
  3. Baccarin

    Consuming WebServices using HttpWebRequest class

    Baccarin, Jul 15, 2003, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    139
    Baccarin
    Jul 15, 2003
  4. Stephen Ahn

    Ideas sought on sending large files over webservices

    Stephen Ahn, Jan 27, 2006, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    143
    Stephen Ahn
    Feb 1, 2006
  5. hzili

    Upload Files using WebServices

    hzili, Apr 2, 2006, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    109
    Josh Twist
    Apr 3, 2006
Loading...

Share This Page