You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "Penmatsa, Vinay" <vi...@sap.com> on 2011/09/28 18:24:18 UTC

Embedding policy in wsdl for code-first scenario

Hi,
I have both "code first" and "wsdl first" scenarios in which I have to support WS-Security with various security tokens. To make it easier for CXF clients, I need to provide policy definitions in wsdl in all scenarios.
I find from CXF documentation - "Note: at this point, WS-SecurityPolicy support is ONLY available for 'WSDL first' scenarios". 
Does it mean that it is not possible to programmatically use policy interceptors.  Is it not recommended to do something similar to WSPolicyFeature.initialize() for code-first scenario?

Regards,
Vinay



Re: Embedding policy in wsdl for code-first scenario

Posted by Daniel Kulp <dk...@apache.org>.
On Wednesday, September 28, 2011 12:24:18 PM Penmatsa, Vinay wrote:
> Hi,
> I have both "code first" and "wsdl first" scenarios in which I have to
> support WS-Security with various security tokens. To make it easier for CXF
> clients, I need to provide policy definitions in wsdl in all scenarios. I
> find from CXF documentation - "Note: at this point, WS-SecurityPolicy
> support is ONLY available for 'WSDL first' scenarios". 

Actually, that is now out of date.   There are annotations that allow you to 
attach policy fragments to various parts of the Java first use cases:

See:
http://cxf.apache.org/docs/annotations.html

In particular, the @Policy annotations.


Dan


> Does it mean that it
> is not possible to programmatically use policy interceptors.  Is it not
> recommended to do something similar to WSPolicyFeature.initialize() for
> code-first scenario?
> 
> Regards,
> Vinay
-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com