473,385 Members | 1,734 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,385 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 3229
"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: 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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.