cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rastislav Cesnek <...@whitestein.com>
Subject Re: Dynamic client with UsernameToken in Policy
Date Wed, 30 Jan 2013 17:04:36 GMT
Thanks, investigating.

On 30. 1. 2013 17:59, Andrei Shakirin wrote:
> Hi,
>
> Please refer Glen's blog: http://www.jroller.com/gmazza/entry/cxf_usernametoken_profile
.
> The reason of this error might be missing ws.security properties (usename, callback-handler)
in your client/service configuration.
> Just do Glen's tutorial step by step and compare with your solution.
>
> Cheers,
> Andrei.
>
>> -----Original Message-----
>> From: Rastislav Cesnek [mailto:rac@whitestein.com]
>> Sent: Mittwoch, 30. Januar 2013 17:15
>> To: users@cxf.apache.org
>> Subject: Dynamic client with UsernameToken in Policy
>>
>> Hi all.
>>
>> Any idea?
>>
>> I am doing some tests with CXF 2.7.1.
>> Using a DynamicClientFactory, I am constructing a dynamic client for sending
>> messages from a WSDL that has a policy on binding, which includes
>> UsernameToken.
>>
>> However, when invoking an operation, I get:
>> org.apache.cxf.ws.policy.PolicyException: None of the policy alternatives can
>> be satisfied.
>>
>> While researching this, I noticed that
>> PolicyEngine.supportsAlternative() stumbles upon "{http://docs.oasis-
>> open.org/ws-sx/ws-securitypolicy/200702}UsernameToken is not
>> supported" (it is not in PolicyInterceptorProviderRegistry of the client's Bus).
>>
>> How should this be handled properly? Or is this case generally not
>> supported? Is there some good documentation about which features the
>> CXF clients and servers support and how to configure them?
>>
>> For server dynamically generated from the same WSDL, the UsernameToken
>> policy is processed correctly.
>>
>>     <wsp:Policy wsu:Id="MyPolicy">
>>         <wsp:ExactlyOne>
>>             <sp:UsernameToken
>>
>> sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-
>> securitypolicy/200702/IncludeToken/AlwaysToRecipient">
>>                 <wsp:Policy>
>>                     <sp:WssUsernameToken10 />
>>                     <sp:HashPassword />
>>                     <!--sp:RequireDerivedKeys / -->
>>                 </wsp:Policy>
>>             </sp:UsernameToken>
>>         </wsp:ExactlyOne>
>>     </wsp:Policy>
>
>
>

Please, notice that Whitestein Slovakia has moved to a new location.
Prosím, všimnite si že Whitestein Slovensko sa presťahovalo na novú adresu.

-- 
Rastislav Cesnek | rac@whitestein.com
Senior Software Engineer | Advanced Technologies
Whitestein Technologies s.r.o. | www.whitestein.com
Moskovska 13 | 811 08 Bratislava-Staré Mesto | Slovak Republic
Main +421 2 5443-5502 | Fax +421 2 5443-5512


Mime
View raw message