We are accessing SOAP based WebServices ( using JAX-WS ) on WebSphere Liberty (24.0.0.5) and are looking for the best way to configure communication timeouts like connect-timeout, receive-timeout for our deployment. Ideally without having to change the Java code.
For JAX-RS there is a server.xml configuration element webTarget which seems to do exactly what we are looking for for the JAX-WS implementation.
For JAX-WS we have not found any server.xml configuration element to achieve that. The best we've found so far is using the http.conduit.client properties but these require modification of the Java code. Is there any equivalent to the webTarget configuration element for JAX-WS?
There are a couple of options if you don't want to use the ibm-ws-bnd.xml. The first is that the same configuration from the ibm-ws-bnd.xml can be set in the server.xml under the application, webApplication, or enterpriseApplication using the webservices-bnd like any of the other application bindings.
An example of the config would look something like this:
<webApplication id="httpConduitProperties" name="httpConduitProperties" location="httpConduitProperties.war">
<webservices-bnd>
<service-ref name="service/SimpleEchoService" port-address="http://localhost:${bvt.prop.HTTP_default}/httpConduitProperties/SimpleEchoService">
<properties http.conduit.client.ConnectionTimeout="10000" http.conduit.client.ReceiveTimeout="15000" />
</service-ref>
</webservices-bnd>
</webApplication>
The caveat is that this config only works with WebSeviceRef clients. The javax.xml.ws.client.* properties should also work for non-dispatch type clients, provided you programmatically set them on the BindindingProvider request context.