1 Reply Latest reply on May 20, 2008 9:57 AM by 666705

    how to set connection timeout for a non accessable webservice

    666705
      Hi,

      I call a webservice from my code and I encountered a problem when the webservice I call is not accessable (e.g. wrong configuration/firewall problem ...).
      Currently I get a exception after a 'long time' (about 3 minutes).
      But after this time MY CLIENT already got ITS timeout (30 seconds).
      The idea was to decrease the 3-minute timeout.
      I found
      http://e-docs.bea.com/wls/docs100/webserv/client.html#wp228628
      with the property "weblogic.wsee.transport.connection.timeout".
      But I have a problem to set the property.
      Basically I do three steps:

      line 1: PgiServiceActionService_Impl service =
      new PgiServiceActionService_Impl(ATOS_PGI_WEBSERVICE_URL);
      line 2: PgiServiceAction service_action = service.getPgiService();
      line 3: service_action.pgiServiceRequest(req);

      I already get the the timeout in line 1. How can I avoid to wait 3 minutes until I get the exception ?
        • 1. Re: how to set connection timeout for a non accessable webservice
          666705
          I found the solution to my problem. I do now:
               System.setProperty("weblogic.webservice.UseWebLogicURLStreamHandler","true");
               PgiServiceActionService_Impl service = new PgiServiceActionService_Impl();
               PgiServiceAction service_action = service.getPgiService();
               
               ((Stub)service_action)._setProperty("weblogic.wsee.transport.read.timeout",     MY_READ_TIMEOUT);
               ((Stub)service_action)._setProperty("weblogic.wsee.transport.connection.timeout", MY_CONNECT_TIMEOUT);
               ((Stub)service_action)._setProperty("javax.xml.rpc.service.endpoint.address", MY_PGI_WEBSERVICE_URL);