On Wednesday, April 27, 2011 11:38:56 PM Parveen Fatima wrote: > Hi, > I am creating CXF client and trying to configure the http timeout value on > the services , but getting the classCastException Here is what I am > trying to do. > How do I overwrite default classloader information ,so that i won't get > classcast exception
What's the class and/or stack trace that is resulting in this exception? Did you also check the instructions at: http://cxf.apache.org/docs/application-server-specific-configuration-guide.html#ApplicationServerSpecificConfigurationGuide-WebLogic Dan > private static ABCDMapServer getService() { > try { > > > ClientProxyFactoryBean factory = new > ClientProxyFactoryBean(); > factory.setServiceClass(ABCDMapServer.class); > factory.setServiceName(SERVICE); > > factory.setAddress("http://a.b.c.d:port/arcgis/services/a_b_dots/MapServer > "); factory.setWsdlLocation(MAP_SERVER_URL.toString()); ABCDMapServer > client = > //new ABCDMapServer ( MAP_SERVER_URL ); > (ABCDMapServer ) factory.create(); > final Client cl = > ClientProxy.getClient(client); > final HTTPConduit http = (HTTPConduit) cl.getConduit(); > //cl.getInInterceptors().add(new LoggingInInterceptor()); > //cl.getOutInterceptors().add(new LoggingOutInterceptor()); > > final HTTPClientPolicy httpClientPolicy = new > HTTPClientPolicy(); > httpClientPolicy.setReceiveTimeout(TIME_OUT); > httpClientPolicy.setAllowChunking(false); > httpClientPolicy.setConnectionTimeout(TIME_OUT); > > http.setClient(httpClientPolicy); > > return client; > } catch (Exception e) { > e.printStackTrace(); > return null; > } > } > > Thanks for your help.. > > > > Thanks, > Parveen Fatima -- Daniel Kulp [email protected] http://dankulp.com/blog Talend - http://www.talend.com
