Andreas Loew wrote:
> Kumar,
>
> V B Kumar Jayanti schrieb:
>
>> Hi Andreas,
>>
>> SAAJ Allows you to Override the SOAPConnectionFactory via
>> META-INF/services.
>>
>> Just change the META-INF/services entry named
>> "javax.xml.soap.SOAPConnectionFactory" to contain the fully qualified
>> package name of your Extended Implementation.
>>
>> If you want a support for these properties in SAAJ RI then please
>> file an RFE (P4).
>
>
> I'll consider filing an RFE, but mainly, I still need a short-term
> solution (i.e. using a "workaround" is fine).
>
> 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.
regards,
kumar
>
> I think the starting point is line 718ff. of HttpSOAPConnection.java
> which reads
>
> 718 private java.net.HttpURLConnection createConnection(URL
> endpoint)
> 719 throws IOException {
> 720 return (HttpURLConnection) endpoint.openConnection();
> 721 }
>
> Here, even in its unchanged form, URL#openConnection() in line 720
> should (at least, to my knowledge), detect that already I overrode the
> target URL's URLStreamHandlerFactory *before* by calling
>
> webserviceURL.setURLStreamHandlerFactory(new
> HttpTimeoutHandlerFactory(connectTimeout, readTimeout));
>
> on the exact same URL instance which is passed as "endpoint" into the
> ScreateConnection() method:
>
> SOAPConnection conn =
> SOAPConnectionFactory.newInstance().createConnection();
> SOAPMessage response = conn.call(message, webserviceURL);
>
> Still, it does *NOT* seem to work...!?
>
> Any additional ideas/thoughts on this?
>
> Thanks again & best regards,
>
> Andreas
>