我的客户的春天背景:
<http-conf:conduit name="*.http-conduit">
<http-conf:authorization>
<sec:AuthorizationType>Negotiate</sec:AuthorizationType>
</http-conf:authorization>
<http-conf:client ReceiveTimeout="0"></http-conf:client>
</http-conf:conduit>
服务器继续处理请求,但客户端在60000ms后超时,这是默认的超时值。有什么帮助吗?
更新(2012年4月10日):
尝试了以下方法。
ClientProxyImpl client = (ClientProxyImpl) alertService;
Client proxy = ClientProxy.getClient(alertService);
HTTPConduit conduit = (HTTPConduit) proxy.getConduit();
HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
httpClientPolicy.setConnectionTimeout(30000);
httpClientPolicy.setReceiveTimeout(60000);
conduit.setClient(httpClientPolicy);
得到以下例外。
Exception in thread "main" java.lang.ClassCastException: org.apache.cxf.jaxrs.client.ClientProxyImpl cannot be cast to org.apache.cxf.frontend.ClientProxy
at org.apache.cxf.frontend.ClientProxy.getClient(ClientProxy.java:120)
感谢任何帮助以实现这一目标。
由于
答案 0 :(得分:0)
尝试更改为:
<http-conf:conduit name="http://hostname.com/.*">
看看它是否以这种方式被拾取。 Rest实际上并没有端点名称的概念,就像JAX-WS那样,它可能无法与之匹配。