You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Lei Chen <Le...@sfcommerce.com> on 2001/08/17 20:14:36 UTC

RE: SOAPHTTPConnection.setTimeout - does it work?

Just trying to refresh this month-old thread :)

I don't think the setTimeout method is working, at least from messaging
point of view. I tried to set the value to 1, 50, 1000 and 5000, but nothing
happens i.e. I am getting responses as normal. No exception was ever thrown.
So what is the expected behavior of this method. SOAP documentation doesn't
have lot of detail on this.

Can anybody help please???

Thanks,

Lei  Chen
lei.chen@sfcommerce.com




-----Original Message-----
From: Heitzso [mailto:heitzso@home.com]
Sent: Monday, July 23, 2001 3:28 PM
To: soap-user@xml.apache.org
Subject: Re: SOAPHTTPConnection.setTimeout - does it work?

Paula,

I remember seeing it embedded in an exception.  I didn't bother
to parse out the words to flag that particular exception.

So, re can you detect?  Yes, but you'll want to run a test that
breaks on the timeout, note the exact text of the exception,
and search for some key phrase that you find in it.

Heitzso

>
>  I forgot to ask, if it does timeout, will that come back to me as a SOAP
>exception?  IE., will I be able to detect the 5-sec timeout I set up
>expired?
>
>signed, Paula
>


RE: SOAPHTTPConnection.setTimeout - does it work?

Posted by Radek Wisniewski <rw...@datenknecht.de>.
On Fri, 17 Aug 2001, Paula Young wrote:

> RE: SOAPHTTPConnection.setTimeout - does it work?Lei,
>
> I am getting the timeout event jsut fine.  My implementation looks like:
>
>      Call call = new Call();
>
>      SOAPHTTPConnection shc   = new SOAPHTTPConnection();
>      shc.setTimeout(5 * 1000);   // to break-out of invoke() in 5-secs if
> remote doesn't respond fast enough
>      call.setSOAPTransport(shc);
>      call.setSOAPMappingRegistry(smr);
>
> My env is:
> HP-UX  B.11.00 U 9000/800
> JDK 1.3
> Apache SOAP 2.2
>
> Regards,
> Paula
>
> ...now if I can only find the place in the TCP Tunnel GUI to flush the
> output stream so that my client doesn't timeout all the time due to TTG
> holding on to the the request I'd be fine!  At least it helps me know that
> my setTimeout() logic is working correctly!

Worth of time! I lost for it some ours.
I'v found this and modified code, but that still doesnt
work ON LINUX (JDK 1.3.1) only, on Windows it runs well so client dosn't
wait any time on response.

What intersting, your client becomes answer from tunel GUI if you STOP
and START GUI proces (just with Ctrl-Z, and fg command), but then happens
braking of connection with server and GUI throws exeption.
It's probably en unrecognized and hard to debug eror in
InputStream or OutputStream returned by Socket implementation (probably on
native code level).

Radek Winsniewski
www.datenknecht.de


>   -----Original Message-----
>   From: Lei Chen [mailto:Lei.Chen@sfcommerce.com]
>   Sent: Friday, August 17, 2001 2:15 PM
>   To: 'soap-user@xml.apache.org'
>   Subject: RE: SOAPHTTPConnection.setTimeout - does it work?
>
>
>   Just trying to refresh this month-old thread :)
>
>   I don't think the setTimeout method is working, at least from messaging
> point of view. I tried to set the value to 1, 50, 1000 and 5000, but nothing
> happens i.e. I am getting responses as normal. No exception was ever thrown.
> So what is the expected behavior of this method. SOAP documentation doesn't
> have lot of detail on this.
>
>   Can anybody help please???
>
>   Thanks,
>
>   Lei  Chen
>   lei.chen@sfcommerce.com
>
>
>
>
>
>   -----Original Message-----
>   From: Heitzso [mailto:heitzso@home.com]
>   Sent: Monday, July 23, 2001 3:28 PM
>   To: soap-user@xml.apache.org
>   Subject: Re: SOAPHTTPConnection.setTimeout - does it work?
>
>   Paula,
>
>   I remember seeing it embedded in an exception.  I didn't bother
>   to parse out the words to flag that particular exception.
>
>   So, re can you detect?  Yes, but you'll want to run a test that
>   breaks on the timeout, note the exact text of the exception,
>   and search for some key phrase that you find in it.
>
>   Heitzso
>
>   >
>   >  I forgot to ask, if it does timeout, will that come back to me as a
> SOAP
>   >exception?  IE., will I be able to detect the 5-sec timeout I set up
>   >expired?
>   >
>   >signed, Paula
>   >
>
>


