I'm trying to set the setReceiveTimeout for my client. below is the code.
when i call the method using the service created, I was expecting a message
that would convey the msg that request timed out. however i get the error
msg  org.apache.cxf.interceptor.Fault: Read timed out error

    private static MasterAccountService createMasterAccountService(String
aServiceURL)
    {
        MasterAccountService ret = null;

        JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
        factory.getInInterceptors().add(new LoggingInInterceptor());
        factory.getOutInterceptors().add(new LoggingOutInterceptor());
        factory.setServiceClass(MasterAccountService.class);
        factory.setAddress(aServiceURL);
        factory.setBus(BusFactory.getDefaultBus());

        ret = (MasterAccountService) factory.create();
        Client client = ClientProxy.getClient(ret);
        HTTPConduit http = (HTTPConduit) client.getConduit();

        HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
        httpClientPolicy.setReceiveTimeout(1000); 
               
        http.setClient(httpClientPolicy);
        
        return ret;
    }

Error msg:
     [java] org.apache.cxf.interceptor.Fault: Read timed out
     [java] at
org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:95)
     [java] at
org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68)
     [java] at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
     [java] at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296)
     [java] at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242)
     [java] at
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
     [java] at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:178)
-- 
View this message in context: 
http://www.nabble.com/client-receive-timeout-gives-org.apache.cxf.interceptor.Fault%3A-Read-timed-out-error-tp18739016p18739016.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to