1,在CXF生成的stub的客户端,方式如下(CXF2.1.1):
SimpleServiceService srv = new SimpleServiceService();
SimpleService servicePort = srv.getSimpleServicePort();
//timeout setting
Client cl = ClientProxy.getClient(servicePort);
HTTPConduit http = (HTTPConduit) cl.getConduit();
HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
httpClientPolicy.setConnectionTimeout(10000);
httpClientPolicy.setReceiveTimeout(1000);
http.setClient(httpClientPolicy);
servicePort.concatenate("111", "2222");
其中SimpleServiceService是自动生成的stub类.
要看是哪种的客户端了
~~~~~~~