Hi, Thanks for your response. Having read the Wiki, I still appear to be missing something:
FooService client = ... ; // created from ClientProxyFactoryBean or generated JAX-WS client MyInterceptor myInterceptor = new MyInterceptor(); Client cxfClient = ClientProxy.getClient(client); cxfClient.getInInterceptor().add(myInterceptor); What do I do with cxfClient? How do I make a call on FooService (client) and invoke the interceptor? I'm assuming the call is made through Client. Does it really involve the invoke methods on Client? I think that by adding an example call to the end fo that code sample, the Wiki would make a little more sense. John Baker -- Web SSO IT Infrastructure Deutsche Bank London URL: http://websso.cto.gt.intranet.db.com Willem Jiang <[EMAIL PROTECTED]> 04/03/2008 14:22 Please respond to [email protected] To [email protected] cc Subject Re: Rampart and CXF Hi , You can find some programmatical ways to add the interceptors here [1] [1] http://cwiki.apache.org/CXF20DOC/interceptors.html Willem John-M Baker wrote: > Hello, > > While I'm a fan of Spring, I need to write an example that does not use > Spring. So I've got this far: > > protected WSS4JOutInterceptor createWss4jInConfiguration(String user, > String password) > { > Map<String,Object> props = new HashMap<String,Object>(); > props.put("action", "UsernameToken Timestamp"); > props.put("passwordType", "PasswordDigest"); > props.put("user", user); > props.put("passwordCallback", new MyPasswordCallbackHandler(password)); > return new WSS4JOutInterceptor(props); > } > > List interceptors = new ArrayList(); > interceptors.add(new SAAJOutInterceptor()); > interceptors.add(createWss4jInConfiguration("jbaker", "moo")); > > How do I add the interceptors to the stub generated by CXF? ..e. I have: > > Query q = new Query(url); > qPort = q.getQueryHttpport(); > > And I guess the interceptors need to be attached, somehow. > > Thanks, > > > John Baker > --- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.
