cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John-M Baker <john-m.ba...@db.com>
Subject Re: Rampart and CXF
Date Tue, 04 Mar 2008 15:25:14 GMT
I'm now totally confused :-) To recap, I've got a perfectly satisfactory 
solution when WSSecurity is not required. I've used the wsdl2java ant task 
to create a set of sources. My requirement is to implement WSSecurity so 
it is there when required:

Here's the code I'm fiddling with to try and add WSSecurity support:

  Query q = new Query(url);
  qPort = q.getQueryHttpport();

  Client cxfClient = ClientProxy.getClient(qPort);
  cxfClient.getInInterceptors().add(new SAAJOutInterceptor());
  cxfClient.getInInterceptors().add(createWss4jInConfiguration("myuser", 
"moo")); // This just creates a callback handler

So, are you suggesting I use qPort as follows:

qPort.myWSMethod() ?

That seems bizarre. Surely I need to do something else?


John Baker
-- 
Web SSO 
IT Infrastructure 
Deutsche Bank London

URL:  http://websso.cto.gt.intranet.db.com




Willem Jiang <willem.jiang@gmail.com> 
04/03/2008 15:20
Please respond to
cxf-user@incubator.apache.org


To
cxf-user@incubator.apache.org
cc

Subject
Re: Rampart and CXF






Hi,

You just use the FooService (client) as usual. The cxfClient will build 
up the interceptors each time before it send out the message when you 
invoke the client proxy method.
I will update the wiki as you suggested.

BTW,  You could also add the interceptor through the 
ClientProxyFactoryBean by calling
clientProxyFactoryBean.getInInterceptor().add(myInterceptor);

Willem.

John-M Baker wrote:
> 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
> 




---

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.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message