On Tuesday 24 August 2010 8:59:37 am Dennis Sosnoski wrote:
> I'm trying some samples of effective policies combining multiple levels
> of attachment in the WSDL. It looks like it works fine when I attach at
> the wsdl:binding level and wsdl:binding/operation level, but not at the
> wsdl:binding/operation/input|output level. Is message-level policy
> attachment not supported by CXF?

It LOOKS like it should work.  Looking at the code where it calculates the 
policy, I see:
        policy = policy.merge(engine.getAggregatedOperationPolicy(boi));
        if (null != bmi) {
            policy = policy.merge(engine.getAggregatedMessagePolicy(bmi));
        }
so it looks like it should be merging in the message level policy.   Thus, if 
it's not working, file a bug with a test case.   It might be in the 
WSDLServiceBuilder or similar.   It might not be saving the policy on the 
message level.   Not really sure.

Dan


> 
> The attached policy is one example I've tried, where the 'addBook'
> operation defines both an operation-level policy and an input-message
> policy:
> 
>     <wsdl:operation name="addBook">
> 
>       <wsp:PolicyReference xmlns:wsp="http://www.w3.org/ns/ws-policy";
> URI="#SymmSign"/>
> 
>       <wsdlsoap:operation soapAction="urn:addBook"/>
> 
>       <wsdl:input name="addBookRequest">
>         <wsp:PolicyReference xmlns:wsp="http://www.w3.org/ns/ws-policy";
> URI="#UsernameToken"/>
>         <wsdlsoap:body use="literal"/>
>       </wsdl:input>
> 
> When I look at the data on the wire I don't see the UsernameToken being
> generated, but the server accepts the messages anyway.
> 
>   - Dennis

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

Reply via email to