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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T10:02:17+00:00 2026-05-15T10:02:17+00:00

I have to implement a webservice client to a given WSDL file. I used

  • 0

I have to implement a webservice client to a given WSDL file.
I used the SDK’s ‘wsimport’ tool to create Java classes from the WSDL as well as a class that wrap’s the webservice’s only method (enhanceAddress(auth, param, address)) into a simple java method. So far, so good. The webservice is functional and returning results correcty. The code looks like this:

try {
  EnhancedAddressList uniservResponse = getWebservicePort().enhanceAddress(m_auth, m_param, uniservAddress);
  //Where the Port^ is the HTTP Soap 1.2 Endpoint
}catch (Throwable e) {
  throw new AddressValidationException("Error during uniserv webservice request.", e);
}

The Problem now: I need to get Information about the connection and any error that might occur in order to populate various JMX values (such as COUNT_READ_TIMEOUT, COUNT_CONNECT_TIMEOUT, …)
Unfortunately, the method does not officially throw any Exceptions, so in order to get details about a ConnectException, i need to use getCause() on the ClientTransportException that will be thrown.

Even worse: I tried to test the read timeout value, but there is none. I changed the service’s location in the wsdl file to post the request to a php script that simply waits forever and does not return. Guess what: The web service client does not time out but waits forever as well (I killed the app after 30+ minutes of waiting). That is not an option for my application as i eventually run out of tcp connections if some of them get ‘stuck’.

The enhanceAddress(auth, param, address) method is not implemented but annotated with javax.jws.* Annotations, meaning that i cannot see/change/inspect the code that is actually executed.

Do i have any option but to throw the whole wsimport/javax.jsw-stuff away and implement my own soap client?

  • 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-05-15T10:02:17+00:00Added an answer on May 15, 2026 at 10:02 am

    to setup read-timeout and connect timeouts you can configure the binding parameters when you setup your Service and Port instances:


        Service = new Service();
    
        Port = Service.getPort();
    
        ((BindingProvider) Port).getRequestContext().put(
                BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                "http://localhost:8080/service");
        ((BindingProvider) Port).getRequestContext().put(
                BindingProviderProperties.CONNECT_TIMEOUT,
                30);
        ((BindingProvider) Port).getRequestContext().put(
                BindingProviderProperties.REQUEST_TIMEOUT,
                30);
    

    now whenever you execute a service via “Port” you will get response timeouts and/or connection timeouts if the backend is slow to respond. the values follow the timeout values of the Socket Class.

    when these timeouts are exceeded you will get timeout exeption or a connection exception and you can put counter-code to keep track of how many you get.

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

Sidebar

Related Questions

I have a common base class from which all my ASMX webservice classes will
I have a WSDL from a webservice for which I don't have the implementation.
I have to implement a webservice which will be used by different clients written
I have WCF client server application, and create msi setup projects for both projects.
I am using latest Apache CXF to create a webservice. I have configured ws-security
I'm writing a Java desktop client application that retrieves data from a remote MySQL
I have my application running properly in Jboss. To to write spring webservice client,
I'm about to create a JavaScript-based client for a RESTful webservice. The client should
My client has specified a WSDL file as contract for a web service that
I have to implement client server based app where client is windows app. Now,

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.