473,320 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Create and pass a WebService instance

I have a technical question about WebServices. I have a solution with several
projects (.exe and .dll). Each project have references to several
webservices. I want to know if is possible to create a global instance of the
webservice accesible from all projects to avoid the creation of the
webservice instance each time a project calls the same service. Do you know
My object in Visual Basic .NET 2005? Something similar but with more than one
project. I don´t know if this is possible
Could you tell me anything?
Thanks a lot for your help.

Jan 27 '06 #1
1 1872
You can't pass an instance of a web service reference across AppDomain
boundaries.

Keep in mind that you're not creating some huge object that is the whole
"web service". You're creating a reference to a class, to the proxy class.
Use it wisely but don't be afraid to create them.

If your applications spend most of their time accessing the web service then
you might want to create a single global instance within the application but
if the application accesses the web service only occasionally then create an
instance, use it, and let it go out of scope and let the Garbage Collector
clean it up and restore the memory. That would be more efficient than
maintaining a global instance through the entire life of the application.

HTH
--
Dale Preston
MCAD C#
MCSE, MCDBA
"otto" wrote:
I have a technical question about WebServices. I have a solution with several
projects (.exe and .dll). Each project have references to several
webservices. I want to know if is possible to create a global instance of the
webservice accesible from all projects to avoid the creation of the
webservice instance each time a project calls the same service. Do you know
My object in Visual Basic .NET 2005? Something similar but with more than one
project. I don´t know if this is possible
Could you tell me anything?
Thanks a lot for your help.

Jan 29 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Hans Kesting | last post by:
Hi, I'm trying to create a client for some webservice. BUT I have only limited information: * no WSDL available ("expected Q1-06") (it seems to be written in Java) * I don't have access (yet)...
9
by: MMesich | last post by:
I've got an order entry webservice whose WSDL looks like this: <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"...
0
by: Dhananjayan | last post by:
Hi, I have a webservice(eg.IStringServicePort) running on Axis, iam able to create a java client for the same and invoke the service and obtain the result. I wanted to create a .Net client(C#)...
3
by: Dhananjayan | last post by:
Hi, I have a java webservice running on Axis, Iam able to create a java client to invoke the webservice and obtain the result. But iam not able to invoke the service from .Net client.. Here are...
1
by: mrstrong | last post by:
Gday, I have just started c# .net about 3 months ago and have recently (last week) upgraded to 2005 and hoping for some assistance understanding the best approach to adding new records to a...
4
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is...
4
by: Benny Dein | last post by:
Hi I want to create a servlet or something similar by which im able to create virtual webservices. Lets say i would like to create a webservice with a method called 'getDate' which returnes...
1
by: parimalb | last post by:
Hi All, I want to pass an array argument to the java webservice from perl client using SOAP::LITE package. Please let me know if anyone knows about this. The web method declaration in java is...
1
by: gah | last post by:
I am getting an array of records from an asp.net webservice and wanting to display them in a dynamically created html table in the php page. I am new to php and not sure how to get the values from...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.