On Monday, October 10, 2011 7:58:40 PM swxies wrote:
> Hi Dan,
> 
> I am using CXF 2.2.6. I would like to use Dispatch and ws-security to sign
> the message. 

I'm nearly 99% confident that this won't work with 2.2.x.   You'll need to 
upgrade to at least 2.3.1, preferably the latest 2.4.x version, for this to 
work.

Dan



> I tried to use the the approach illustrated in
> SecurityPlicyTest
> 
>             public void DispatchClient(String req) throws Exception {
>                 PayService service = new PayService();
>                 Dispatch<Source> disp = service.createDispatch(
>                         PayService.PayPortTypePort,
>                         Source.class, Mode.PAYLOAD);
> 
>                 disp.getRequestContext().put(
>                         SecurityConstants.CALLBACK_HANDLER,
>                         new KeystorePasswordCallback());
>                 disp.getRequestContext().put(
>                         SecurityConstants.SIGNATURE_PROPERTIES,
>                         getClass().getResource("client.properties"));
> 
>                 Source source = new StreamSource(new StringReader(req));
>                 source = disp.invoke(source);
>        }
> 
> I have turned SSL debugging and can see the soap message is not signed.
> 
> Compare to the SecurityPlicyTest sample, the WSDL does not contain any
> security policies. I also do not have client.xml with the wss4j interceptor
> at all.
> 
> I also tried
> dispSOAPMsg.getRequestContext().put(MessageContext.WSDL_OPERATION,
>                                       op);
> 
> 
> But it did not work.
> 
> Can you please help?
> 
> Thanks
> SW.
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/How-to-set-soapAction-header-in-Dispatch-AP
> I-tp547977p4890531.html Sent from the cxf-user mailing list archive at
> Nabble.com.
-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog
Talend - http://www.talend.com

Reply via email to