cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Piotr Skawinski <p_skawin...@hotmail.com>
Subject RE: Setting timeouts
Date Wed, 28 May 2008 10:11:29 GMT

Hi,

I followed the cwike site and uses below spring configuration and still get the same timeout
exception:

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:jaxws="http://cxf.apache.org/jaxws"
    xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
    http://cxf.apache.org/jaxws 
    http://cxf.apache.org/schema/jaxws.xsd
    http://cxf.apache.org/transports/http/configuration 
    http://cxf.apache.org/schemas/configuration/http-conf.xsd">
     
    <bean id="universityEducationImportService"
        class="dk.optagelse.supply.integration.universityeducation.service.UniversityEducationImportService"
        factory-bean="requirementDatabaseServiceClientFactory" factory-method="create" />
        
    <bean id="requirementDatabaseServiceClientFactory"
        class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
        <property name="serviceClass"
            value="dk.optagelse.supply.integration.universityeducation.service.UniversityEducationImportService"
/>
        <property name="address">
            <bean
                class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
                <property name="targetClass">
                    <value>dk.optagelse.util.PropertyRetriever</value>
                </property>
                <property name="targetMethod">
                    <value>getProperty</value>
                </property>
                <property name="arguments">
                    <list>
                        <value>UniversityEducationImportService</value>
                    </list>
                </property>
            </bean>
        </property>
    </bean>
    
    <http-conf:conduit name="*.http-conduit">
        <http-conf:client ReceiveTimeout="0"/>
    </http-conf:conduit>

</beans>





