//1 minute for connection((BindingProvider) wsPort).getRequestContext().put("com.sun.xml.ws.connect.timeout",1*60*1000);//3 minutos for request((BindingProvider) wsPort).getRequestContext().put("com.sun.xml.ws.request.timeout",3*60*1000);
Actually that is what said in 1st answer (and in the question itself) Also maybe it makes sense to import com.sun.xml.ws.developer.JAXWSProperties and useJAXWSProperties.CONNECT_TIMEOUT and JAXWSProperties.REQUEST_TIMEOUT if someone is not afraid to couple with Sun internals. –
dma_kSep 29 '10 at 8:03
Eww, string keys. Just what I should never have to see in a type-safe language. Whoever designed this API should burn in a fire. –
TrejkazFeb 4 at 2:17
If you are using a Sun JRE, you can set the following system properties for default network connect and read timeouts (in milliseconds). I haven't tried these with the JAX-WS client, but they ought work there as well:
import com.sun.xml.ws.developer.JAXWSProperties
and useJAXWSProperties.CONNECT_TIMEOUT
andJAXWSProperties.REQUEST_TIMEOUT
if someone is not afraid to couple with Sun internals. – dma_k Sep 29 '10 at 8:03