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 8277015
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:33:49+00:00 2026-06-08T08:33:49+00:00

I am using kSoap2 for accessing soap web services. I am getting java.net.connectException while

  • 0

I am using kSoap2 for accessing soap web services. I am getting java.net.connectException while executing the below line

androidHttpTransport.call(Constants.SOAP_ACTION_GET_METHOD_NAME, envelope)   

This is not happening always, but some of the times. Is this the problem with connection time out to the server? How to increase the connection time out in kSoap ? I googled, but can’t find out the solution .
Can anyone suggest me the solution to fix this error.

Logcat details follows:

07-17 14:46:24.800: W/System.err(8103): java.net.ConnectException: failed to connect to www.yahoo.com/175.41.138.237 (port 80) after 20000ms: isConnected failed: ENETUNREACH (Network is unreachable)
07-17 14:46:24.800: W/System.err(8103):     at libcore.io.IoBridge.isConnected(IoBridge.java:214)
07-17 14:46:24.800: W/System.err(8103):     at libcore.io.IoBridge.connectErrno(IoBridge.java:152)
07-17 14:46:24.800: W/System.err(8103):     at libcore.io.IoBridge.connect(IoBridge.java:112)
07-17 14:46:24.800: W/System.err(8103):     at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)
07-17 14:46:24.800: W/System.err(8103):     at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:459)
07-17 14:46:24.800: W/System.err(8103):     at java.net.Socket.connect(Socket.java:842)
07-17 14:46:24.800: W/System.err(8103):     at libcore.net.http.HttpConnection.<init>(HttpConnection.java:77)
07-17 14:46:24.800: W/System.err(8103):     at libcore.net.http.HttpConnection.<init>(HttpConnection.java:50)
07-17 14:46:24.800: W/System.err(8103):     at libcore.net.http.HttpConnection$Address.connect(HttpConnection.java:351)
07-17 14:46:24.800: W/System.err(8103):     at libcore.net.http.HttpConnectionPool.get(HttpConnectionPool.java:86)
07-17 14:46:24.810: W/System.err(8103):     at libcore.net.http.HttpConnection.connect(HttpConnection.java:128)
07-17 14:46:24.810: W/System.err(8103):     at libcore.net.http.HttpEngine.openSocketConnection(HttpEngine.java:308)
07-17 14:46:24.810: W/System.err(8103):     at libcore.net.http.HttpEngine.connect(HttpEngine.java:303)
07-17 14:46:24.810: W/System.err(8103):     at libcore.net.http.HttpEngine.sendSocketRequest(HttpEngine.java:282)
07-17 14:46:24.810: W/System.err(8103):     at libcore.net.http.HttpEngine.sendRequest(HttpEngine.java:232)
07-17 14:46:24.810: W/System.err(8103):     at libcore.net.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:80)
07-17 14:46:24.810: W/System.err(8103):     at org.ksoap2.transport.ServiceConnectionSE.connect(ServiceConnectionSE.java:80)
  • 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-08T08:33:51+00:00Added an answer on June 8, 2026 at 8:33 am

    How to increase the connection time out in kSoap ?

    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 am using ksoap2 API to call .net webservices from Android. I am getting
Calling a .net SOAP1.1 web service from android using ksoap2 lib I met a
I'm using KSOAP2 to invoke a web service. I am getting a response, but
I am using KSoap2 for calling web-services for my Android app. I am using
My application connects to the web-service using ksoap2. The application enables the user to
I'm trying to consume a .net webservice using ksoap2. this is the envelope of
I have a .net ASMX webservice that I'm consuming using the ksoap2 library. In
I am trying to use a .NET service in Android Application using the ksoap2
I am using KSoap to fetch .net Web service in android. I got the
I am using ksoap2 to operate an azure web service, and the service uses

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.