Web service (JAX-WS) timeout

//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);
 
or 

import com.sun.xml.ws.developer.JAXWSProperties
use JAXWSProperties.CONNECT_TIMEOUT and JAXWSProperties.REQUEST_TIMEOUT 
 

留言

這個網誌中的熱門文章

java.lang.NoClassDefFoundError: org/apache/xerces/jaxp/datatype/XMLGregorianCalendarImpl$Parser

10 Tips for Proper Application Logging

Turn off WebLogic basic authentication