我正在使用 Jetty 并在我的构建服务器上遇到以下问题(我没有在我的开发机器上得到它)。
2013-07-22 14:19:20,647972350: WARN : org.apache.cxf.phase.PhaseInterceptorChain: Interceptor for {http://rs.rtiservice.esi.v21.xxxx.com/}RTIServiceRSI has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not send Message.
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
<SNIP>
at java.lang.Thread.run(Thread.java:662)
Caused by: java.net.SocketTimeoutException: SocketTimeoutException invoking http://localhost:25000/esi-rtiservice/ESI/RTIService/rs-rtiservice/addLineItem/: Read timed out
<SNIP>
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
... 104 more
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
<SNIP>
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1308)
... 107 more
2013-07-22 14:19:20,654681221: ERROR : [qtp23135205-124] com.xxx.v21.mpos.MPOSEndPoint: System error
javax.ws.rs.NotAuthorizedException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
<SNIP>
at java.lang.Thread.run(Thread.java:662)
2013-07-22 14:19:20,656234277: WARN : org.apache.cxf.phase.PhaseInterceptorChain: Interceptor for {http://mpos.v21.xxx.com/}MPOSEndPoint has thrown exception, unwinding now
java.lang.IllegalStateException: WRITER
at org.eclipse.jetty.server.Response.getOutputStream(Response.java:673)
<SNIP>
at java.lang.Thread.run(Thread.java:662)
2013-07-22 14:19:20,658931461: WARN : [qtp23135205-124] org.apache.cxf.phase.PhaseInterceptorChain: Interceptor for {http://mpos.v21.xxx.com/}MPOSEndPoint has thrown exception, unwinding now
java.lang.IllegalStateException: WRITER
at org.eclipse.jetty.server.Response.getOutputStream(Response.java:673)
at org.apache.cxf.transport.http.AbstractHTTPDestination.flushHeaders(AbstractHTTPDestination.java:564)
现在我可以看到有些人说我需要设置ReceiveTimeout
我的连接。1
这些人似乎没有NotAuthorizedException
像我这样的人。
我看到的所有例子都是这样的:
<http-conf:destination
name="{http://apache.org/hello_world_soap_http}SoapPort.http-destination">
<http-conf:server ReceiveTimeout="30000"
HonorKeepAlive="true" />
</http-conf:destination>
相反,我这样定义我的:
<jaxrs:client id="itemService" address="http://${itemservice.address}/esi-itemservice/ESI/ItemService" serviceClass="com.xxx.v21.esi.itemservice.rs.ItemServiceRSI" inheritHeaders="true">
<jaxrs:headers>
<entry key="Accept" value="application/xml" />
</jaxrs:headers>
<jaxrs:providers>
<ref bean="jaxbextprovider" />
</jaxrs:providers>
</jaxrs:client>
有人可以告诉我如何设置ReceiveTimeout
我的连接 - 或者请给我其他的东西吗?