how to set soap connection timeout

S

sauwing.wong

Hi all,

Can you englighten me the way to set the connection timeout in using
Apache Soap?

I search the SOAPHTTPConnection API, but find only setTimeout(timeout)
which is for read (response) timeout.

Thanks for your help in advance,

Sau Wing
 
M

Mike Schilling

Hi all,

Can you englighten me the way to set the connection timeout in using
Apache Soap?

I search the SOAPHTTPConnection API, but find only setTimeout(timeout)
which is for read (response) timeout.

To the best of my knowledge, there's no way in Java to set the connection
timeout for a socket. (If there is a way, I'd like to know what it is.)
 
E

EJP

Mike said:
To the best of my knowledge, there's no way in Java to set the connection
timeout for a socket. (If there is a way, I'd like to know what it is.)

(a) public void Socket.connect(SocketAddress address, int timeout);

(b) socketChannel.setBlocking(false);
socketChannel.connect();
socketChannel.register(selector,OP_CONNECT);
selector.select(timeout);

(c) public void URLConnection.setConnectTimeout(int timeout);

(d) -Dsun.net.client.defaultConnectTimeout=<timeout>

(e) -Dsun.rmi.transport.proxy.connectTimeout=<timeout>

....
 
M

Mike Schilling

Thanks. I was behind the times.
(a) public void Socket.connect(SocketAddress address, int timeout);

Added in 1.4
(b) socketChannel.setBlocking(false);
socketChannel.connect();
socketChannel.register(selector,OP_CONNECT);
selector.select(timeout);

Added in 1.4.
(c) public void URLConnection.setConnectTimeout(int timeout);

Added in 1.5.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top