Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8691061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:02:41+00:00 2026-06-13T00:02:41+00:00

I have a client that calls a webservice. Partly some of the called methods

  • 0

I have a client that calls a webservice.
Partly some of the called methods may take a long time to complete on the server (even up to 1 hour). I want the client to wait for the response for that time, thus keeping the connection alive!

I tried to set the following property within the client, but without success:

((BindingProvider)port).getRequestContext().put("com.sun.xml.internal.ws.request.timeout", 0); //0 for disabling any timeouts

I’m still getting Timeout Exception after some time. Which property has to be set to prevent the following error?

org.apache.cxf.interceptor.Fault: Transaction was rolled back, presumably because setRollbackOnly was called during a synchronization while invoking public abstract boolean my.method
    at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:166)
    at org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.createFault(AbstractJAXWSMethodInvoker.java:213)
    at org.apache.openejb.server.cxf.ejb.EjbMethodInvoker.preEjbInvoke(EjbMethodInvoker.java:146)
    at org.apache.openejb.server.cxf.ejb.EjbMethodInvoker.invoke(EjbMethodInvoker.java:72)
    at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:75)
    at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
    at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:107)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)
    at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
    at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:211)
    at org.apache.openejb.server.cxf.CxfWsContainer.onMessage(CxfWsContainer.java:73)
    at org.apache.openejb.server.webservices.WsServlet.service(WsServlet.java:98)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.openejb.core.transaction.TransactionRolledbackException: Transaction was rolled back, presumably because setRollbackOnly was called during a synchronization
    at org.apache.openejb.core.transaction.JtaTransactionPolicy.completeTransaction(JtaTransactionPolicy.java:335)
    at org.apache.openejb.core.transaction.TxRequired.commit(TxRequired.java:75)
    at org.apache.openejb.core.transaction.EjbTransactionUtil.afterInvoke(EjbTransactionUtil.java:73)
    at org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:258)
    at org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:190)
    at org.apache.openejb.server.cxf.ejb.EjbMethodInvoker.preEjbInvoke(EjbMethodInvoker.java:119)
    ... 30 more
Caused by: javax.transaction.RollbackException: Unable to commit: transaction marked for rollback
    at org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:272)
    at org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:252)
    at org.apache.openejb.core.transaction.JtaTransactionPolicy.completeTransaction(JtaTransactionPolicy.java:328)
    ... 35 more
Caused by: java.lang.Exception: Transaction has timed out
    at org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:266)
    ... 37 more
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T00:02:42+00:00Added an answer on June 13, 2026 at 12:02 am

    Are you sure that this is a client side timeout? Did you configure your server transaction timeout properly?

    For client side timeout you need in your cxf configuration:

    <http-conf:conduit name="*.http-conduit">
        <http-conf:client ConnectionTimeout="your connection timeout" ReceiveTimeout="your receive timeout"/>
    </http-conf:conduit>
    

    Timeouts are expressed in milliseconds.

    In Java code you need get the HTTPConduit and then set HTTPClientPolicy:

    see from http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html

      import org.apache.cxf.endpoint.Client;
      import org.apache.cxf.frontend.ClientProxy;
      import org.apache.cxf.transport.http.HTTPConduit;
      import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
      ...
    
      URL wsdl = getClass().getResource("wsdl/greeting.wsdl");
      SOAPService service = new SOAPService(wsdl, serviceName);
      Greeter greeter = service.getPort(portName, Greeter.class);
    
      // Okay, are you sick of configuration files ?
      // This will show you how to configure the http conduit dynamically
      Client client = ClientProxy.getClient(greeter);
      HTTPConduit http = (HTTPConduit) client.getConduit();
    
      HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
    
      httpClientPolicy.setConnectionTimeout(your connection timeout); 
      httpClientPolicy.setAllowChunking(false);
      httpClientPolicy.setReceiveTimeout(your receive timeout);
    
      http.setClient(httpClientPolicy);
    
      ...
      greeter.sayHi("Hello");
    

    Update

    For your java.lang.ClassCastException make sure that com.sun.xml.ws.client.sei.SEIStub is not in classpath or ensure that cxf jar is before Sun’s jaxws RI jar in the classpath. For example try removing jaxws-rt*.jar from your classpath.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Scala application that relies on an external RESTful webservice for some
I have a Java Client that calls a web service written in Csharp by
i have an existing java client code which calls an asmx webservice. However the
I have wcf .net client to a webservice. I am trying to ensure that
I am creating a webservice that essentially remotes some database calls (so that they
I have a asp.net 3.5 site with a *.asmx that serves several webservice methods.
I have a java webservice, with some method. The webservice methods are in this
I have created a console application that calls a method on a webservice. I
I have a client that wants an app that will detect the persons location
We have a client that owns Google Apps Business Edition account and wants to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.