Webservices (Vs) .cs class files

G

Guest

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!!!
 
B

bruce barker

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)



| 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!!!
|
|
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,281
Latest member
Pedroaciny

Latest Threads

Top