> Date: Mon, 26 May 2008 23:56:55 +0800
> From: willem.jiang@gmail.com
> To: users@cxf.apache.org
> Subject: Re: Setting timeouts
> 
> You just need to set the client's policy of ReceiveTimeout , the default 
> value is 60 second.
> Here is a wiki page of it [1].
> 
> You could also use Java API to set the value.
> 
> Client client = ClientProxy.getClient(proxy);
> HTTPConduit conduit = (HTTPConduit)client.getConduit();
> HTTPClientPolicy policy = conduit.getClient();
> policy.setReceiveTimeout(0); // will wait indefinitely
> 
> 
> [1]http://cwiki.apache.org/CXF20DOC/client-http-transport-including-ssl-support.html
> 
> Willem
> 
> 
> Piotr Skawinski wrote:
> > Hi,
> >
> > I'm getting timeout exception when calling web service. Is it somehow possible to
set timeout on the client/server side for the service? I'm getting following exception on
the server side: 
> >
> > -------------------------------------------------------------------------------------------
> >
> > INFO: Interceptor has thrown exception, unwinding now
> > org.apache.cxf.interceptor.Fault: Could not write attachments.
> >         at org.apache.cxf.interceptor.AttachmentOutInterceptor$AttachmentOutEndi
> > ngInterceptor.handleMessage(AttachmentOutInterceptor.java:81)
> >         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
> > orChain.java:221)
> >         at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(Out
> > goingChainInterceptor.java:74)
> >         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
> > orChain.java:221)
> >         at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
> > ationObserver.java:78)
> >         at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDes
> > tination.java:92)
> >         at org.apache.cxf.transport.servlet.ServletController.invokeDestination(
> > ServletController.java:214)
> >         at org.apache.cxf.transport.servlet.ServletController.invoke(ServletCont
> > roller.java:151)
> >         at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCX
> > FServlet.java:170)
> >         at org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCX
> > FServlet.java:148)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> >         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
> > (StubSecurityHelper.java:223)
> >         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri
> > tyHelper.java:125)
> >         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
> > a:283)
> >         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
> > a:175)
> >         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
> > n.run(WebAppServletContext.java:3245)
> >         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
> > dSubject.java:321)
> >         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
> > 121)
> >         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS
> > ervletContext.java:2003)
> >         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC
> > ontext.java:1909)
> >         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j
> > ava:1359)
> >         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
> >         at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
> > Caused by: java.net.SocketException: Software caused connection abort: socket wr
> > ite error
> >         at java.net.SocketOutputStream.socketWrite0(Native Method)
> >         at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
> >         at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
> >         at weblogic.servlet.internal.ChunkOutput.writeChunkTransfer(ChunkOutput.
> > java:525)
> >         at weblogic.servlet.internal.ChunkOutput.writeChunks(ChunkOutput.java:50
> > 4)
> >         at weblogic.servlet.internal.ChunkOutput.flush(ChunkOutput.java:382)
> >         at weblogic.servlet.internal.ChunkOutput.checkForFlush(ChunkOutput.java:
> > 469)
> >         at weblogic.servlet.internal.ChunkOutput.write(ChunkOutput.java:304)
> >         at weblogic.servlet.internal.ChunkOutputWrapper.write(ChunkOutputWrapper
> > .java:133)
> >         at weblogic.servlet.internal.ServletOutputStreamImpl.write(ServletOutput
> > StreamImpl.java:168)
> >         at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOu
> > tputStream.java:45)
> >         at javax.activation.DataHandler.writeTo(DataHandler.java:290)
> >         at org.apache.cxf.attachment.AttachmentSerializer.writeAttachments(Attac
> > hmentSerializer.java:146)
> >         at org.apache.cxf.interceptor.AttachmentOutInterceptor$AttachmentOutEndi
> > ngInterceptor.handleMessage(AttachmentOutInterceptor.java:79)
> >         ... 23 more
> > 2008-05-26 16:12:25 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
> > INFO: Interceptor has thrown exception, unwinding now
> > java.util.EmptyStackException
> >         at weblogic.utils.collections.Stack.pop(Stack.java:82)
> >         at weblogic.xml.stax.XMLWriterBase.writeEndElement(XMLWriterBase.java:45
> > 7)
> >         at org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor$SoapOutEnd
> > ingInterceptor.handleMessage(SoapOutInterceptor.java:240)
> >         at org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor$SoapOutEnd
> > ingInterceptor.handleMessage(SoapOutInterceptor.java:230)
> >         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
> > orChain.java:221)
> >         at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMess
> > age(AbstractFaultChainInitiatorObserver.java:96)
> >         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
> > orChain.java:262)
> >         at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(Out
> > goingChainInterceptor.java:74)
> >         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
> > orChain.java:221)
> >         at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
> > ationObserver.java:78)
> >         at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDes
> > tination.java:92)
> >         at org.apache.cxf.transport.servlet.ServletController.invokeDestination(
> > ServletController.java:214)
> >         at org.apache.cxf.transport.servlet.ServletController.invoke(ServletCont
> > roller.java:151)
> >         at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCX
> > FServlet.java:170)
> >         at org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCX
> > FServlet.java:148)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> >         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
> > (StubSecurityHelper.java:223)
> >         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri
> > tyHelper.java:125)
> >         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
> > a:283)
> >         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
> > a:175)
> >         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
> > n.run(WebAppServletContext.java:3245)
> >         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
> > dSubject.java:321)
> >         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
> > 121)
> >         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS
> > ervletContext.java:2003)
> >         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC
> > ontext.java:1909)
> >         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j
> > ava:1359)
> >         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
> >         at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
> >
> >
> > -------------------------------------------------------------------------------------------
> >
> > and following on the client side:
> >
> > org.apache.cxf.interceptor.Fault: Could not send Message.
> >     at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
> >     at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
> >     at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
> >     at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
> >     at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> >     at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:177)
> >     at $Proxy33.importUniversityEducations(Unknown Source)
> >     at dk.optagelse.supply.integration.universityeducation.service.impl.UniversityEducationImportServiceImpl.main(UniversityEducationImportServiceImpl.java:95)
> > Caused by: java.net.SocketTimeoutException: Read timed out
> >     at java.net.SocketInputStream.socketRead0(Native Method)
> >     at java.net.SocketInputStream.read(SocketInputStream.java:129)
> >     at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
> >     at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
> >     at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
> >     at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:606)
> >     at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:554)
> >     at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:936)
> >     at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:367)
> >     at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1896)
> >     at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1824)
> >     at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
> >     at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:583)
> >     at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> >     ... 7 more
> > Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Could not send
Message.
> >     at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:218)
> >     at $Proxy33.importUniversityEducations(Unknown Source)
> >     at dk.optagelse.supply.integration.universityeducation.service.impl.UniversityEducationImportServiceImpl.main(UniversityEducationImportServiceImpl.java:95)
> > Caused by: org.apache.cxf.interceptor.Fault: Could not send Message.
> >     at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
> >     at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221)
> >     at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
> >     at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
> >     at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> >     at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:177)
> >     ... 2 more
> > Caused by: java.net.SocketTimeoutException: Read timed out
> >     at java.net.SocketInputStream.socketRead0(Native Method)
> >     at java.net.SocketInputStream.read(SocketInputStream.java:129)
> >     at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
> >     at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
> >     at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
> >     at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:606)
> >     at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:554)
> >     at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:936)
> >     at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:367)
> >     at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1896)
> >     at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1824)
> >     at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
> >     at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:583)
> >     at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> >     ... 7 more
> >
> > -------------------------------------------------------------------------------------------
> >
> > I'm using org.apache.cxf.jaxws.JaxWsProxyFactoryBean (which is configured through
spring) to dynamically access services.
> >
> > Thx in advance
> >
> > Piotr
> >
> > _________________________________________________________________
> > Connect to the next generation of MSN Messenger 
> > http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline
> >   
> 

_________________________________________________________________
Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message