473,406 Members | 2,843 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,406 software developers and data experts.

multiple webservice calls in one persistent connection

Hi

I want to make calls to my webservice method multiple times using a
persistent http connection. Is this possible?

Jun 12 '07 #1
4 3230
"kplkumar" <kp******@gmail.comwrote in message
news:11**********************@d30g2000prg.googlegr oups.com...
Hi

I want to make calls to my webservice method multiple times using a
persistent http connection. Is this possible?
This can't be done without great effort. Are you sure you need to control
things in this level of detail?
--
John Saunders [MVP]
Jun 13 '07 #2
Yeah, I want to do this. I know internet browsers do this, by using
KeepAlive, however I don't know how it could be done from a windows
application calling a webservice.

Can you tell me how??

Jun 13 '07 #3
Yeah, I want to do this. I know internet browsers do this, by using
KeepAlive, however I don't know how it could be done from a windows
application calling a webservice.

In other words, I want to have a persistent connection with the server
and make multiple websrevice calls (requests) and close the
connection.

Can you tell me how??
Jun 13 '07 #4
"kplkumar" <kp******@gmail.comwrote in message
news:11**********************@x35g2000prf.googlegr oups.com...
Yeah, I want to do this. I know internet browsers do this, by using
KeepAlive, however I don't know how it could be done from a windows
application calling a webservice.

In other words, I want to have a persistent connection with the server
and make multiple websrevice calls (requests) and close the
connection.

Can you tell me how??
It's very difficult, it it's possible at all. Internet browsers do it
because they are in complete control of their interaction with the server.
If you want to do the same, you'll either have to do a bunch of very
sophisticated programming (have you ever written code that generates code?),
or you'll have to perform the interaction with the server yourself, and do
without the conveniences that Microsoft offers you.

In particular, you can create your own subclass of
System.Web.Services.Protocols.SoapHttpClientProtoc ol. You'll have to
override the GetWebRequest method to return an instance of HttpWebRequest
with the KeepAlive property set to true.

But your proxy classes will have to derive from your new subclass. This
means that you won't be able to use Add Web Reference or WSDL.EXE to create
your proxy classes.

Unless, that is, you write a SoapProtocolImporter which will generate proxy
classes based on your own subclass instead of the default
SoapHttpClientProtocol.

I've never done these things, since they are too complicated for most
purposes. It's always been better to let .NET decide whether or not to keep
a connection open, rather than worrying about it myself. Certainly, if you
have determined that there's either a measurable performance impact, or if
you need to do it in order to interact with a server which requires it, then
you have to do it.

And good luck to you. If it works, you should publish the solution.
--
John Saunders [MVP]
Jun 13 '07 #5

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

Similar topics

16
by: noah | last post by:
Does PHP have a feature to associate Cookie sessions with a persistent database connection that will allow a single transaction across multiple HTTP requests? Here is how I imagine my process: I...
15
by: The Fumigator | last post by:
Hi. I want to be able to create a persistent connection between an XML-RPC client and server... i.e. I want to be able to login once, carry out a number of calls and then logout rather than send...
11
by: Alban Hertroys | last post by:
Oh no! It's me and transactions again :) I'm not really sure whether this is a limitation of psycopg or postgresql. When I use multiple cursors in a transaction, the records inserted at the...
3
by: John | last post by:
Hi I have a dataset from a web service. I want to use a dataadapter with the dataset. What connection string should I use so the da knows that it is acting on the remote db associated with the...
6
by: thomson | last post by:
Hi All, i do hae a solution in which i do have mulitple projects including Web Projects,, Depending on the functionality it gets redirected to different web projects and it is working fine, ...
2
by: Petra Chong | last post by:
Hello all I am using Python 2.3 and ZODB (without the rest of Zope) with the following pattern: * One process which writes stuff to a ZODB instance (call it test.db) * Another process which...
5
by: Chamnap | last post by:
Hello, I want to implement multiple uploads with multiple iframe posting to the server at the same time. Do all of you think it is possible to do this? Does this ways has any drawbacks? Give me...
9
by: mel | last post by:
Hi all, I need a persistent TCP connection with my web server over page reloads. This means that, even if the user goes to a different page (in my domain), I want to keep a TCP connection...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.