Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8200023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T06:17:32+00:00 2026-06-07T06:17:32+00:00

I am calling a method of another class from my activity that calls a

  • 0

I am calling a method of another class from my activity that calls a webservice using ksoap2. I want to handle timeout for this. If the method takes more than 10 seconds to execute, then I need to show an alert dialog indicating that the process was not successful.

I tried using the timeout value as follows:

HttpsTransportSE transport = new HttpsTransportSE(URL,TIMEOUT);

but ksoap2 is ignoring the timeout for some reason. I’m using ksoap2 2.6.5.

Is there any way where in I can execute the method for 10 seconds and then display the appropriate dialog box indicating a success or failure in android?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T06:17:34+00:00Added an answer on June 7, 2026 at 6:17 am

    There still seems to be an open issue with HttpTransportSE ignoring the timeout value in some situations.
    See this related link.

    However, a solution for this involved modification of the existing ksoap2 API.

    Thanks to the developers at Lightsoftai you can now add timeout to HttpTransportSE using the following code:

    Note : You can use ksoap2 API version 2.5.2 or greater for this

           /**
           * Creates instance of HttpTransportSE with set url
           *
           * @param url 
           *             the destination to POST SOAP data
           */
             public HttpTransportSE(String url) {
             super(url);
             }
    
           /**
          * Creates instance of HttpTransportSE with set url
          *
          * @param url
          *            the destination to POST SOAP data
          * @param timeout
          *               timeout for connection and Read Timeouts (milliseconds)
           */
           public HttpTransportSE(String url, int timeout) {
           super(url, timeout);
              }
    

    You can download the jar file for the same from here.

    Also refer ksoap never timeout.

    Hope it helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have trouble with calling method from another class this is my code this
I am calling startActivity to pass data from one activity to another using an
I am trying to call method getDetails() from another class which in turns calls
I am having trouble calling a specific method from another class in my app.
I am calling a method from another method and keep getting a warning: firstViewController
I am calling a method that passes in a variable. I want to be
I am trying to call a static method from another activity to find a
When I have regular methods for calling another method in a class, I have
I want to be able to refresh a view from another class, but nothing
I am calling a class's member function from another class. So,I am creating an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.