If you are using SOAP 2.3.1, the timeout only applies to read/write. That is because
SOAP 2.3.1 was released when JDK 1.3 was current, and JDK 1.3 did not support a
timeout for the socket connect. The "nightly" build of Apache SOAP supports timeout
for connect if you are using JDK 1.4 or later.
Scott Nichol
Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message -----
From: "Ching, Vivian M, ALABS" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 20, 2004 6:39 PM
Subject: setTimeout
Hi-
I am trying the set the timeout value for soap request,
using the code below. The send/receive is still waiting
40 seconds before I get the java.net.ConnectException:
Connection timed out.
Is this timeout for the recieve only and I am blocked on
the send? If so, how do I set the connection timeout?
Any help will be greatly appreciated!
Thanks in advance,
Envelope env = null;
Message msg = new Message();
SOAPHTTPConnection st = new SOAPHTTPConnection();
msg.setSOAPTransport(st);
st.setTimeout(2000);
try {
msg.send(new URL(sURL), soapAction, requestEnvelope);
env = msg.receiveEnvelope();
}
Vivian Ching
AT&T
MT A2-2E04
200 S Laurel Avenue
Middletown, NJ 07748
732.420.2452