You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by tho huynh ngoc <ng...@gmail.com> on 2015/04/10 18:47:01 UTC
Timed out waiting for response to operation - Apache CXF WS Client
Hi,
I implemented a Apache CXF Client, as following
factory = new JaxWsProxyFactoryBean();
factory.getInInterceptors().add(new LoggingInInterceptor());
factory.getOutInterceptors().add(new LoggingOutInterceptor());
factory.setServiceClass(Service.class);
factory.setAddress("udp://192.168.56.1:9292/print");
service = (Service) factory.create();
I created many clients (1000 clients) sending msg to a UDP server.
After receiving a few responses, some clients throw :
javax.xml.ws.soap.SOAPFaultException: Timed out waiting for response to
operation <http://service/>print.
How to increase the timeout value for waiting of client ?
Best regards,
Re: Timed out waiting for response to operation - Apache CXF WS Client
Posted by tho huynh ngoc <ng...@gmail.com>.
Hi Daniel,
Apart from waiting timeout of client, Can i set a connection timeout
between client and server ?
I tried to set the waiting timeout with high value (60 minutes) at
client-side. A server receives a message and responds it to client after 3
minutes. However, client can't receive this response.
Could you please let me know how to set the connection timeout?
Regards,
2015-04-11 18:36 GMT+02:00 André Costa Lima <an...@gmail.com>:
> I see. I have been using 3.0.0 with JMS and the receiveTimeout parameter
> works just fine when calling a sync web method.
>
> André Costa Lima
>
>
> 2015-04-11 17:21 GMT+01:00 Daniel Kulp <dk...@apache.org>:
>
> >
> > > On Apr 11, 2015, at 11:45 AM, André Costa Lima <
> andreclima.pt@gmail.com>
> > wrote:
> > >
> > > I'm also interested in this question.
> > > Is this property picked up by other transports as well or just UDP?
> >
> > It would be picked up by the transports that are async in nature and rely
> > on the client to wait for the response to come in asynchronously in all
> > cases. UDP works that way. HTTP is normally a synchronous transport
> > where the conduit has to block to wait for a response. Thus, it
> wouldn't
> > pick this up. If you use WS-Addressing with a decoupled endpoint for
> > the response, that should pick it up.
> >
> > I'm not sure about JMS. The JMS transport in 2.x would block if the
> call
> > was synchronous as the spring calls we used worked better in that case.
> > With the JMS transport re-write, I haven't looked at it so I'm not
> really
> > sure.
> >
> > Dan
> >
> >
> >
> >
> > >
> > > Thanks.
> > >
> > > André Costa Lima
> > >
> > >
> > > 2015-04-10 20:35 GMT+01:00 tho huynh ngoc <ng...@gmail.com>:
> > > Thank Daniel,
> > > I added the code:
> > > Map<String, Object> props = new HashMap<String,Object>();
> > > props.put("cxf.synchronous.timeout", new Integer(600000)); //new value
> of
> > > timeout, ex: 10 minutes
> > > factory.setProperties(props);
> > > It works fine.
> > > Tho
> > >
> > > 2015-04-10 19:41 GMT+02:00 Daniel Kulp <dk...@apache.org>:
> > >
> > > > You can set a request property of:
> > > >
> > > > "cxf.synchronous.timeout"
> > > >
> > > > to something higher (in milliseconds). However, the default is 60
> > > > seconds. If you are getting those timeouts, it's quite likely that
> > the UDP
> > > > response was just lost. UDP doesn't have any guarantee delivery.
> > If the
> > > > network is busy or host is busy or any other number of things, it
> > could be
> > > > lost.
> > > >
> > > > Dan
> > > >
> > > >
> > > > > On Apr 10, 2015, at 12:47 PM, tho huynh ngoc <
> ngocthobkdn@gmail.com>
> > > > wrote:
> > > > >
> > > > > Hi,
> > > > >
> > > > > I implemented a Apache CXF Client, as following
> > > > > factory = new JaxWsProxyFactoryBean();
> > > > > factory.getInInterceptors().add(new LoggingInInterceptor());
> > > > > factory.getOutInterceptors().add(new
> LoggingOutInterceptor());
> > > > > factory.setServiceClass(Service.class);
> > > > > factory.setAddress("udp://192.168.56.1:9292/print");
> > > > > service = (Service) factory.create();
> > > > > I created many clients (1000 clients) sending msg to a UDP server.
> > > > > After receiving a few responses, some clients throw :
> > > > > javax.xml.ws.soap.SOAPFaultException: Timed out waiting for
> response
> > to
> > > > > operation <http://service/>print.
> > > > >
> > > > > How to increase the timeout value for waiting of client ?
> > > > >
> > > > > Best regards,
> > > >
> > > > --
> > > > Daniel Kulp
> > > > dkulp@apache.org - http://dankulp.com/blog
> > > > Talend Community Coder - http://coders.talend.com
> > > >
> > > >
> > >
> >
> > --
> > Daniel Kulp
> > dkulp@apache.org - http://dankulp.com/blog
> > Talend Community Coder - http://coders.talend.com
> >
> >
>
Re: Timed out waiting for response to operation - Apache CXF WS Client
Posted by André Costa Lima <an...@gmail.com>.
I see. I have been using 3.0.0 with JMS and the receiveTimeout parameter
works just fine when calling a sync web method.
André Costa Lima
2015-04-11 17:21 GMT+01:00 Daniel Kulp <dk...@apache.org>:
>
> > On Apr 11, 2015, at 11:45 AM, André Costa Lima <an...@gmail.com>
> wrote:
> >
> > I'm also interested in this question.
> > Is this property picked up by other transports as well or just UDP?
>
> It would be picked up by the transports that are async in nature and rely
> on the client to wait for the response to come in asynchronously in all
> cases. UDP works that way. HTTP is normally a synchronous transport
> where the conduit has to block to wait for a response. Thus, it wouldn’t
> pick this up. If you use WS-Addressing with a decoupled endpoint for
> the response, that should pick it up.
>
> I’m not sure about JMS. The JMS transport in 2.x would block if the call
> was synchronous as the spring calls we used worked better in that case.
> With the JMS transport re-write, I haven’t looked at it so I’m not really
> sure.
>
> Dan
>
>
>
>
> >
> > Thanks.
> >
> > André Costa Lima
> >
> >
> > 2015-04-10 20:35 GMT+01:00 tho huynh ngoc <ng...@gmail.com>:
> > Thank Daniel,
> > I added the code:
> > Map<String, Object> props = new HashMap<String,Object>();
> > props.put("cxf.synchronous.timeout", new Integer(600000)); //new value of
> > timeout, ex: 10 minutes
> > factory.setProperties(props);
> > It works fine.
> > Tho
> >
> > 2015-04-10 19:41 GMT+02:00 Daniel Kulp <dk...@apache.org>:
> >
> > > You can set a request property of:
> > >
> > > "cxf.synchronous.timeout"
> > >
> > > to something higher (in milliseconds). However, the default is 60
> > > seconds. If you are getting those timeouts, it's quite likely that
> the UDP
> > > response was just lost. UDP doesn't have any guarantee delivery.
> If the
> > > network is busy or host is busy or any other number of things, it
> could be
> > > lost.
> > >
> > > Dan
> > >
> > >
> > > > On Apr 10, 2015, at 12:47 PM, tho huynh ngoc <ng...@gmail.com>
> > > wrote:
> > > >
> > > > Hi,
> > > >
> > > > I implemented a Apache CXF Client, as following
> > > > factory = new JaxWsProxyFactoryBean();
> > > > factory.getInInterceptors().add(new LoggingInInterceptor());
> > > > factory.getOutInterceptors().add(new LoggingOutInterceptor());
> > > > factory.setServiceClass(Service.class);
> > > > factory.setAddress("udp://192.168.56.1:9292/print");
> > > > service = (Service) factory.create();
> > > > I created many clients (1000 clients) sending msg to a UDP server.
> > > > After receiving a few responses, some clients throw :
> > > > javax.xml.ws.soap.SOAPFaultException: Timed out waiting for response
> to
> > > > operation <http://service/>print.
> > > >
> > > > How to increase the timeout value for waiting of client ?
> > > >
> > > > Best regards,
> > >
> > > --
> > > Daniel Kulp
> > > dkulp@apache.org - http://dankulp.com/blog
> > > Talend Community Coder - http://coders.talend.com
> > >
> > >
> >
>
> --
> Daniel Kulp
> dkulp@apache.org - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com
>
>
Re: Timed out waiting for response to operation - Apache CXF WS Client
Posted by Daniel Kulp <dk...@apache.org>.
> On Apr 11, 2015, at 11:45 AM, André Costa Lima <an...@gmail.com> wrote:
>
> I'm also interested in this question.
> Is this property picked up by other transports as well or just UDP?
It would be picked up by the transports that are async in nature and rely on the client to wait for the response to come in asynchronously in all cases. UDP works that way. HTTP is normally a synchronous transport where the conduit has to block to wait for a response. Thus, it wouldn’t pick this up. If you use WS-Addressing with a decoupled endpoint for the response, that should pick it up.
I’m not sure about JMS. The JMS transport in 2.x would block if the call was synchronous as the spring calls we used worked better in that case. With the JMS transport re-write, I haven’t looked at it so I’m not really sure.
Dan
>
> Thanks.
>
> André Costa Lima
>
>
> 2015-04-10 20:35 GMT+01:00 tho huynh ngoc <ng...@gmail.com>:
> Thank Daniel,
> I added the code:
> Map<String, Object> props = new HashMap<String,Object>();
> props.put("cxf.synchronous.timeout", new Integer(600000)); //new value of
> timeout, ex: 10 minutes
> factory.setProperties(props);
> It works fine.
> Tho
>
> 2015-04-10 19:41 GMT+02:00 Daniel Kulp <dk...@apache.org>:
>
> > You can set a request property of:
> >
> > "cxf.synchronous.timeout"
> >
> > to something higher (in milliseconds). However, the default is 60
> > seconds. If you are getting those timeouts, it's quite likely that the UDP
> > response was just lost. UDP doesn't have any guarantee delivery. If the
> > network is busy or host is busy or any other number of things, it could be
> > lost.
> >
> > Dan
> >
> >
> > > On Apr 10, 2015, at 12:47 PM, tho huynh ngoc <ng...@gmail.com>
> > wrote:
> > >
> > > Hi,
> > >
> > > I implemented a Apache CXF Client, as following
> > > factory = new JaxWsProxyFactoryBean();
> > > factory.getInInterceptors().add(new LoggingInInterceptor());
> > > factory.getOutInterceptors().add(new LoggingOutInterceptor());
> > > factory.setServiceClass(Service.class);
> > > factory.setAddress("udp://192.168.56.1:9292/print");
> > > service = (Service) factory.create();
> > > I created many clients (1000 clients) sending msg to a UDP server.
> > > After receiving a few responses, some clients throw :
> > > javax.xml.ws.soap.SOAPFaultException: Timed out waiting for response to
> > > operation <http://service/>print.
> > >
> > > How to increase the timeout value for waiting of client ?
> > >
> > > Best regards,
> >
> > --
> > Daniel Kulp
> > dkulp@apache.org - http://dankulp.com/blog
> > Talend Community Coder - http://coders.talend.com
> >
> >
>
--
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com
Re: Timed out waiting for response to operation - Apache CXF WS Client
Posted by André Costa Lima <an...@gmail.com>.
Hi Daniel,
I'm also interested in this question.
Is this property picked up by other transports as well or just UDP?
Thanks.
André Costa Lima
2015-04-10 20:35 GMT+01:00 tho huynh ngoc <ng...@gmail.com>:
> Thank Daniel,
> I added the code:
> Map<String, Object> props = new HashMap<String,Object>();
> props.put("cxf.synchronous.timeout", new Integer(600000)); //new value of
> timeout, ex: 10 minutes
> factory.setProperties(props);
> It works fine.
> Tho
>
> 2015-04-10 19:41 GMT+02:00 Daniel Kulp <dk...@apache.org>:
>
> > You can set a request property of:
> >
> > "cxf.synchronous.timeout"
> >
> > to something higher (in milliseconds). However, the default is 60
> > seconds. If you are getting those timeouts, it's quite likely that the
> UDP
> > response was just lost. UDP doesn't have any guarantee delivery. If
> the
> > network is busy or host is busy or any other number of things, it could
> be
> > lost.
> >
> > Dan
> >
> >
> > > On Apr 10, 2015, at 12:47 PM, tho huynh ngoc <ng...@gmail.com>
> > wrote:
> > >
> > > Hi,
> > >
> > > I implemented a Apache CXF Client, as following
> > > factory = new JaxWsProxyFactoryBean();
> > > factory.getInInterceptors().add(new LoggingInInterceptor());
> > > factory.getOutInterceptors().add(new LoggingOutInterceptor());
> > > factory.setServiceClass(Service.class);
> > > factory.setAddress("udp://192.168.56.1:9292/print");
> > > service = (Service) factory.create();
> > > I created many clients (1000 clients) sending msg to a UDP server.
> > > After receiving a few responses, some clients throw :
> > > javax.xml.ws.soap.SOAPFaultException: Timed out waiting for response to
> > > operation <http://service/>print.
> > >
> > > How to increase the timeout value for waiting of client ?
> > >
> > > Best regards,
> >
> > --
> > Daniel Kulp
> > dkulp@apache.org - http://dankulp.com/blog
> > Talend Community Coder - http://coders.talend.com
> >
> >
>
Re: Timed out waiting for response to operation - Apache CXF WS Client
Posted by tho huynh ngoc <ng...@gmail.com>.
Thank Daniel,
I added the code:
Map<String, Object> props = new HashMap<String,Object>();
props.put("cxf.synchronous.timeout", new Integer(600000)); //new value of
timeout, ex: 10 minutes
factory.setProperties(props);
It works fine.
Tho
2015-04-10 19:41 GMT+02:00 Daniel Kulp <dk...@apache.org>:
> You can set a request property of:
>
> "cxf.synchronous.timeout"
>
> to something higher (in milliseconds). However, the default is 60
> seconds. If you are getting those timeouts, it's quite likely that the UDP
> response was just lost. UDP doesn't have any guarantee delivery. If the
> network is busy or host is busy or any other number of things, it could be
> lost.
>
> Dan
>
>
> > On Apr 10, 2015, at 12:47 PM, tho huynh ngoc <ng...@gmail.com>
> wrote:
> >
> > Hi,
> >
> > I implemented a Apache CXF Client, as following
> > factory = new JaxWsProxyFactoryBean();
> > factory.getInInterceptors().add(new LoggingInInterceptor());
> > factory.getOutInterceptors().add(new LoggingOutInterceptor());
> > factory.setServiceClass(Service.class);
> > factory.setAddress("udp://192.168.56.1:9292/print");
> > service = (Service) factory.create();
> > I created many clients (1000 clients) sending msg to a UDP server.
> > After receiving a few responses, some clients throw :
> > javax.xml.ws.soap.SOAPFaultException: Timed out waiting for response to
> > operation <http://service/>print.
> >
> > How to increase the timeout value for waiting of client ?
> >
> > Best regards,
>
> --
> Daniel Kulp
> dkulp@apache.org - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com
>
>
Re: Timed out waiting for response to operation - Apache CXF WS Client
Posted by Daniel Kulp <dk...@apache.org>.
You can set a request property of:
“cxf.synchronous.timeout"
to something higher (in milliseconds). However, the default is 60 seconds. If you are getting those timeouts, it’s quite likely that the UDP response was just lost. UDP doesn’t have any guarantee delivery. If the network is busy or host is busy or any other number of things, it could be lost.
Dan
> On Apr 10, 2015, at 12:47 PM, tho huynh ngoc <ng...@gmail.com> wrote:
>
> Hi,
>
> I implemented a Apache CXF Client, as following
> factory = new JaxWsProxyFactoryBean();
> factory.getInInterceptors().add(new LoggingInInterceptor());
> factory.getOutInterceptors().add(new LoggingOutInterceptor());
> factory.setServiceClass(Service.class);
> factory.setAddress("udp://192.168.56.1:9292/print");
> service = (Service) factory.create();
> I created many clients (1000 clients) sending msg to a UDP server.
> After receiving a few responses, some clients throw :
> javax.xml.ws.soap.SOAPFaultException: Timed out waiting for response to
> operation <http://service/>print.
>
> How to increase the timeout value for waiting of client ?
>
> Best regards,
--
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com