Setting timeout for for JAX-WS Webservice clients generated from clientgen
Use below options:
import javax.xml.ws.BindingProvider;
import javax.xml.ws.handler.MessageContext;
import com.sun.xml.ws.developer.JAXWSProperties;
import com.sun.xml.ws.client.BindingProviderProperties;
/*
The following classes are inside
import com.sun.xml.ws.developer.JAXWSProperties;
import com.sun.xml.ws.client.BindingProviderProperties;
%WLSINSTALLATION%\modules\glassfish.jaxws.rt_1.1.0.0_2-1-4.jar
*/
Map requestContext = ((BindingProvider)port).getRequestContext();
requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
"http://localhost.com/<webservice>");
requestContext.put(JAXWSProperties.CONNECT_TIMEOUT, 300);
requestContext.put(BindingProviderProperties.REQUEST_TIMEOUT, 300);
Also see
Setting Timeout for Weblogic Webservice Client and for all clients
Setting timeout for for JAX-RPC Webservice clients generated from clientgen
Use below options:
import javax.xml.ws.BindingProvider;
import javax.xml.ws.handler.MessageContext;
import com.sun.xml.ws.developer.JAXWSProperties;
import com.sun.xml.ws.client.BindingProviderProperties;
/*
The following classes are inside
import com.sun.xml.ws.developer.JAXWSProperties;
import com.sun.xml.ws.client.BindingProviderProperties;
%WLSINSTALLATION%\modules\glassfish.jaxws.rt_1.1.0.0_2-1-4.jar
*/
Map requestContext = ((BindingProvider)port).getRequestContext();
requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
"http://localhost.com/<webservice>");
requestContext.put(JAXWSProperties.CONNECT_TIMEOUT, 300);
requestContext.put(BindingProviderProperties.REQUEST_TIMEOUT, 300);
Also see
Setting Timeout for Weblogic Webservice Client and for all clients
Setting timeout for for JAX-RPC Webservice clients generated from clientgen
No comments:
Post a Comment