THttpRio Timeout on Android

Hi Community, sorry about my english but i have a problem and i need your help. I have one android application, developed with XE7. This application connects to my SOAP webservice with THttpRio, but in some cases the WebService is not reachable and the app takes to much time to give error. I want to set lower timeout on the connection. 
I already searched with our friend Google, and all talk about InternetSetOption and WinInet, but that doesn't work on Android. Others talk about having a TCPClient to test the connection, but isn't what i'm looking for.
Someone can help me please?
Thank you all for your time.
0
Jonathan
3/20/2015 4:40:12 AM
embarcadero.delphi.webservices 976 articles. 0 followers. Follow

3 Replies
1288 Views

Similar Articles

[PageSpeed] 53

> {quote:title=Jonathan Peruzzo wrote:}{quote}
> Hi Community, sorry about my english but i have a problem and i need your help. I have one android application, developed with XE7. This application connects to my SOAP webservice with THttpRio, but in some cases the WebService is not reachable and the app takes to much time to give error. I want to set lower timeout on the connection. 
> I already searched with our friend Google, and all talk about InternetSetOption and WinInet, but that doesn't work on Android. Others talk about having a TCPClient to test the connection, but isn't what i'm looking for.
> Someone can help me please?
> Thank you all for your time.

It's funny because I'm facing the same problem.
As a work arround, I'm testing the webservice with a socket connection... but this is not a proper solution !

How can we set the differents timeout ? My application is frozen more then 3 minutes... and this is simply "impossible" on Android !
0
Stephane
3/20/2015 12:58:08 PM
> {quote:title=Jonathan Peruzzo wrote:}{quote}
> Hi Community, sorry about my english but i have a problem and i need your help. I have one android application, developed with XE7. This application connects to my SOAP webservice with THttpRio, but in some cases the WebService is not reachable and the app takes to much time to give error. I want to set lower timeout on the connection. 
> I already searched with our friend Google, and all talk about InternetSetOption and WinInet, but that doesn't work on Android. Others talk about having a TCPClient to test the connection, but isn't what i'm looking for.
> Someone can help me please?
> Thank you all for your time.

I do not know if it applies on Android, but in Win apps you set timeouts of HTTPRio using

      RIO.HTTPWebNode.ConnectTimeout:=x;
      RIO.HTTPWebNode.SendTimeout   :=x;
      RIO.HTTPWebNode.ReceiveTimeout:=x;

x is in milliseconds.

In windows, this gets submitted as InternetSetOption in library code, so if the problem is in that part of the system then this probably won't help.  If you haven't tried it, maybe give it a shot.

Dan
0
Dan
3/21/2015 1:01:01 AM
> I do not know if it applies on Android, but in Win apps you set timeouts of HTTPRio using
> 
>       RIO.HTTPWebNode.ConnectTimeout:=x;
>       RIO.HTTPWebNode.SendTimeout   :=x;
>       RIO.HTTPWebNode.ReceiveTimeout:=x;
> 
> x is in milliseconds.
> 
> In windows, this gets submitted as InternetSetOption in library code, so if the problem is in that part of the system then this probably won't help.  If you haven't tried it, maybe give it a shot.

Thank you Dan but this is not working under Android :(
0
Stephane
3/29/2015 6:39:01 PM
Reply:

Similar Artilces:

Calling WebService to another WebService timeout frequently
Hi, I have two web services and say 1 method in each service. Both method does something pretty quick (usually under 100ms). I can run hundreds of calls to these two methods without any timeout from the client side. (I've done this through stress testing). Now I want to make web service call to the method in service B from method in service A synchronously. Since both of these methods are pretty responsive, I didn't think I would have any problem. But I am seeing a lot of timeout now. The timeout happens on both from client to the service or from service to service. The I've i...

[Android] TImage3D can not display on Android (Delphi XE7)
TImage3D can not display any image on Android,Only display black color in TImage3D. But it can be displayed in the windows platform. Android Phone: Nexus5 Version: Delphi XE7 Test step: Create a new Blank project of Multi-Device Application and add a 3D Form , Add a TImage3D control and set property "Bitmap" with any Image/Picuture (etc: PNG or JPG picture),run on Android phone, then you can found the android form display the Image3D with full black color ,not display any picture. But it can be displayed in the windows platform. There is a bug in XE7 so that no material or im...

Does Delphi XE5 on Android work with the Android emulator? [Edit]
I find that even a hello-world app exactly like the one that David I outlines (add a button, one line of code, set button text) will not run on the Android Emulator configured out of the box. First, after installing the Rad Studio XE5 trial, I followed David I's steps exactly, and the emulator would not even start. Then I clicked Android SDK manager, updated it, and clicked run-without-debugging. It asked me if I wanted to start the emulator this time so I did. Now the Firemonkey app will not start up the emulator, and while it does appear to start debugging, the emulator scree...

Delphi Webservice
Hello, I have created one webservice using indy TIdHTTPWebBrokerBridge and also created the client. Now I need to way to pass some file which will be reside on my server path to the client thorugh SOAP. The picture is as follows: 1) I have some fastreport files on the server 2) The client will show those report on the client side. There will be no fr3 files in the client side. Also I don't want to use FastReport Client/Server technology, as my client does not want this. 3) I don't want to save the fr3 files in the client side also. How to call this report from Client...

