Can you test this with Axis2 and Rampart 1.6.2-SNAPSHOT?

Andreas

On Thu, Jan 26, 2012 at 16:30, COURTAULT Francois
<francois.courta...@gemalto.com> wrote:
> Hello everybody,
>
>
>
> It seems that the following policy is not supported by axis2-1.6.1. I got
> the error: java.lang.IllegalArgumentException:
> {http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}TransportToken is
> not a <wsp:Policy> element.
>
>
>
> The policy generated in the axis2 adb stub  is:
>
> <wsp:Policy wsu:Id="foo"
>
>                 xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy";
>
>
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";>
>
>                 <wsp:ExactlyOne>
>
>                                 <wsp:All>
>
>                                                 <ns1:TransportBinding
>
>
> xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702";>
>
>                                                                 <wsp:Policy
> xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy";>
>
>
> <ns1:TransportToken>
>
>
> <wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy";>
>
>
> <ns1:HttpsToken />
>
>
> </wsp:Policy>
>
>
> </ns1:TransportToken>
>
>
> <ns1:AlgorithmSuite>
>
>
>                                 <wsp:Policy
> xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy";>
>
>
> <ns1:Basic256 />
>
>
> </wsp:Policy>
>
>
> </ns1:AlgorithmSuite>
>
>
> <ns1:Layout>
>
>
> <wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy";>
>
>
> <ns1:Lax />
>
>
> </wsp:Policy>
>
>
> </ns1:Layout>
>
>
> <ns1:IncludeTimestamp />
>
>
> </wsp:Policy>
>
>                                                 </ns1:TransportBinding>
>
>                                                 <ns2:SupportingTokens
>
>
> xmlns:ns2="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702";>
>
>                                                                 <wsp:Policy
> xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy";>
>
>
> <ns2:UsernameToken>
>
>
> <wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy";>
>
>
> <ns2:WssUsernameToken10 />
>
>
> </wsp:Policy>
>
>
> </ns2:UsernameToken>
>
>
> </wsp:Policy>
>
>                                                 </ns2:SupportingTokens>
>
>                                 </wsp:All>
>
>                 </wsp:ExactlyOne>
>
> </wsp:Policy>
>
>
>
> After digging in the axis source code, I saw that in the PolicyBuilder.java
> (line 173), a test Constants.isPolicyElement(qn) is made which returns false
> and so throws an IllegalArgumentException(qn + " is not a <wsp:Policy>
> element."). The problem  is that after checking the Constants.java code, it
> seems that the namespace
> http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702 is not handled at
> all !!!
>
>
>
> Is it a bug ?  If the answer is yes: is there any workaround ?
>
>
>
> Best Regards.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
For additional commands, e-mail: java-user-h...@axis.apache.org

Reply via email to