And the way to enable WS-Addressing only for SOAP endpoint with something like a feature ? Is there a kind of interceptor for the initialization phase of the client and server endpoint ?
Le Mon Nov 24 2014 at 16:31:08, Andrei Shakirin <[email protected]> a écrit : > Hi, > > If you just need to deactivate WS-Addressing decoupled endpoint for client > call, you can use this code: > ((BindingProvider)proxy).getRequestContext() > .put("org.apache.cxf.ws.addressing.replyto", AddressingConstants. > getAnonymousURI()); > > And activate it again by setting appropriate endpoint address into > "org.apache.cxf.ws.addressing.replyto". > > Regards, > Andrei. > > > -----Original Message----- > > From: Manu [mailto:[email protected]] > > Sent: Montag, 24. November 2014 10:59 > > To: [email protected] > > Subject: Re: Activating WS-Addressing dynamically on selected service > > > > We have two needs : > > - Our CXF bus contains both SOAP services and REST service. I want to > activate > > WS-Addressing only on SOAP Services (of course :) ) > > - On the other hand, the asynchronous feature of WS-Addressing will not > be > > activated all the time. We have a context (accessible from a > ThreadLocal) that > > tell us if we must activate asynchronous execution. BAsed on this > context I was > > wondering if I can simply disable WS-Addressing dynamically. > > Otherwise I think I found a way by using an interceptor which sets the > ReplyTo > > address to "http://www.w3.org/2005/08/addressing/none", this way the > > asynchronous execution is disabled. > > > > Tell me if I'm not clear enough ;) > > Manuel > > > > > > > > On Tue, Nov 18, 2014 at 10:52 PM, Andrei Shakirin <[email protected]> > > wrote: > > > > > Hi, > > > > > > Could you explain your use case a bit more? > > > Are you activating WS-Addressing on the client side depending on > > > external event? > > > > > > Basically you can do something like this to activate WSA on the client > > > side: > > > WSAddressingFeature wsa = new WSAddressingFeature(); > > > wsa.initialize(client, client.getBus()); > > > > > > If you need to deactivate that you need either to create new client > > > instance or remove corresponded interceptors from existing client. > > > > > > Regards, > > > Andrei. > > > > > > > -----Original Message----- > > > > From: Manu [mailto:[email protected]] > > > > Sent: Montag, 17. November 2014 14:17 > > > > To: [email protected] > > > > Subject: Re: Activating WS-Addressing dynamically on selected > > > > service > > > > > > > > I looking at adding manually the interceptors. > > > > On what should I add thoses interceptors ? On the endpoint ? Can I > > > > had > > > those > > > > only for the current exchange ? > > > > We want to activate WS-Addressing dynamically based on a context > > > property (a > > > > context we manage). > > > > The asynchronous feature needs to be activated only in some > conditions. > > > > How can I do that ? > > > > Should I add/remove the interceptors on the endpoint based on this > > > context ? > > > > > > > > Regards > > > > Manuel > > > > > > > > > > > > > > > > On Tue, Nov 11, 2014 at 9:09 AM, Andrei Shakirin > > > > <[email protected]> > > > > wrote: > > > > > > > > > Hi, > > > > > > > > > > There are some options to do that: > > > > > a) You can add features into client factory: > > > > > JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean(); > > > > > factory.setAddress("http://acme.come/some-service"); > > > > > factory.getFeatures().add(new WSAddressingFeature()); MyService > > > > > client = (MyService) factory.create(MyService.class); > > > > > > > > > > b) You can activate WS-Addressing using policy: > > > > > http://cxf.apache.org/docs/ws-addressing.html > > > > > > > > > > c) You can manually add WS-Addressing interceptors, in the same > > > > > way as WSAddressingFeature does that. > > > > > > > > > > Regards, > > > > > Andrei. > > > > > > > > > > > -----Original Message----- > > > > > > From: Manu [mailto:[email protected]] > > > > > > Sent: Montag, 10. November 2014 16:31 > > > > > > To: [email protected] > > > > > > Subject: Activating WS-Addressing dynamically on selected > > > > > > service > > > > > > > > > > > > Hi, > > > > > > > > > > > > Is there a way (some class I can extend) to activate > > > > > > ws-adressing > > > > > dynamically > > > > > > without configuring it int the spring configuration file. > > > > > > We want to be able to activate asynchronous execution based on > > > > > > some conditions. > > > > > > > > > > > > I've tried to create a feature and override public void > > > > > initialize(Client client, Bus > > > > > > bus) but this method is not called when creating a client ... > > > > > > > > > > > > Does anyone have an idea ? > > > > > > Thanks > > > > > > Manuel > > > > > > > > >
