I recently migrated my project from jboss4 to wildfly 8.2 with java1.8. I have a webservice call using SAAJ which runs fine in command line. But when its run from within wil
Alternatively, this issue has been resolved in wildfly 9. Developers can override the default CXF HTTP conduit values by setting system properties. More detail is available at https://docs.jboss.org/author/display/WFLY9/Apache+CXF+integration#ApacheCXFintegration-ApacheCXFinterceptors
I was able to fix this by changing receive timeout in apache-cxf source and rebuilding it for wildfly8.2
Brief instructions: (versions have to be exactly these otherwise compile fails).
File that has HTTPConduit socket timeout is HTTPClientPolicy.java which is in ./rt/transports/http/target/cxf-rt-transports-http-2.7.15.jar. Copy this jar into wildfly8.2 modules under apache/cxf/impl/main folder. And also, edit module.xml to use this jar.
I also had to change undertow read-timeout settings in standalone.xml to higher value to stop it from reattempting the request.
Hope this helps.
Enough to add the following code to Your webservice consumer:
//import javax.xml.ws.BindingProvider;
//Set timeout until a connection is established
((BindingProvider)this.myService).getRequestContext().put("javax.xml.ws.client.connectionTimeout", "60000"); //one minute
//Set timeout until the response is received
((BindingProvider)this.myService).getRequestContext().put("javax.xml.ws.client.receiveTimeout", "600000"); //ten minutes