Java 套接字读取超时异常。增加读取时间

Java 套接字读取超时异常。增加读取时间,java,web-services,spring-mvc,cxf,Java,Web Services,Spring Mvc,Cxf,我在点击Web服务时收到套接字超时错误。我在客户端得到了错误。我想增加阅读时间。我读过很多帖子,但不知道在哪里添加这段代码 @Service public class ManageQuoteRequestWSImpl implements ManageQuoteRequestWS { @Autowired private ManageQuoteRequestResourceInventory manageQuoteRequestClientWS ; @Overrid

我在点击Web服务时收到套接字超时错误。我在客户端得到了错误。我想增加阅读时间。我读过很多帖子,但不知道在哪里添加这段代码

@Service
public class ManageQuoteRequestWSImpl implements ManageQuoteRequestWS {

    @Autowired
    private ManageQuoteRequestResourceInventory manageQuoteRequestClientWS ;


    @Override
    public ResultsViewResponse findAndGetQuoteRequest(FilterCriteriaForFindAndGetQuoteRequest filterCriteriaForFindAndGetQuoteRequest) throws FunctionalException, FindAndGetQuoteRequestFault {
       return manageQuoteRequestClientWS.findAndGetQuoteRequest(filterCriteriaForFindAndGetQuoteRequest);
    }
}
这就是我调用Web服务的地方

这是我得到的一个例外。。响应得到形成,但形成需要时间

Caused by: java.net.SocketTimeoutException: SocketTimeoutException invoking http://vs30-oqtprodback-go/BackEnd/services/quoteRequest: Read timed out
                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.7.0_25]
                at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) ~[na:1.7.0_25]
                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.7.0_25]
                at java.lang.reflect.Constructor.newInstance(Constructor.java:526) ~[na:1.7.0_25]
                at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1338) ~[cxf-rt-transports-http-2.7.7.jar:2.7.7]
                at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1322) ~[cxf-rt-transports-http-2.7.7.jar:2.7.7]
                at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:50) ~[cxf-api-2.7.7.jar:2.7.7]
                at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:223) ~[cxf-api-2.7.7.jar:2.7.7]
                at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) ~[cxf-api-2.7.7.jar:2.7.7]
                at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:627) ~[cxf-rt-transports-http-2.7.7.jar:2.7.7]
                at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) ~[cxf-api-2.7.7.jar:2.7.7]
                at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272) ~[cxf-api-2.7.7.jar:2.7.7]
                at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:565) ~[cxf-api-2.7.7.jar:2.7.7]
                at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:474) ~[cxf-api-2.7.7.jar:2.7.7]
                at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:377) ~[cxf-api-2.7.7.jar:2.7.7]
                at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:330) ~[cxf-api-2.7.7.jar:2.7.7]
                at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) ~[cxf-rt-frontend-simple-2.7.7.jar:2.7.7]
                at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135) ~[cxf-rt-frontend-jaxws-2.7.7.jar:2.7.7]
                ... 37 common frames omitted
Caused by: java.net.SocketTimeoutException: Read timed out
我有一个soapConsumerContext.xml,它有一个http声明-

?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:http="http://cxf.apache.org/transports/http/configuration" xmlns:jaxws="http://cxf.apache.org/jaxws"
       xsi:schemaLocation="http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">

    <!-- ManageQuoteRequest -->
    <jaxws:server
            serviceClass="com.orange.oqt.interfaces.managequoterequest.resourceinventory.v1.ManageQuoteRequestResourceInventory" address="/quoteRequest"
            serviceBean="#quoteRequestWs">
        <jaxws:features>
            <bean class="org.apache.cxf.feature.LoggingFeature"/>
        </jaxws:features>
        <jaxws:properties>
            <!-- schema validation should be enabled -->
            <entry key="schema-validation-enabled" value="true" />
            <entry key="mtom-enabled" value="true" />
        </jaxws:properties>
    </jaxws:server>
?xml version=“1.0”encoding=“UTF-8”>
我已经添加了这段代码-

<http:conduit name="*.http-conduit">
        <http:client Accept="text/xml" AcceptEncoding="gzip,deflate,sdch"
                          AllowChunking="true" AutoRedirect="false" CacheControl="No-Cache" ReceiveTimeout="0"
                          ContentType="text/xml" />
    </http:conduit>


但它不起作用

您是否运行嵌入式服务器?连接超时只需要在http客户机中设置`我正在jboss上运行我的应用程序