Wildfly 8.2/undertow read time out

前端 未结 3 719
我寻月下人不归
我寻月下人不归 2021-01-13 20:24

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

3条回答
  •  庸人自扰
    2021-01-13 21:10

    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
    

提交回复
热议问题