Configurare il timeout in un jaxws client di cxfInviato da valerio il Gio, 02/28/2013 - 13:31 |
Per configurare il timeout di un client jaxws occorre agire sulla configurazione dell'http conduit, il file xml del contesto di spring risultante sarà il seguente:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd">
<!-- Root Context: defines shared resources visible to all other web components -->
<http-conf:conduit name="*.http-conduit">
<http-conf:client ConnectionTimeout="10000" ReceiveTimeout="10000"/>
</http-conf:conduit>
<jaxws:client id="example"
serviceClass="it.valerioangelici.ws.jaxwsExample"
address="http://localhost:8080/jaxwsExample/ws/" />
</beans>
Per informazioni sulla configurazione dell'elemento <jaxws:client> consultare la pagina di documentazione di cxf: