You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by kumar5 <de...@gmail.com> on 2016/03/30 22:26:36 UTC
cxf setting timeout
i am call web service using cxf endpoint in java dsl. i not able to set
timeout for this call.
from("direct:stratWS")
.to("cxf:http://{{hostname}}/wserws?serviceClass=com.ws.class&defaultOperationName=methodname&continuationTimeout=1000")
.to("mock:wsResult")
.to("seda:VZTMessageHistory");
i is working if i do in spring dsl as below.
<http-conf:conduit name="*.http-conduit" >
<http-conf:client ConnectionTimeout="1000" />
</http-conf:conduit>
i have implemented CxfEndpointConfigurer as below in java dsl still not
worded. please let me know anything i am missing. we don't want to use
spring dsl and we want to use only java dsl.
@Component
public class MyCxfEndpointConfigurer implements CxfEndpointConfigurer {
@Override
public void configure(AbstractWSDLBasedEndpointFactory factoryBean) {
// Do nothing here
}
@Override
public void configureClient(Client client) {
// reset the timeout option to override the spring configuration one
HTTPConduit conduit = (HTTPConduit) client.getConduit();
HTTPClientPolicy policy = new HTTPClientPolicy();
policy.setReceiveTimeout(1);
// policy.setConnectionTimeout(1);
conduit.setClient(policy);
}
@Override
public void configureServer(Server server) {
}
--
View this message in context: http://camel.465427.n5.nabble.com/cxf-setting-timeout-tp5780103.html
Sent from the Camel - Users mailing list archive at Nabble.com.