httpClientPolicy.setReceiveTimeout(1000);

That's a timeout of one second. It wouldn't surprise me if you are getting a Read Timeout on the first bunch of requests if they are of any significant size as the JIT probably has not compile the code yet, caches aren't filled in, etc....

On Jul 30, 2008, at 1:55 PM, nmt999 wrote:

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

Ummm....  "Read timed out error"

Isn't that the same a s request timed out?


Dan






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.


---
Daniel Kulp
[EMAIL PROTECTED]
http://www.dankulp.com/blog




Reply via email to