how to set soap connection timeout

Discussion in 'Java' started by sauwing.wong@gmail.com, Jan 15, 2007.

  1. Guest

    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
     
    , Jan 15, 2007
    #1
    1. Advertising

  2. <> wrote in message
    news:...
    > 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.)
     
    Mike Schilling, Jan 15, 2007
    #2
    1. Advertising

  3. EJP Guest

    Mike Schilling wrote:

    > 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>

    ....
     
    EJP, Jan 15, 2007
    #3
  4. "EJP" <> wrote in message
    news:0dFqh.1304$...
    > Mike Schilling wrote:
    >
    >> 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.)

    >


    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.
     
    Mike Schilling, Jan 15, 2007
    #4
  5. Guest

    thank you very much for your help.

    Mike Schilling wrote:
    > "EJP" <> wrote in message
    > news:0dFqh.1304$...
    > > Mike Schilling wrote:
    > >
    > >> 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.)

    > >

    >
    > 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.
     
    , Jan 16, 2007
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guoqi Zheng
    Replies:
    4
    Views:
    13,126
    Guoqi Zheng
    Jun 3, 2004
  2. RC
    Replies:
    1
    Views:
    40,341
    Sudsy
    Jul 23, 2003
  3. dzizes
    Replies:
    2
    Views:
    733
    dzizes
    Jul 15, 2009
  4. shmuel witman

    Connection timeout (connection closing after 100 sec )

    shmuel witman, Dec 4, 2005, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    925
    shmuel witman
    Dec 6, 2005
  5. Mark Probert

    Timeout::timeout and Socket timeout

    Mark Probert, Oct 6, 2004, in forum: Ruby
    Replies:
    1
    Views:
    1,366
    Brian Candler
    Oct 6, 2004
Loading...

Share This Page