users@saaj.java.net

Re: [SAAJ-USR] Q: Setting HTTP client socket timeouts for SAAJ client?

From: V B Kumar Jayanti <Vbkumar.Jayanti_at_Sun.COM>
Date: Tue, 05 Jun 2007 16:28:47 +0530

Andreas Loew wrote:

> Sorry, Kumar,
>
> V B Kumar Jayanti schrieb:
>
>>> I don't know whether overriding the SOAPConnectionFactory will do
>>> the trick:
>>
>>
>> It will do the trick, because when you override the
>> SOAPConnectionFactory, you no longer use the HttpSOAPConnection.java
>> from SAAJ RI. You can instead return your own HttpSOAPConnection
>> implementation when the createConnection() method gets called on your
>> Factory.
>
>
> and what will my own provided HttpSOAPConnection have to look like in
> order to create HttpURLConnections that take the socket timeouts into
> account?
>
> In the end, I think I would also have to do an
>
> endpointURL.openConnection()
>
> somewhere in my "CustomHttpSOAPConnection" code. In how far
> could/would this be different from the call that the default
> HttpSOAPConnection issues, and allow for the socket timeouts to be
> passed!?
>
> So do you have any pointers or sample code of how I will have to
> change HttpSOAPConnection?

I don't have any pointers. But since you said you need a short term
workaround, i thought the best way is for the CustomHttpSOAPConnection
to extend/reuse the existing HttpSOAPConnection and somehow make sure
that it uses those timeout properties if they are set. Will that not
work for you ?.

regards,
kumar

>
> Thanks again!
>
> Andreas
>