2

我客户的春季环境:

<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)

感谢任何帮助以使其正常工作。

谢谢

4

1 回答 1

0

尝试更改为:

<http-conf:conduit name="http://hostname.com/.*">

看看是不是这样捡的。Rest 并没有真正的端点名称的概念,而像 JAX-WS 那样,它可能无法匹配。

于 2012-04-04T14:58:13.547 回答