1 Reply Latest reply on Nov 15, 2008 3:38 PM by Robert Perry

    Setting org.jboss.ws.timeout on client

    s johnck Newbie

      Hello,

      I'm trying to set the timeout value on my jax-ws client in Jboss-4.2.1.GA and Jbossws-1.2.1 without success. Any help at all would be much appreciated.

      I've tried via jboss-client.xml like so

      <jboss-client>
       <jndi-name>jbossws-client</jndi-name>
       <service-ref>
       <service-ref-name>Activity Authorized</service-ref-name>
       <port-component-ref>
       <service-endpoint-interface>com.mycompany.webservices.client.ActivityAuthorizedService</service-endpoint-interface>
       <port-qname>{http://webservices.mycompany.com/}ActivityAuthorized</port-qname>
       <stub-property>
       <name>org.jboss.ws.timeout</name>
       <value>10</value>
       </stub-property>
       </port-component-ref>
       </service-ref>
      </jboss-client>
      

      Without luck.

      I've also tried programmatically via info from the wiki

      ActivityAuthorized endpoint = service.getActivityAuthorizedPort();
      
       Stub stub = (Stub)endpoint;
       stub._setProperty(StubExt.PROPERTY_CLIENT_TIMEOUT0, "10");
      


      But this results in a classcast on the 2nd line.

      Here is my generated client service

      @WebServiceClient(name = "ActivityAuthorizedService", targetNamespace = "http://webservices.mycompany.com", wsdlLocation = "http://localhost/services-1.0-SNAPSHOT/ActivityAuthorized?wsdl")
      public class ActivityAuthorizedService
       extends Service
      {
      
       private final static URL ACTIVITYAUTHORIZEDSERVICE_WSDL_LOCATION;
      
       static {
       URL url = null;
       try {
       url = new URL("http://localhost/services-1.0-SNAPSHOT/ActivityAuthorized?wsdl");
       } catch (MalformedURLException e) {
       e.printStackTrace();
       }
       ACTIVITYAUTHORIZEDSERVICE_WSDL_LOCATION = url;
       }
      
       public ActivityAuthorizedService(URL wsdlLocation, QName serviceName) {
       super(wsdlLocation, serviceName);
       }
      
       public ActivityAuthorizedService() {
       super(ACTIVITYAUTHORIZEDSERVICE_WSDL_LOCATION, new QName("http://webservices.mycompany.com", "ActivityAuthorizedService"));
       }
      
       /**
       *
       * @return
       * returns ActivityAuthorized
       */
       @WebEndpoint(name = "ActivityAuthorizedPort")
       public ActivityAuthorized getActivityAuthorizedPort() {
       return (ActivityAuthorized)super.getPort(new QName("http://webservices.mycompany.com", "ActivityAuthorizedPort"), ActivityAuthorized.class);
       }@WebServiceClient(name = "ActivityAuthorizedService", targetNamespace = "http://webservices.mycompany.com", wsdlLocation = "http://localhost/services-1.0-SNAPSHOT/ActivityAuthorized?wsdl")
      public class ActivityAuthorizedService
       extends Service
      {
      
       private final static URL ACTIVITYAUTHORIZEDSERVICE_WSDL_LOCATION;
      
       static {
       URL url = null;
       try {
       url = new URL("http://localhost/services-1.0-SNAPSHOT/ActivityAuthorized?wsdl");
       } catch (MalformedURLException e) {
       e.printStackTrace();
       }
       ACTIVITYAUTHORIZEDSERVICE_WSDL_LOCATION = url;
       }
      
       public ActivityAuthorizedService(URL wsdlLocation, QName serviceName) {
       super(wsdlLocation, serviceName);
       }
      
       public ActivityAuthorizedService() {
       super(ACTIVITYAUTHORIZEDSERVICE_WSDL_LOCATION, new QName("http://webservices.mycompany.com", "ActivityAuthorizedService"));
       }
      
       /**
       *
       * @return
       * returns ActivityAuthorized
       */
       @WebEndpoint(name = "ActivityAuthorizedPort")
       public ActivityAuthorized getActivityAuthorizedPort() {
       return (ActivityAuthorized)super.getPort(new QNamwebservicese("http://webservices.mycompany.com", "ActivityAuthorizedPort"), ActivityAuthorized.class);
       }