I think there may be a TCP connection timeout at the operating system level
that cannot be controlled by Java.

Upul


On Jan 28, 2008 10:08 AM, acmclellen <[EMAIL PROTECTED]> wrote:

>
> Hi Saminda,
>
> I had already tried that, and that didn't work either. I'm trying to run
> an
> axis2 client within and axis2 webservice, and for some reason, the timeout
> I'm specifying isn't being registered. I resorted to the code below as I
> had
> tried everything else including what you have just proposed I do. I've
> tried
> running the client from a normal web app and that worked as well as within
> a
> junit test, which worked too. So it has to be because it's an axis2
> webservice.
>
> Thanks.
> Cheers,
> Craig
>
>
>
>
> Saminda Abeyruwan-3 wrote:
> >
> > Hi,
> >
> > All you have to do is, set
> > options.setTimeOutInMilliSeconds(1000000);
> >
> > in the client code. You don't have to go into internals of HTTPClient.
> > Once
> > set it like prior, this will automatically configure the httpclien.
> >
> > If you need set timeout to be indefinite; then set
> > options.setTimeOutInMilliSeconds(-1);  but I wouldn't recommend this.
> >
> > Thank you
> >
> > Saminda
> >
> > On Jan 23, 2008 7:15 PM, acmclellen <[EMAIL PROTECTED]> wrote:
> >
> >>
> >> Hi,
> >>
> >> My client initialization code is as below, and on submitting a request
> to
> >> the web service, it still times-out after 15 seconds. Please help!!
> >>
> >> Thank you.
> >> Regards,
> >> Craig
> >>
> >> =========begin=========
> >> MultiThreadedHttpConnectionManager manager =
> >>        new MultiThreadedHttpConnectionManager();
> >> HttpConnectionManagerParams params = manager.getParams();
> >> params.setSoTimeout(0);
> >> params.setConnectionTimeout(0);
> >> manager.setParams(params);
> >>
> >> HttpClientParams p = new HttpClientParams();
> >> p.setSoTimeout(0);
> >> p.setConnectionManagerTimeout(0);
> >>
> >> HttpClient httpClient = new HttpClient(p, manager);
> >> Options options;
> >> options = serviceClient.getOptions();
> >> options.setProperty(
> >>        HTTPConstants.CACHED_HTTP_CLIENT, httpClient);
> >> options.setProperty(
> >>        HTTPConstants.REUSE_HTTP_CLIENT, Boolean.TRUE);
> >>
> >> options.setTimeOutInMilliSeconds(0);
> >> options.setCallTransportCleanup(true);
> >>
> >> =========end=========
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/axis2-client-timeout-even-with-timeouts-set-to-0-tp15041918p15041918.html
> >> Sent from the Axis - Dev mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> >
> > --
> > Saminda Abeyruwan
> >
> > Senior Software Engineer
> > WSO2 Inc. - www.wso2.org
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/axis2-client-timeout-even-with-timeouts-set-to-0-tp15041918p15128266.html
> Sent from the Axis - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to