WebService Timeouts
I have a web service that I use to kick off a lon-running job that dumps a lot of data to an XML file. I need to have ASP.NET produce the XML file as the web site has the code I need (and extracting it into a stand-alone EXE would be a LOT of work). I have been struggling with this for 2 days now... any help would be much appreciated. I have set the processModel in the machine.config: <processModel responseDeadlockInterval="00:30:00" responseRestartDeadlockInterval="01:00:00" autoConfig="true"/>  and executionTimeout in web.config: <httpRuntime executionTimeout="9000" />...

Webservices + TimeOut
Hi there, How could i assign timeout while i'm making a call to WebServices in ASP.NET,For instance, i want to assign a timeout limit to my WebServices object, after certain time interval, if i'm not getting response from the webservices, i will either retry or stop the webservice call and show the error msg for timeout. Any idea on how can i achieve this. Many Thanks. You can use the Webclientprotocol.Timeout property as shown in this article:http://msdn2.microsoft.com/en-us/library/system.web.services.protocols.webclientprotocol.timeout.aspxHope this helps,Vivek&nb...

Delphi and Android
I just bought a Huawei Ascend P6 that supports NEOS, so I immediately set to create a simple app for example, a button and a label where clicking on the first time out on the second, no big deal, BUT, with my displeasure, after the compilaizione I transferred the APK file is in the cell, I installed it, but launching the app exits ONLY a white screen and does nothing, however, and the app is not locked! Someone gave to this same problem? I also tried with the examples in the Sample folder, but nothing. I created a virtual phone with AVD (Nexus 4) and I created a simple app and every...

Timeout with WebServices
Hello, I am getting such a weird issue in some code I am writing for a presentation I need to do. The code simply has a dropdownlist, upon change in the item selected, I am calling a web service using client script to retreive some related records and fill in another dropdownlist on the page. I am always getting a Timeout! I have another example in my presentation that uses also a webservice and it works fine! Here is the code listed for more help:1 <%@ Page Language="C#" AutoEventWireup="true" CodeFile="PopulateDataWithWebServices.aspx.cs" Inherits="My_Files_PopulateDataWithWebServ...

Delphi for Android
If this is not the right forum, please direct me to the right one. I want to write a simple application for android. Is it possible? I have bought Delphi XE2 and downloaded Andoid sdk. Is there any site to guide me step by step for this job? Can I do the same task with Free Pascal, or even better with Lazarus? Regarding FPC or Lazarus, I need it for highschool teaching purposes. Thanks a lot in advance, Dimitris Dimitris Koutsourelis wrote: > If this is not the right forum, please direct me to the right one. > I want to write a simple application for android. Is it possible?...

Delphi 2010 webservice consumer pass null strings to webservice [Edit]
Hello, I need to consume a webservice that is developed in java ( thas all that I know ). I have a HTTPRIO componente and have import the webservice file win the WSDL importer. Til here everything is allright but when I run the application all the parameters reach the webservice as null. I have made some webservice and consumers but I never have had problems ( I make the server and the client ) I test to do the same with prism and c++ bilder and it go allright, but I need it to do in delphi Thanks PD: Pleas be patient, my English is not good Edited by: Adrian Zussino on Sep 8, 2010 3...

How can i get android sms PDUS data in Delphi Android BroadcastReceiver
I'm trying to get delphi android sms input with sms broadcastreceiver. But 'type cast' returns nil object. First i'm getting bundle in intent like eclipse android, but i cannot continue coding for reading sms input because *JObject to TJavaArray<JObject>* casting returns to me nil object. My codes here {code} using Androidapi.JNI.JavaTypes, Androidapi.JNI.Telephony, Androidapi.JNIBridge; procedure TMainScreen.BroadcastReceiver2Receive(Context: JContext; Intent: JIntent); var obj: JObject; I: Integer; msg : JSmsMessage; pdus : TJavaArray<JOb...

Does an android app created with Delphi XE5, XE6 run on Android 5 without modifications?
Is a FireMonkey NDK application forward compatible as much as a JDK one? Markus wrote: > Android changed the JVM from Dalvik to another one (just forgot the > name) The new runtime is called ART. > and that caused issues with Delphi based programs which had any > images in them as TImage.LoadFromStream didn't work properly > anymore and a few small other issues. But that was not a problem with the NDK itself. Just that there was a new runtime underneath the NDK, and FMX was making some assumptions that work under Dalvik but not under ART. -- Remy ...

Encrypting Android-Delphi
I have written Android client and server with Delphi and Indy TCP server. I can communicate between those two but I need to somehow encrypt my communication. I can't find the right components which will give me the same result for encrypting string with Delphi and with Java. Anybody can point me to the right place. What components to use in Delphi and what code in Java? Thanks >What components to use in Delphi and what code in Java? non-technically, I don't know <g> you might try a more appropriate newsgroup. grega wrote: > I have written Android client and ...

Delphi for Android Phone
All this talk about cross platform support I wonder if anyone at Embarcadero has considered Delphi for the Android phone. I don’t know bout you guys but I really what a portable device like a cell phone that I can program (and not in c++). Perhaps a partnership with Google could be on the cards to corner a new and growing market in mobile phone software development. Just an idea. Alan Rose wrote: > I wonder if anyone at Embarcadero has considered Delphi for the Android phone. I was actually just looking into this, and I think it's unlikely anytime soon. It looks like Android pr...

Web resources about - THttpRio Timeout on Android - embarcadero.delphi.webservices

Resources last updated: 12/5/2015 12:35:40 AM