The ws_policy sample we have in the distribution uses an  external policy via 
the spring config via:

<beans xmlns="http://www.springframework.org/schema/beans";
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
       xmlns:cxf="http://cxf.apache.org/core";
       xmlns:p="http://cxf.apache.org/policy";
       xsi:schemaLocation="
http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
http://cxf.apache.org/policy http://cxf.apache.org/schemas/policy.xsd
http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd";>

    <cxf:bus>
        <cxf:features>
            <p:policies/>
        </cxf:features>
    </cxf:bus>

    <p:externalAttachment location="addr-external.xml"/>
 
</beans>


I'm NOT 100% sure that works on the client side, but it might.  :-)

Dan



On Mon April 6 2009 5:43:59 am Benjamin Ernst wrote:
> Hi,
>
> I have to implement a WebService-Endpoint which uses a SecurityPolicy for
> signing the Message.
>
> I have enabled the PolicyEgine with Spring like this:
>
>     <cxf:bus>
>         <cxf:features>
>             <cxf:logging/>
>             <p:policies ignoreUnknownAssertions="true"/>
>         </cxf:features>
>     </cxf:bus>
>
> But I don't know how to tell CXF how to use the Policy. The Policy is not
> in the WSDL-File but in in extra policy.xml -File.
>
> One other thing is, that there is no reference in any form to the Policy in
> the WSDl-File. Is this correct? I don't create the WSDL.
>
> My questions are:
>  - How can I tell CXF to use the Policy?
>  - Has the Policy from the policy.xml -File  to be referenced in the
> WSDL-File?
>
> Thanks for any help!
>
> --Benjamin

-- 
Daniel Kulp
[email protected]
http://www.dankulp.com/blog

Reply via email to