Add timeout to service jboss -
i want add timeout service in jboss.
the problem when run row wsdl:
service service = service.create(wsdlurl, servicename);
i timeout wsdl this:
org.jboss.ws.core.wstimeoutexception: timeout after: 30000ms
i try add timeout service like:
((bindingprovider)service).getrequestcontext().put("com.sun.xml.internal.ws.request.timeout", 500); // ((bindingprovider)service).getrequestcontext().put("com.sun.xml.internal.ws.connect.timeout", 500);
but have exception. reason that?
try javax.xml.ws.client.connectiontimeout
, javax.xml.ws.client.receivetimeout
.
eg:
//set timeout until connection established ((bindingprovider)port).getrequestcontext().put("javax.xml.ws.client.connectiontimeout", "6000"); //set timeout until response received ((bindingprovider) port).getrequestcontext().put("javax.xml.ws.client.receivetimeout", "1000");
Comments
Post a Comment