SoapHttpClientProtocol and the TimeOut property

K

Kim

Hi,
I am calling a web service from a hand held terminal (running Pocket pc
2002) using the SoapHttpClientProtocol class. Sometimes the terminal
gets out of network coverage - in that case I want the terminal to be
able to work offline using a cradle. The problem is that when I call
the web service (Invoke(), see code below) and during the call loses
the connection, the terminal can hang for a very long time in the call
(10 minutes or more) before it discovers that the connection is lost. I
have tried to use the TimeOut property of the class but it does not
seem to work in this case. I have also tried to cancel the call after
two minutes using the Abort() method but that did not work either. If I
just kills the thread, executing the Invoke() method, the program
breaks down.

Here is the code I use to call the web service:

TimeOut = 60000; //60 seconds

[System.Web.Services.Protocols.SoapRpcMethodAttribute("DataTunnel",
RequestNamespace="http://ws.datatunnel.webservice.netmill.com",
ResponseNamespace="http://caremobiltest/jboss-net/services/DataTunnel")][return:System.Xml.Serialization.SoapElementAttribute("openTunnelReturn")]
public string openTunnel(string in0, string in1)
{
object[] results = this.Invoke("openTunnel", new object[] {
in0, in1});

return ((string)(results[0]));
}

Do you have any idea about how to get the timeout to happen after 60
seconds as intended?

Best Regards,
Kim Therkelsen
 

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

Top