cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin" <>
Subject RE: WS-Policy configuration steps
Date Fri, 05 Dec 2008 10:23:48 GMT
Excellent and concise overview. I'd add one thing.

A client UI tool or runtime may employ a ws-policy generic policy
intersection algorithm when deciding which, if any, of available
services meets the requirements. These requirements are available on the
client side in the form of a policy expression, either embedded in the
configuration, client side WSDL or in some external repository -
hopefully one day we'll be able to do in CXF too.

Cheers, Sergey

-----Original Message-----
From: Mayank Mishra [] 
Sent: 04 December 2008 19:14
Subject: Re: WS-Policy configuration steps

Johnbosco, Lawrence wrote:
> Hello,
> Can anyone provide me a working example implementing WS-Policy
embedded within the WSDL in CXF?  So far, I couldn't find any detailed
material regarding this.

** WS-Policy provides a way for the provider of a web service to convey 
conditions under which it provides the service. A invoker might use this

policy to decide whether to use or not to use the service.

WS-Policy just gives basic assertion support like, <wsp:All/>, 
<wsp:ExactlyOne/> to express one set of policy or alternatives too. Any 
conditions/requirements as assertions under <wsp:All/> become mandatory,

where as assertions inside <wsp:ExactlyOne/> are considered as 
alternatives to each other.You can read more about various 
combinations/interactions/alternative in OASIS WS-Policy

You can specify these WS-Poilcy assertions either inside input , output,

fault, operation, port, or in binding wsdl elements. You can either put 
them directly as child elements of them, or else you can refer them 
using <wsp:PolicyReference> element.

WS-Security Policy, WS-RM assertions are build on top of WS-Policy for 
specifying security or reliable messaging requirements/constraints for a

service. For example, specifying security requirements for outgoing 
message, I can write as,

      <wsp:Policy wsu:Id="Output_Policy">

and I can refer this policy as,

    <wsdl:binding name="WebTransactionServiceSoapBinding" 
        <soap:binding style="document" 
        <!--wsp:PolicyReference URI="#Endpoint_Policy"/-->
        <wsdl:operation name="purchase">
            <soap:operation soapAction="" style="document"/>
            <wsdl:input name="purchase">
                <!--wsp:PolicyReference URI="#Input_Policy"/-->
                <soap:body use="literal"/>
            <wsdl:output name="purchaseResponse">
                <wsp:PolicyReference URI="#Output_Policy"/>
                <soap:body use="literal"/>

or specifying RM assertions as Embedded instead of referred can be,

<wsdl:service name="CartSLSBBeanService">
        <wsdl:port binding="ns1:CartSLSBBeanServiceSoapBinding" 
            <soap:address location=" http://localhost:8181/cart/cart"/>
        <wsp:Policy xmlns:wsp=""

                <wsrmp:BaseRetransmissionInterval Milliseconds="10000"/>
You can read more about WS-SecurityPolicy[2] and WS RM[3] so as to 
understand what these assertions actually specify.

I hope this helps


With Regards,

> Thanks,
> Lawrence

View raw message