1 Reply Latest reply on Jul 13, 2011 7:33 AM by oliverspecht

    JBoss6 webservice read timeout

    oliverspecht

      Hi,

      I tried to change the read timeout for my Webservice deployed on a JBoss6.

       

      I tried the following options which I found over the internet

       

          ((BindingProvider) services).getRequestContext().put("org.jboss.ws.timeout", 10000);
          ((BindingProvider) services).getRequestContext().put("javax.xml.ws.connect.timeout", 10000);
          ((BindingProvider) services).getRequestContext().put("javax.xml.ws.connect.timeout", 10000);
          ((BindingProvider) services).getRequestContext().put("com.sun.xml.ws.request.timeout", 10000); // Timeout in millis
          ((BindingProvider) services).getRequestContext().put("com.sun.xml.ws.connect.timeout", 10000); // Timeout in millis
          ((BindingProvider) services).getRequestContext().put("com.sun.xml.internal.ws.request.timeout", 10000); // Timeout in millis
          ((BindingProvider) services).getRequestContext().put("com.sun.xml.internal.ws.connect.timeout", 10000); // Timeout in millis
          ((BindingProvider) services).getRequestContext().put(StubExt.PROPERTY_CLIENT_TIMEOUT, 10000);
          ((BindingProvider) services).getRequestContext().put(StubExt.PROPERTY_CONNECTION_TIMEOUT, 10000);

       

      None of them worked. Can anyone help me? This is very, very confusing.

       

      My Webservice was created from a WSDL via JAX and looks like this:

       

      /**

      * SOAP-Service.

      *

      * This class was generated by the JAX-WS RI. JAX-WS RI 2.1.6 in JDK 6 Generated source version: 2.1

      */

      @WebServiceClient(name = "<NAME>", targetNamespace = "<TARGET_NS>")

      public class SmartWheelsService extends Service {

      ...

      }

       

      Thanks,

      Oliver

        • 1. Re: JBoss6 webservice read timeout
          oliverspecht

          Since no one knows anything about ist, this is the solution I found:

           

          Client cl = ClientProxy.getClient(services);

          HTTPConduit http = (HTTPConduit) cl.getConduit();

          HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();

          httpClientPolicy.setConnectionTimeout(0);

          httpClientPolicy.setReceiveTimeout(0);

          http.setClient(httpClientPolicy);