RE: SOAPHTTPConnection.setTimeout - does it work?

Posted by Radek Wisniewski <rw...@datenknecht.de>.
On Fri, 17 Aug 2001, Paula Young wrote:

> RE: SOAPHTTPConnection.setTimeout - does it work?Lei,
>
> I am getting the timeout event jsut fine.  My implementation looks like:
>
>      Call call = new Call();
>
>      SOAPHTTPConnection shc   = new SOAPHTTPConnection();
>      shc.setTimeout(5 * 1000);   // to break-out of invoke() in 5-secs if
> remote doesn't respond fast enough
>      call.setSOAPTransport(shc);
>      call.setSOAPMappingRegistry(smr);
>
> My env is:
> HP-UX  B.11.00 U 9000/800
> JDK 1.3
> Apache SOAP 2.2
>
> Regards,
> Paula
>
> ...now if I can only find the place in the TCP Tunnel GUI to flush the
> output stream so that my client doesn't timeout all the time due to TTG
> holding on to the the request I'd be fine!  At least it helps me know that
> my setTimeout() logic is working correctly!

Worth of time! I lost for it some ours.
I'v found this and modified code, but that still doesnt
work ON LINUX (JDK 1.3.1) only, on Windows it runs well so client dosn't
wait any time on response.

What intersting, your client becomes answer from tunel GUI if you STOP
and START GUI proces (just with Ctrl-Z, and fg command), but then happens
braking of connection with server and GUI throws exeption.
It's probably en unrecognized and hard to debug eror in
InputStream or OutputStream returned by Socket implementation (probably on
native code level).

Radek Winsniewski
www.datenknecht.de


>   -----Original Message-----
>   From: Lei Chen [mailto:Lei.Chen@sfcommerce.com]
>   Sent: Friday, August 17, 2001 2:15 PM
>   To: 'soap-user@xml.apache.org'
>   Subject: RE: SOAPHTTPConnection.setTimeout - does it work?
>
>
>   Just trying to refresh this month-old thread :)
>
>   I don't think the setTimeout method is working, at least from messaging
> point of view. I tried to set the value to 1, 50, 1000 and 5000, but nothing
> happens i.e. I am getting responses as normal. No exception was ever thrown.
> So what is the expected behavior of this method. SOAP documentation doesn't
> have lot of detail on this.
>
>   Can anybody help please???
>
>   Thanks,
>
>   Lei  Chen
>   lei.chen@sfcommerce.com
>
>
>
>
>
>   -----Original Message-----
>   From: Heitzso [mailto:heitzso@home.com]
>   Sent: Monday, July 23, 2001 3:28 PM
>   To: soap-user@xml.apache.org
>   Subject: Re: SOAPHTTPConnection.setTimeout - does it work?
>
>   Paula,
>
>   I remember seeing it embedded in an exception.  I didn't bother
>   to parse out the words to flag that particular exception.
>
>   So, re can you detect?  Yes, but you'll want to run a test that
>   breaks on the timeout, note the exact text of the exception,
>   and search for some key phrase that you find in it.
>
>   Heitzso
>
>   >
>   >  I forgot to ask, if it does timeout, will that come back to me as a
> SOAP
>   >exception?  IE., will I be able to detect the 5-sec timeout I set up
>   >expired?
>   >
>   >signed, Paula
>   >
>
>


RE: SOAPHTTPConnection.setTimeout - does it work?

Posted by Paula Young <py...@invertix.com>.
RE: SOAPHTTPConnection.setTimeout - does it work?Lei,

I am getting the timeout event jsut fine.  My implementation looks like:

     Call call = new Call();

     SOAPHTTPConnection shc   = new SOAPHTTPConnection();
     shc.setTimeout(5 * 1000);   // to break-out of invoke() in 5-secs if
remote doesn't respond fast enough
     call.setSOAPTransport(shc);
     call.setSOAPMappingRegistry(smr);

