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"); 

ref: develop jax-ws client application


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -