Search code examples
javaweb-servicesspringtimeoutjax-ws

JaxWsPortProxyFactoryBean query timeout


I'm using a JaxWsPortProxyFactoryBean (from Spring framework) to access a web-service. I would like to change the timeout of the http queries I'm sending. Is there a way to do this?

Thank you by advance for any help


Solution

  • Looks like there is a way as per the documentation of JaxWsPortProxyFactoryBean it has a the following method

    addCustomProperty(String name, Object value)
    

    Use JAXWSProperties.CONNECT_TIMEOUT or com.sun.xml.ws.request.timeout appropriately.

    Check: https://jax-ws.dev.java.net/guide/HTTP_Timeouts.html