My env is:
HP-UX  B.11.00 U 9000/800
JDK 1.3
Apache SOAP 2.2

Regards,
Paula

...now if I can only find the place in the TCP Tunnel GUI to flush the
output stream so that my client doesn't timeout all the time due to TTG
holding on to the the request I'd be fine!  At least it helps me know that
my setTimeout() logic is working correctly!
  -----Original Message-----
  From: Lei Chen [mailto:Lei.Chen@sfcommerce.com]
  Sent: Friday, August 17, 2001 2:15 PM
  To: 'soap-user@xml.apache.org'
  Subject: RE: SOAPHTTPConnection.setTimeout - does it work?


  Just trying to refresh this month-old thread :)

  I don't think the setTimeout method is working, at least from messaging
point of view. I tried to set the value to 1, 50, 1000 and 5000, but nothing
happens i.e. I am getting responses as normal. No exception was ever thrown.
So what is the expected behavior of this method. SOAP documentation doesn't
have lot of detail on this.

  Can anybody help please???

  Thanks,

  Lei  Chen
  lei.chen@sfcommerce.com





  -----Original Message-----
  From: Heitzso [mailto:heitzso@home.com]
  Sent: Monday, July 23, 2001 3:28 PM
  To: soap-user@xml.apache.org
  Subject: Re: SOAPHTTPConnection.setTimeout - does it work?

  Paula,

  I remember seeing it embedded in an exception.  I didn't bother
  to parse out the words to flag that particular exception.

  So, re can you detect?  Yes, but you'll want to run a test that
  breaks on the timeout, note the exact text of the exception,
  and search for some key phrase that you find in it.

  Heitzso

  >
  >  I forgot to ask, if it does timeout, will that come back to me as a
SOAP
  >exception?  IE., will I be able to detect the 5-sec timeout I set up
  >expired?
  >
  >signed, Paula
  >


RE: SOAPHTTPConnection.setTimeout - does it work?

Posted by Paula Young <py...@invertix.com>.
RE: SOAPHTTPConnection.setTimeout - does it work?Oh, and here's the
exception I see when the timeout does occur:


try {
      resp = call.invoke(myUrlVal, "");

}    catch (SOAPException es) {
       // A timeout looks like: [SOAPException: faultCode=SOAP-ENV:Client;
      // msg=Read timed out; targetException=java.io.InterruptedIOException:
Read timed out]
      if ( es.getMessage().equals("Read timed out") )
      {
          System.out.println("Detected a timeout on our Request!");
     }
}

--Paula
  -----Original Message-----
  From: Lei Chen [mailto:Lei.Chen@sfcommerce.com]
  Sent: Friday, August 17, 2001 2:15 PM
  To: 'soap-user@xml.apache.org'
  Subject: RE: SOAPHTTPConnection.setTimeout - does it work?


  Just trying to refresh this month-old thread :)

  I don't think the setTimeout method is working, at least from messaging
point of view. I tried to set the value to 1, 50, 1000 and 5000, but nothing
happens i.e. I am getting responses as normal. No exception was ever thrown.
So what is the expected behavior of this method. SOAP documentation doesn't
have lot of detail on this.

  Can anybody help please???

  Thanks,

  Lei  Chen
  lei.chen@sfcommerce.com





  -----Original Message-----
  From: Heitzso [mailto:heitzso@home.com]
  Sent: Monday, July 23, 2001 3:28 PM
  To: soap-user@xml.apache.org
  Subject: Re: SOAPHTTPConnection.setTimeout - does it work?

  Paula,

  I remember seeing it embedded in an exception.  I didn't bother
  to parse out the words to flag that particular exception.

  So, re can you detect?  Yes, but you'll want to run a test that
  breaks on the timeout, note the exact text of the exception,
  and search for some key phrase that you find in it.

  Heitzso

  >
  >  I forgot to ask, if it does timeout, will that come back to me as a
SOAP
  >exception?  IE., will I be able to detect the 5-sec timeout I set up
  >expired?
  >
  >signed, Paula
  >


RE: SOAPHTTPConnection.setTimeout - does it work?

Posted by Paula Young <py...@invertix.com>.
RE: SOAPHTTPConnection.setTimeout - does it work?Oh, and here's the
exception I see when the timeout does occur:


