Hi Andrei,

Thanks a lot for your suggestion. :)

I found a good way to do that, cxf has a
org.apache.cxf.ws.policy.attachment.external.ExternalAttachmentProvider,
which can read external policy attachment file, like:
<attachments xmlns:wsp="http://www.w3.org/ns/ws-policy";
xmlns:test="http://x.y.z/Assertions";>
    <wsp:PolicyAttachment>
        <wsp:AppliesTo>
            <wsa:EndpointReferenceType
xmlns:wsa="http://www.w3.org/2005/08/addressing";>
                <wsa:Address>http://x.y.z/GreeterPort</wsa:Address>
            </wsa:EndpointReferenceType>
        </wsp:AppliesTo>
        <wsp:Policy>
            <test:A>A</test:A>
        </wsp:Policy>
    </wsp:PolicyAttachment>
</attachments>

This is what I want, I think it can only be used in Spring config:
<externalAttachment/>

I think I can re-write it and register this provider for my cxf bus.

Haha, let me try!! :)

Do you know it?

Thanks a lot! :)



--
View this message in context: 
http://cxf.547215.n5.nabble.com/Dynamically-set-policy-via-message-property-tp5763695p5764263.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to