cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Diephouse <>
Subject Re: Policies at the Bus level?
Date Mon, 17 Dec 2007 02:37:43 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
<body bgcolor="#ffffff" text="#000000">
Yeah, I see how you can apply them to the &lt;bus&gt; theoretically.
The problem is the initialize(Bus) code looks like this:<br>
    public void initialize(Bus bus) {<br>
        // this should never be null as features are initialised only<br>
        // after the bus and all its extensions have been created<br>
        PolicyEngine pe = bus.getExtension(PolicyEngine.class);<br>
        synchronized (pe) {<br>
            if (null != namespace) {<br>
                PolicyConstants pc =
            if (null != alternativeSelector) {<br>
Nowhere is it actually telling the policy engine about the policies
that are attached to the WSPolicyFeature. Hence putting a
&lt;Policy&gt; inside a &lt;bus&gt; doesn't really do anything.<br>
- Dan<br>
Glen Mazza wrote:
<blockquote cite="mid:1197849829.10099.3.camel@gmazza-desktop"
  <pre wrap="">The cxf.xml file is for bus configuration.  Maybe [1] can give you an
idea how this is done.


<a class="moz-txt-link-freetext" href=""></a>

Am Sonntag, den 16.12.2007, 18:25 -0500 schrieb Dan Diephouse:
  <blockquote type="cite">
    <pre wrap="">I was trying to figure out how to apply a WS-Policy globally today
the CXF Bus, but I'm not sure I really understand how to do it or if its 
possible. The WSPolicyFeature just seems to apply policies to 
Client/Servers.  initialize(Bus) seems to be written with the mistaken 
assumption that it is being called to initialize the WSPolicyFeature. 
But thats simply not the case - its being called to initialize global 
Bus level policies which apply to *everything*.

I'm happy to go about fixing this, but I can't seem to deduce how to use 
the PolicyEngine to enable a global policy. Any ideas?

- Dan

  <pre wrap=""><!---->
<pre class="moz-signature" cols="72">-- 
Dan Diephouse
<a class="moz-txt-link-freetext" href=""></a>
| <a class="moz-txt-link-freetext" href=""></a></pre>

View raw message