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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T13:58:29+00:00 2026-06-02T13:58:29+00:00

I have generated the client stubs using WSDLToJava. After that I have created the

  • 0

I have generated the client stubs using WSDLToJava. After that I have created the client as mentioned here http://cxf.apache.org/docs/developing-a-consumer.

this.testService = new TestService(wsdlURL, SERVICE_NAME); //line #1
    this.port = testService.getTestPort();          //line #2
    Client client = ClientProxy.getClient(port);        //line #3
    client.getInInterceptors().add(new LoggingInInterceptor());
    client.getOutInterceptors().add(new LoggingOutInterceptor());
    HTTPConduit conduit = (HTTPConduit)client.getConduit();
    // setting timeouts for connection
    String timeOutSecond = CoreProperty.getProp(CORE_SERVICE_TIME_OUT_MILLISECONDS);
    int timeout =0;
    try{
        if(Utils.isNotNullOrBlank(timeOutSecond))
            timeout = Integer.parseInt(timeOutSecond.trim());
        else
            timeout = Constants.DEFAULT_SERVICE_TIME_OUT_MILLISECONDS;
    }catch (NumberFormatException e) {
        timeout = Constants.DEFAULT_SERVICE_TIME_OUT_MILLISECONDS;
    }
    conduit.getClient().setReceiveTimeout(timeout);

The issue is that line #1 is taking almost 5 minutes to throw error if the server is down – specified in the wsdlURL .

I want to set a time out of 30 seconds to establish the client connection.

If the service is up everything is working fine and the receivetimeout I have set working fine. How can I set the timeout for establishing the connection.
THE PROGRAM IS WAITING AT LINE #1 IF THE SERVER IS DOWN, IT IS WAITING FOR MORE THAN 4 MINUTES THERE AND I WANT TO AVOID THAT.

Thanks for your time. Please help

  • 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-02T13:58:37+00:00Added an answer on June 2, 2026 at 1:58 pm

    I think the only option is to create a spring configuration file that configures an http:conduit with a name of “http://servername.com/.*” that sets a shorter timeout. Create the bus from that config file. See:

    http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html

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

Sidebar

Related Questions

I have a MIDL generated C++ RPC interface from a client that defines two
I have generated a client using Axis2 framework with XMLBeans as the data binding
I have a page in one of my client's websites that generates an extensive
I have generated a C# SharePoint Sequential Workflow project using the very handy STSDEV
I have generated using openssl mycert.pem which contents the certificate. And I converted the
I have generated an XML file that and one of the nodes contains data
I have created a new class called Get_WebPage1 and init I have extends that
I have a web service that was created several years ago in C++ and
I would have question regarding web services. Let's say I have webservice client that
I have created a Server, Client kind of program with RMI. But whenever I

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.