try {
      resp = call.invoke(myUrlVal, "");

}    catch (SOAPException es) {
       // A timeout looks like: [SOAPException: faultCode=SOAP-ENV:Client;
      // msg=Read timed out; targetException=java.io.InterruptedIOException:
Read timed out]
      if ( es.getMessage().equals("Read timed out") )
      {
          System.out.println("Detected a timeout on our Request!");
     }
}

--Paula
  -----Original Message-----
  From: Lei Chen [mailto:Lei.Chen@sfcommerce.com]
  Sent: Friday, August 17, 2001 2:15 PM
  To: 'soap-user@xml.apache.org'
  Subject: RE: SOAPHTTPConnection.setTimeout - does it work?


  Just trying to refresh this month-old thread :)

  I don't think the setTimeout method is working, at least from messaging
point of view. I tried to set the value to 1, 50, 1000 and 5000, but nothing
happens i.e. I am getting responses as normal. No exception was ever thrown.
So what is the expected behavior of this method. SOAP documentation doesn't
have lot of detail on this.

  Can anybody help please???

  Thanks,

  Lei  Chen
  lei.chen@sfcommerce.com





  -----Original Message-----
  From: Heitzso [mailto:heitzso@home.com]
  Sent: Monday, July 23, 2001 3:28 PM
  To: soap-user@xml.apache.org
  Subject: Re: SOAPHTTPConnection.setTimeout - does it work?

  Paula,

  I remember seeing it embedded in an exception.  I didn't bother
  to parse out the words to flag that particular exception.

  So, re can you detect?  Yes, but you'll want to run a test that
  breaks on the timeout, note the exact text of the exception,
  and search for some key phrase that you find in it.

  Heitzso

  >
  >  I forgot to ask, if it does timeout, will that come back to me as a
SOAP
  >exception?  IE., will I be able to detect the 5-sec timeout I set up
  >expired?
  >
  >signed, Paula
  >


RE: SOAPHTTPConnection.setTimeout - does it work?

Posted by Paula Young <py...@invertix.com>.
RE: SOAPHTTPConnection.setTimeout - does it work?Lei,

I am getting the timeout event jsut fine.  My implementation looks like:

     Call call = new Call();

     SOAPHTTPConnection shc   = new SOAPHTTPConnection();
     shc.setTimeout(5 * 1000);   // to break-out of invoke() in 5-secs if
remote doesn't respond fast enough
     call.setSOAPTransport(shc);
     call.setSOAPMappingRegistry(smr);

My env is:
HP-UX  B.11.00 U 9000/800
JDK 1.3
Apache SOAP 2.2

Regards,
Paula

...now if I can only find the place in the TCP Tunnel GUI to flush the
output stream so that my client doesn't timeout all the time due to TTG
holding on to the the request I'd be fine!  At least it helps me know that
my setTimeout() logic is working correctly!
  -----Original Message-----
  From: Lei Chen [mailto:Lei.Chen@sfcommerce.com]
  Sent: Friday, August 17, 2001 2:15 PM
  To: 'soap-user@xml.apache.org'
  Subject: RE: SOAPHTTPConnection.setTimeout - does it work?


  Just trying to refresh this month-old thread :)

  I don't think the setTimeout method is working, at least from messaging
point of view. I tried to set the value to 1, 50, 1000 and 5000, but nothing
happens i.e. I am getting responses as normal. No exception was ever thrown.
So what is the expected behavior of this method. SOAP documentation doesn't
have lot of detail on this.

  Can anybody help please???

  Thanks,

  Lei  Chen
  lei.chen@sfcommerce.com





  -----Original Message-----
  From: Heitzso [mailto:heitzso@home.com]
  Sent: Monday, July 23, 2001 3:28 PM
  To: soap-user@xml.apache.org
  Subject: Re: SOAPHTTPConnection.setTimeout - does it work?

  Paula,

  I remember seeing it embedded in an exception.  I didn't bother
  to parse out the words to flag that particular exception.

  So, re can you detect?  Yes, but you'll want to run a test that
  breaks on the timeout, note the exact text of the exception,
  and search for some key phrase that you find in it.

  Heitzso

  >
  >  I forgot to ask, if it does timeout, will that come back to me as a
SOAP
  >exception?  IE., will I be able to detect the 5-sec timeout I set up
  >expired?
  >
  >signed, Paula
  >