Thanks Fang although I do not have time to test it out due to some other produciton issue.
Will do testing soon -----Original Message----- From: Freeman Fang [mailto:[email protected]] Sent: Monday, April 15, 2013 7:33 PM To: [email protected] Subject: Re: Seperate CXF client configuration from CXF server configuration Hi, Before your client code, I think you can add something like SpringBusFactory factory = new SpringBusFactory(); Bus bus = factory.createBus( "your_client_specific_bus_cfg.xml" ); BusFactory.setDefaultBus(bus); So that your client can use a client specific bus. And before your server code, you can have similar thing to specify a server specific bus Moreover, even your client and server load same interceptors, you still can use MessageUtils.isRequestor(message)(true for client) to determine if it's client or server ------------- 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小屋 On 2013-4-15, at 下午11:03, neng1998 wrote: > Hi > I did in int code as following > URL wsdlUrl = > EpsilonWSClientFactory.class.getClassLoader().getResource("../wsdl/com/wellsfargo/service/provider/ebs/epsilon/epsilonService2013.wsdl"); > EpsilonService2013 service = new EpsilonService2013(wsdlUrl); > wsport = service.getEpsilonService2013(); > BindingProvider provider = (BindingProvider) wsport; > ClientLoggingInInterceptor clin = new > ClientLoggingInInterceptor(); > ClientProxy.getClient(wsport).getOutInterceptors().add(clin); > > provider.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROP > ERTY, > getUrl()); > setupTLS(wsport); > > As you see, I add a ClientLoggingInInterceptor. > > The Server is configured with cxf.xml as following <cxf:bus name> > <cxf:inInterceptors> > <ref bean="logInbound"/> > </cxf:inInterceptors> > <cxf:outInterceptors> > <ref bean="logOutbound"/> > </cxf:outInterceptors> > </cxf:bus> > > > I saw both client and server interceptors are invoked when > Application working as CXF client sent SOAP message. > > > Ed > > > > -- > View this message in context: > http://cxf.547215.n5.nabble.com/Seperate-CXF-client-configuration-from > -CXF-server-configuration-tp5726238p5726330.html > Sent from the cxf-user mailing list archive at Nabble.com.
