cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sandeep wadhwa <wadhwa.sand...@gmail.com>
Subject Re: Setting timeout for Service.create() - Already a thread present
Date Thu, 23 May 2013 12:33:05 GMT
Hello Freeman-San

Thanks for your efforts. I have gone through the link. The code is as
follows:

  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(36000);
  httpClientPolicy.setAllowChunking(false);
  httpClientPolicy.setReceiveTimeout(32000);


I have a question regarding this. The following code executes before
HttpConduit comes into picture and this is causing the actual problem.

SOAPService service = new SOAPService(wsdl, serviceName);


So will be it Ok even if we write  HttpConduit after the constructor
call which is taking

huge time in my case as we are trying to call the actual Webservice
url & not the local one.


Cheers

Sandeep Wadhwa

Architect - CSC India Pvt. Ltd.



On Thu, May 23, 2013 at 4:23 PM, Freeman Fang <freeman.fang@gmail.com>wrote:

> Hi,
>
> I believe now we also use http:conduit to retrieve the remote wsdl, so the
> http:conduit timeout configuration should also work here, take a look at
> [1] to get more details
>
> [1]
> http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html
> -------------
> Freeman(Yue) Fang
>
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Web: http://fusesource.com | http://www.redhat.com/
> Twitter: freemanfang
> Blog: http://freemanfang.blogspot.com
> http://blog.sina.com.cn/u/1473905042
> weibo: @Freeman小屋
>
> www.camelone.org : The open source integration conference:
>
> On 2013-5-23, at 下午6:27, sandeep wadhwa wrote:
>
> > Hi,
> >
> > Few years back there was a problem mentioned in Apache CXF forums:
> >
> > Is there any way to set a timeout for javax.xml.ws.Service.create().
> > What happens if the operation to retrieve the WSDL from a remote URL
> > takes forever?
> >
> > Could you please explain how to resolve or if there is a different way
> > to make web service call using CXF client?
> >
> >
> > Thanks
> >
> > Sandeep Wadhwa
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message