You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by COURTAULT Francois <Fr...@gemalto.com> on 2012/01/26 16:30:40 UTC

Policy not supported: is it a bug ?

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.

Re: Policy not supported: is it a bug ?

Posted by Jaime Hablutzel Egoavil <ha...@gmail.com>.
Glad you fixed your problem

On Fri, Apr 13, 2012 at 4:37 PM, Gordon2 <go...@yahoo.com> wrote:

> Andreas,
>
> I tried it with the current 1.6.2 snapshots of axis2 and rampart, and the
> client works fine.  The bug was apparently due to rampart's policy
> serialization in earlier versions,  as you described.
>
> Thanks,
> Gordon
>
>
> Andreas Veithen wrote
> >
> > There are actually two things:
> >
> > 1. Neethi 2 (which is used in Axis2 1.5.x and 1.6.0) is much more
> > lenient and parses certain invalid policies without throwing an
> > exception. Neethi 3 (which is used starting with Axis2 1.6.1) no
> > longer accepts those policies and triggers the exception that you are
> > seeing.
> >
> > 2. When generating client code, Axis2 doesn't simply copy the policy
> > from the WSDL. It actually re-serializes the model created by Neethi
> > from the original policy. The problem is that in all released Rampart
> > versions (i.e. all versions up to and including 1.6.1), the code
> > responsible for serializing the policy has some issues that cause it
> > to produce invalid serialized policies in some cases. These invalid
> > policies are accepted by Neethi 2, but not by Neethi 3. That problem
> > has been fixed in Rampart 1.6.2-SNAPSHOT and 1.7.0-SNAPSHOT.
> >
> > Therefore the problem should only exist in Axis2/Rampart 1.6.1. Work
> > on the 1.6.2 releases will start soon, but there are no plans for
> > 1.7.0. Therefore you should test your code with 1.6.2-SNAPSHOT and
> > report if there are still issues (so that there is a chance to get
> > them fixed before the release).
> >
> > Andreas
> >
>
>
> --
> View this message in context:
> http://axis2.867.n6.nabble.com/Policy-not-supported-is-it-a-bug-tp4340911p4880005.html
> Sent from the Axis2-user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
>


-- 
Jaime Hablutzel - 9-9956-3299

(tildes omitidas intencionalmente)

Re: Policy not supported: is it a bug ?

Posted by Gordon2 <go...@yahoo.com>.
Andreas,

I tried it with the current 1.6.2 snapshots of axis2 and rampart, and the
client works fine.  The bug was apparently due to rampart's policy
serialization in earlier versions,  as you described. 

Thanks,
Gordon


Andreas Veithen wrote
> 
> There are actually two things:
> 
> 1. Neethi 2 (which is used in Axis2 1.5.x and 1.6.0) is much more
> lenient and parses certain invalid policies without throwing an
> exception. Neethi 3 (which is used starting with Axis2 1.6.1) no
> longer accepts those policies and triggers the exception that you are
> seeing.
> 
> 2. When generating client code, Axis2 doesn't simply copy the policy
> from the WSDL. It actually re-serializes the model created by Neethi
> from the original policy. The problem is that in all released Rampart
> versions (i.e. all versions up to and including 1.6.1), the code
> responsible for serializing the policy has some issues that cause it
> to produce invalid serialized policies in some cases. These invalid
> policies are accepted by Neethi 2, but not by Neethi 3. That problem
> has been fixed in Rampart 1.6.2-SNAPSHOT and 1.7.0-SNAPSHOT.
> 
> Therefore the problem should only exist in Axis2/Rampart 1.6.1. Work
> on the 1.6.2 releases will start soon, but there are no plans for
> 1.7.0. Therefore you should test your code with 1.6.2-SNAPSHOT and
> report if there are still issues (so that there is a chance to get
> them fixed before the release).
> 
> Andreas
> 


--
View this message in context: http://axis2.867.n6.nabble.com/Policy-not-supported-is-it-a-bug-tp4340911p4880005.html
Sent from the Axis2-user mailing list archive at Nabble.com.

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


Re: Policy not supported: is it a bug ?

Posted by Andreas Veithen <an...@gmail.com>.
There are actually two things:

1. Neethi 2 (which is used in Axis2 1.5.x and 1.6.0) is much more
lenient and parses certain invalid policies without throwing an
exception. Neethi 3 (which is used starting with Axis2 1.6.1) no
longer accepts those policies and triggers the exception that you are
seeing.

2. When generating client code, Axis2 doesn't simply copy the policy
from the WSDL. It actually re-serializes the model created by Neethi
from the original policy. The problem is that in all released Rampart
versions (i.e. all versions up to and including 1.6.1), the code
responsible for serializing the policy has some issues that cause it
to produce invalid serialized policies in some cases. These invalid
policies are accepted by Neethi 2, but not by Neethi 3. That problem
has been fixed in Rampart 1.6.2-SNAPSHOT and 1.7.0-SNAPSHOT.

Therefore the problem should only exist in Axis2/Rampart 1.6.1. Work
on the 1.6.2 releases will start soon, but there are no plans for
1.7.0. Therefore you should test your code with 1.6.2-SNAPSHOT and
report if there are still issues (so that there is a chance to get
them fixed before the release).

Andreas

On Thu, Apr 12, 2012 at 23:51, Gordon2 <go...@yahoo.com> wrote:
> Jaime,
>
> I got the latest axis2-1.7.0 and rampart snapshot using maven, and I found
> that my client actually succeeds in adding the UsernameToken security
> policy, which it fails to do in 1.6.1 (for me at least).  I see axis2-1.7.0
> uses neethi 3.0.2, and  axis2-1.6.1 uses 3.0.1. I don't know if that
> accounts for why my error occurs with 1.6.1, but not 1.7.0.
>
> Using the debugger, I get these 2 parsing behaviors, when the parser reaches
> the SupportingTokens element, which contains the Policy that contains the
> UsernameToken:
>
> With 1.7.0:
>
> SupportingTokensBuilder.build receives the SupportingTokens element, and
> UsernameTokenBuilder.build returns a UsernameToken with no problem.
>
> With 1.6.1:
>
> SupportingTokensBuilder.build receives the Policy containing the
> UsernameToken (instead of the SupportingTokens itself), and it calls
> PolicyEngine.getPolicy for the Policy's child UsernameToken. That leads to
> PolicyBuilder.processOperationElement calling isInPolicyNS, which complains
> that UsernameToken's namespace is not one of the 3 policy namespace in
> Constants.java.
>
> With 1.5.1, neethi 2 doesn't check the UsernameToken's namespace, and
> parsing succeeds.
>
> Is UsernameToken definitely known to work on the client side with 1.6.1?  If
> so, maybe my system isn't configured correctly with 1.6.1.
>
> BTW, do you know roughly when 1.7.0 will be released?
>
> Gordon
>
>
> Jaime Hablutzel Egoavil wrote
>>
>> I had a similar problem to this... but this was happening in axis2 1.4 and
>> it got fixed in newer versions... your problem seems to be different..
>> altought UsernameToken is well supported... I'm not sure about your
>> problem, but I suggest you a couple of things, first try stepping with a
>> debugger through
>>
>> org.apache.neethi.PolicyBuilder.getPolicyOperator(PolicyBuilder.java:177)
>>
>> download the source for that (if using maven that is really easy) and
>> check
>> around, check well the versions for libraries you are using... specially
>> neethi version for your axis2 version.
>>
>> Another suggestion would be to download the last development version of
>> axis from their subversion trunk and try using that... it is packaged with
>> maven so if you know maven you won't have too much problems.
>>
>> GOod luck
>>
>>
>
>
> --
> View this message in context: http://axis2.867.n6.nabble.com/Policy-not-supported-is-it-a-bug-tp4340911p4865622.html
> Sent from the Axis2-user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>

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


Re: Policy not supported: is it a bug ?

Posted by Gordon2 <go...@yahoo.com>.
Jaime,

I got the latest axis2-1.7.0 and rampart snapshot using maven, and I found
that my client actually succeeds in adding the UsernameToken security
policy, which it fails to do in 1.6.1 (for me at least).  I see axis2-1.7.0
uses neethi 3.0.2, and  axis2-1.6.1 uses 3.0.1. I don't know if that
accounts for why my error occurs with 1.6.1, but not 1.7.0.

Using the debugger, I get these 2 parsing behaviors, when the parser reaches
the SupportingTokens element, which contains the Policy that contains the
UsernameToken:

With 1.7.0:

SupportingTokensBuilder.build receives the SupportingTokens element, and
UsernameTokenBuilder.build returns a UsernameToken with no problem.

With 1.6.1:

SupportingTokensBuilder.build receives the Policy containing the
UsernameToken (instead of the SupportingTokens itself), and it calls
PolicyEngine.getPolicy for the Policy's child UsernameToken. That leads to
PolicyBuilder.processOperationElement calling isInPolicyNS, which complains
that UsernameToken's namespace is not one of the 3 policy namespace in
Constants.java.

With 1.5.1, neethi 2 doesn't check the UsernameToken's namespace, and
parsing succeeds.

Is UsernameToken definitely known to work on the client side with 1.6.1?  If
so, maybe my system isn't configured correctly with 1.6.1.

BTW, do you know roughly when 1.7.0 will be released?

Gordon


Jaime Hablutzel Egoavil wrote
> 
> I had a similar problem to this... but this was happening in axis2 1.4 and
> it got fixed in newer versions... your problem seems to be different..
> altought UsernameToken is well supported... I'm not sure about your
> problem, but I suggest you a couple of things, first try stepping with a
> debugger through
> 
> org.apache.neethi.PolicyBuilder.getPolicyOperator(PolicyBuilder.java:177)
> 
> download the source for that (if using maven that is really easy) and
> check
> around, check well the versions for libraries you are using... specially
> neethi version for your axis2 version.
> 
> Another suggestion would be to download the last development version of
> axis from their subversion trunk and try using that... it is packaged with
> maven so if you know maven you won't have too much problems.
> 
> GOod luck
> 
> 


--
View this message in context: http://axis2.867.n6.nabble.com/Policy-not-supported-is-it-a-bug-tp4340911p4865622.html
Sent from the Axis2-user mailing list archive at Nabble.com.

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


Re: Policy not supported: is it a bug ?

Posted by Jaime Hablutzel Egoavil <ha...@gmail.com>.
I had a similar problem to this... but this was happening in axis2 1.4 and
it got fixed in newer versions... your problem seems to be different..
altought UsernameToken is well supported... I'm not sure about your
problem, but I suggest you a couple of things, first try stepping with a
debugger through

org.apache.neethi.PolicyBuilder.getPolicyOperator(PolicyBuilder.java:177)

download the source for that (if using maven that is really easy) and check
around, check well the versions for libraries you are using... specially
neethi version for your axis2 version.

Another suggestion would be to download the last development version of
axis from their subversion trunk and try using that... it is packaged with
maven so if you know maven you won't have too much problems.

GOod luck


On Mon, Apr 9, 2012 at 4:53 PM, Gordon2 <go...@yahoo.com> wrote:

> Yes, it's on the client side generated using Dennis Sosnoski's
> library-granular.wsdl.  It generates and compiles ok, but the client java
> code hits this exception in neethi:
>
>     [java] Connecting to
> http://localhost:8080/axis2/services/library-granular
>     [java] Exception in thread "main" java.lang.IllegalArgumentException:
> {http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200
> 702}UsernameToken is not a <wsp:Policy> element.
>     [java]     at
> org.apache.neethi.PolicyBuilder.getPolicyOperator(PolicyBuilder.java:177)
>     [java]     at
> org.apache.neethi.PolicyBuilder.getPolicy(PolicyBuilder.java:125)
>     [java]     at
> org.apache.neethi.PolicyEngine.getPolicy(PolicyEngine.java:102)
>
> Here's the security policy from the wsdl:
>
> <wsp:Policy wsu:Id="UsernameTokenHashPassword" xmlns:wsu=
>
> "
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
> "
>      xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
>    <wsp:ExactlyOne>
>      <wsp:All>
>        <sp:SupportingTokens
>
> xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
>          <wsp:Policy>
>            <sp:UsernameToken sp:IncludeToken=
>
> "
> http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient
> ">
>              <wsp:Policy>
>                <sp:HashPassword/>
>              </wsp:Policy>
>            </sp:UsernameToken>
>          </wsp:Policy>
>        </sp:SupportingTokens>
>      </wsp:All>
>    </wsp:ExactlyOne>
>  </wsp:Policy>
>
> and the binding operation referencing the policy:
>
>    <wsdl:operation name="getBook">
>      <wsp:PolicyReference
> xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
>          URI="#UsernameTokenHashPassword"/>
>      <wsdlsoap:operation soapAction="urn:getBook"/>
>
>   ... etc. ...
>
>    </wsdl:operation>
>
>
>
> Jaime Hablutzel Egoavil wrote
> >
> > When you receive that error?? when you try to generate a client from a
> > wsdl
> > including the policy??
> >
>
>
> --
> View this message in context:
> http://axis2.867.n6.nabble.com/Policy-not-supported-is-it-a-bug-tp4340911p4717508.html
> Sent from the Axis2-user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
>


-- 
Jaime Hablutzel - 9-9956-3299

(tildes omitidas intencionalmente)

Re: Policy not supported: is it a bug ?

Posted by Gordon2 <go...@yahoo.com>.
Yes, it's on the client side generated using Dennis Sosnoski's
library-granular.wsdl.  It generates and compiles ok, but the client java
code hits this exception in neethi:

     [java] Connecting to
http://localhost:8080/axis2/services/library-granular
     [java] Exception in thread "main" java.lang.IllegalArgumentException:
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200
702}UsernameToken is not a <wsp:Policy> element.
     [java]     at
org.apache.neethi.PolicyBuilder.getPolicyOperator(PolicyBuilder.java:177)
     [java]     at
org.apache.neethi.PolicyBuilder.getPolicy(PolicyBuilder.java:125)
     [java]     at
org.apache.neethi.PolicyEngine.getPolicy(PolicyEngine.java:102)

Here's the security policy from the wsdl:

<wsp:Policy wsu:Id="UsernameTokenHashPassword" xmlns:wsu=
     
"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
      xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
    <wsp:ExactlyOne>
      <wsp:All>
        <sp:SupportingTokens
           
xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
          <wsp:Policy>
            <sp:UsernameToken sp:IncludeToken=
               
"http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
              <wsp:Policy>
                <sp:HashPassword/>
              </wsp:Policy>
            </sp:UsernameToken>
          </wsp:Policy>
        </sp:SupportingTokens>
      </wsp:All>
    </wsp:ExactlyOne>
  </wsp:Policy>

and the binding operation referencing the policy:

    <wsdl:operation name="getBook">
      <wsp:PolicyReference
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
          URI="#UsernameTokenHashPassword"/> 
      <wsdlsoap:operation soapAction="urn:getBook"/>
      
   ... etc. ...
      
    </wsdl:operation>



Jaime Hablutzel Egoavil wrote
> 
> When you receive that error?? when you try to generate a client from a
> wsdl
> including the policy??
> 


--
View this message in context: http://axis2.867.n6.nabble.com/Policy-not-supported-is-it-a-bug-tp4340911p4717508.html
Sent from the Axis2-user mailing list archive at Nabble.com.

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


Re: Policy not supported: is it a bug ?

Posted by Jaime Hablutzel Egoavil <ha...@gmail.com>.
When you receive that error?? when you try to generate a client from a wsdl
including the policy??

On Mon, Apr 9, 2012 at 1:30 PM, Gordon2 <go...@yahoo.com> wrote:

> Hello,
>
> I get an IllegalArgumentException and an error message "...is not a
> <wsp:Policy> element" that is very similar to the one described below by
> Francois, but it's for a UsernameToken security policy.  It worked ok in
> axis2-1.5.1/rampart-1.5, but not axis2-1.6.1/rampart-1.6.1.  Should I
> assume
> this is part of the same bug, and it will be fixed in the 1.6.2 release?
> Any
> update on when 1.6.2 will be released?
>
>
> James Annesley wrote
> >
> > I finally tested axis2 1.6.2-snapshot with Rampart 1.6.2-snapshot and can
> > confirm that now it works. Previously, I hadn't tested it correctly.
> >
> > James
> >
> > From: Sagara Gunathunga [mailto:sagara.gunathunga@]
> > We have a plan to release Axis2 1.6.2 within this quarter but I can't
> > think
> > about exact date.
> >
> > On Thu, Jan 26, 2012 at 16:30, COURTAULT Francois
> > <Francois.COURTAULT@> 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}TransportTo
> > <http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702%7DTransportTo
> >
> >> ken is not a <wsp:Policy> element.
> >
> >
>
>
> --
> View this message in context:
> http://axis2.867.n6.nabble.com/Policy-not-supported-is-it-a-bug-tp4340911p4716841.html
> Sent from the Axis2-user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
>


-- 
Jaime Hablutzel - 9-9956-3299

(tildes omitidas intencionalmente)

RE: Policy not supported: is it a bug ?

Posted by Gordon2 <go...@yahoo.com>.
Hello,

I get an IllegalArgumentException and an error message "...is not a
<wsp:Policy> element" that is very similar to the one described below by
Francois, but it's for a UsernameToken security policy.  It worked ok in
axis2-1.5.1/rampart-1.5, but not axis2-1.6.1/rampart-1.6.1.  Should I assume
this is part of the same bug, and it will be fixed in the 1.6.2 release? Any
update on when 1.6.2 will be released?


James Annesley wrote
> 
> I finally tested axis2 1.6.2-snapshot with Rampart 1.6.2-snapshot and can
> confirm that now it works. Previously, I hadn't tested it correctly.
> 
> James
> 
> From: Sagara Gunathunga [mailto:sagara.gunathunga@] 
> We have a plan to release Axis2 1.6.2 within this quarter but I can't
> think
> about exact date. 
>  
> On Thu, Jan 26, 2012 at 16:30, COURTAULT Francois
> &lt;Francois.COURTAULT@&gt; 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}TransportTo
> &lt;http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702%7DTransportTo&gt; 
>> ken is not a <wsp:Policy> element.
> 
> 


--
View this message in context: http://axis2.867.n6.nabble.com/Policy-not-supported-is-it-a-bug-tp4340911p4716841.html
Sent from the Axis2-user mailing list archive at Nabble.com.

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


RE: Policy not supported: is it a bug ?

Posted by James Annesley <ja...@infoshare-is.com>.
Hi,

 

I finally tested axis2 1.6.2-snapshot with Rampart 1.6.2-snapshot and can
confirm that now it works. Previously, I hadn't tested it correctly.

 

James

 

From: Sagara Gunathunga [mailto:sagara.gunathunga@gmail.com] 
Sent: 30 January 2012 09:56
To: java-user@axis.apache.org
Subject: Re: Policy not supported: is it a bug ?

 

We have a plan to release Axis2 1.6.2 within this quarter but I can't think
about exact date. 

Thanks !  

On Mon, Jan 30, 2012 at 3:17 PM, COURTAULT Francois
<Fr...@gemalto.com> wrote:

Hello,

 

So I have performed the test with Axis2-1.6.2-SNAPSHOT and
rampart-1.6.2-SNAPSHOT and it works J

Definitely, there is a bug within the 1.6.1 version. Then my question is:
when the 1.6.2 version will be out ? If you can't answer to me a precise
date: could you give me please a timeframe ?

 

Best Regards.

 

From: Sagara Gunathunga [mailto:sagara.gunathunga@gmail.com] 
Sent: samedi 28 janvier 2012 05:35


To: java-user@axis.apache.org
Subject: Re: Policy not supported: is it a bug ?

 

 

On Fri, Jan 27, 2012 at 9:55 PM, COURTAULT Francois
<Fr...@gemalto.com> wrote:

Hello,

Just for you to know regarding the tests I have made:
         - Axis2-1.5.1 and rampart-1.5: OK
         - Axis2-1.5.6 and rampart-1.5.2: OK
         - Axis2-1.6.0 and rampart-1.6.0: OK
         - Axis2-1.6.1 and rampart-1.6.1: KO

So I am pretty sure that it is a 1.6.1 bug.
Regarding the 1.6.2 snapshot: I have found the rampart
(rampart-dist-1.6.2-20120124.041736-109-bin.zip) one but not the axis2 one.
Where can I find it ?

  
You  can download it from here [1] . Is there any possibility to provide
your sample ? 

[1] -
https://builds.apache.org/view/A-F/view/Axis2/job/axis2-1.6/ws/axis2/modules
/distribution/target/ 

Thanks ! 
  


Other question: imagine the 1.6.2 snapshot works when this release will be
out ?

Best Regards.


-----Original Message-----
From: Andreas Veithen [mailto:andreas.veithen@gmail.com]
Sent: jeudi 26 janvier 2012 21:49
To: java-user@axis.apache.org
Subject: Re: Policy not supported: is it a bug ?

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

Andreas

On Thu, Jan 26, 2012 at 16:30, COURTAULT Francois
<Fr...@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}TransportTo
<http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702%7DTransportTo> 
> ken 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-wss
> ecurity-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-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


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




-- 
Sagara Gunathunga

Blog      - http://ssagara.blogspot.com
Web      - http://people.apache.org/~sagara/
<http://people.apache.org/%7Esagara/> 
LinkedIn - http://www.linkedin.com/in/ssagara




-- 
Sagara Gunathunga

Blog      - http://ssagara.blogspot.com
Web      - http://people.apache.org/~sagara/
<http://people.apache.org/%7Esagara/> 
LinkedIn - http://www.linkedin.com/in/ssagara


Infoshare Ltd
Millennium House
21 Eden Street
Kingston upon Thames
Surrey
KT1 1BL
United Kingdom

Phone: 		+ 44 (0) 20 8541 0111
Support:	+ 44 (0) 20 8481 4760
Web:		www.infoshare-is.com
E-mail:		info@infoshare-is.com

Infoshare Ltd is registered in England and Wales.
Registered Office as above.
Registered Number 2877612
VAT Number GB 678 1443 10

The content of this e-mail (and any attachment to it) is confidential. 
Any views or opinions do not represent the views or opinions 
of Infoshare Ltd.
If you have received this e-mail in error please notify the sender 
and delete it. You may not use, copy or disclose the information 
in any way. 

Infoshare Ltd monitors incoming and outgoing e-mails.

Please consider the environment. Do you really need to print 
this email?

Re: Policy not supported: is it a bug ?

Posted by Sagara Gunathunga <sa...@gmail.com>.
We have a plan to release Axis2 1.6.2 within this quarter but I can't think
about exact date.

Thanks !

On Mon, Jan 30, 2012 at 3:17 PM, COURTAULT Francois <
Francois.COURTAULT@gemalto.com> wrote:

> Hello,****
>
> ** **
>
> So I have performed the test with Axis2-1.6.2-SNAPSHOT and
> rampart-1.6.2-SNAPSHOT and it works *J*****
>
> Definitely, there is a bug within the 1.6.1 version. Then my question is:
> when the 1.6.2 version will be out ? If you can’t answer to me a precise
> date: could you give me please a timeframe ?****
>
> ** **
>
> Best Regards.****
>
> ** **
>
> *From:* Sagara Gunathunga [mailto:sagara.gunathunga@gmail.com]
> *Sent:* samedi 28 janvier 2012 05:35
>
> *To:* java-user@axis.apache.org
> *Subject:* Re: Policy not supported: is it a bug ?****
>
> ** **
>
> ** **
>
> On Fri, Jan 27, 2012 at 9:55 PM, COURTAULT Francois <
> Francois.COURTAULT@gemalto.com> wrote:****
>
> Hello,
>
> Just for you to know regarding the tests I have made:
>          - Axis2-1.5.1 and rampart-1.5: OK
>          - Axis2-1.5.6 and rampart-1.5.2: OK
>          - Axis2-1.6.0 and rampart-1.6.0: OK
>          - Axis2-1.6.1 and rampart-1.6.1: KO
>
> So I am pretty sure that it is a 1.6.1 bug.
> Regarding the 1.6.2 snapshot: I have found the rampart
> (rampart-dist-1.6.2-20120124.041736-109-bin.zip) one but not the axis2 one.
> Where can I find it ?****
>
>
> You  can download it from here [1] . Is there any possibility to provide
> your sample ?
>
> [1] -
> https://builds.apache.org/view/A-F/view/Axis2/job/axis2-1.6/ws/axis2/modules/distribution/target/
>
> Thanks !
>   ****
>
>
> Other question: imagine the 1.6.2 snapshot works when this release will be
> out ?
>
> Best Regards.****
>
>
> -----Original Message-----
> From: Andreas Veithen [mailto:andreas.veithen@gmail.com]
> Sent: jeudi 26 janvier 2012 21:49
> To: java-user@axis.apache.org
> Subject: Re: Policy not supported: is it a bug ?
>
> Can you test this with Axis2 and Rampart 1.6.2-SNAPSHOT?
>
> Andreas
>
> On Thu, Jan 26, 2012 at 16:30, COURTAULT Francois <
> Francois.COURTAULT@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}TransportTo
> > ken 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-wss
> > ecurity-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-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org****
>
>
>
>
> --
> Sagara Gunathunga
>
> Blog      - http://ssagara.blogspot.com
> Web      - http://people.apache.org/~sagara/
> LinkedIn - http://www.linkedin.com/in/ssagara****
>



-- 
Sagara Gunathunga

Blog      - http://ssagara.blogspot.com
Web      - http://people.apache.org/~sagara/
LinkedIn - http://www.linkedin.com/in/ssagara

RE: Policy not supported: is it a bug ?

Posted by COURTAULT Francois <Fr...@gemalto.com>.
Hello,

So I have performed the test with Axis2-1.6.2-SNAPSHOT and rampart-1.6.2-SNAPSHOT and it works :)
Definitely, there is a bug within the 1.6.1 version. Then my question is: when the 1.6.2 version will be out ? If you can't answer to me a precise date: could you give me please a timeframe ?

Best Regards.

From: Sagara Gunathunga [mailto:sagara.gunathunga@gmail.com]
Sent: samedi 28 janvier 2012 05:35
To: java-user@axis.apache.org
Subject: Re: Policy not supported: is it a bug ?


On Fri, Jan 27, 2012 at 9:55 PM, COURTAULT Francois <Fr...@gemalto.com>> wrote:
Hello,

Just for you to know regarding the tests I have made:
         - Axis2-1.5.1 and rampart-1.5: OK
         - Axis2-1.5.6 and rampart-1.5.2: OK
         - Axis2-1.6.0 and rampart-1.6.0: OK
         - Axis2-1.6.1 and rampart-1.6.1: KO

So I am pretty sure that it is a 1.6.1 bug.
Regarding the 1.6.2 snapshot: I have found the rampart (rampart-dist-1.6.2-20120124.041736-109-bin.zip) one but not the axis2 one. Where can I find it ?

You  can download it from here [1] . Is there any possibility to provide your sample ?

[1] - https://builds.apache.org/view/A-F/view/Axis2/job/axis2-1.6/ws/axis2/modules/distribution/target/

Thanks !


Other question: imagine the 1.6.2 snapshot works when this release will be out ?

Best Regards.

-----Original Message-----
From: Andreas Veithen [mailto:andreas.veithen@gmail.com<ma...@gmail.com>]
Sent: jeudi 26 janvier 2012 21:49
To: java-user@axis.apache.org<ma...@axis.apache.org>
Subject: Re: Policy not supported: is it a bug ?

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

Andreas

On Thu, Jan 26, 2012 at 16:30, COURTAULT Francois <Fr...@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}TransportTo<http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702%7DTransportTo>
> ken 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-wss
> ecurity-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-unsubscribe@axis.apache.org<ma...@axis.apache.org>
For additional commands, e-mail: java-user-help@axis.apache.org<ma...@axis.apache.org>


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org<ma...@axis.apache.org>
For additional commands, e-mail: java-user-help@axis.apache.org<ma...@axis.apache.org>



--
Sagara Gunathunga

Blog      - http://ssagara.blogspot.com
Web      - http://people.apache.org/~sagara/<http://people.apache.org/%7Esagara/>
LinkedIn - http://www.linkedin.com/in/ssagara

Re: Policy not supported: is it a bug ?

Posted by Sagara Gunathunga <sa...@gmail.com>.
On Fri, Jan 27, 2012 at 9:55 PM, COURTAULT Francois <
Francois.COURTAULT@gemalto.com> wrote:

> Hello,
>
> Just for you to know regarding the tests I have made:
>          - Axis2-1.5.1 and rampart-1.5: OK
>          - Axis2-1.5.6 and rampart-1.5.2: OK
>          - Axis2-1.6.0 and rampart-1.6.0: OK
>          - Axis2-1.6.1 and rampart-1.6.1: KO
>
> So I am pretty sure that it is a 1.6.1 bug.
> Regarding the 1.6.2 snapshot: I have found the rampart
> (rampart-dist-1.6.2-20120124.041736-109-bin.zip) one but not the axis2 one.
> Where can I find it ?
>

You  can download it from here [1] . Is there any possibility to provide
your sample ?

[1] -
https://builds.apache.org/view/A-F/view/Axis2/job/axis2-1.6/ws/axis2/modules/distribution/target/

Thanks !


>
> Other question: imagine the 1.6.2 snapshot works when this release will be
> out ?
>
> Best Regards.
>
> -----Original Message-----
> From: Andreas Veithen [mailto:andreas.veithen@gmail.com]
> Sent: jeudi 26 janvier 2012 21:49
> To: java-user@axis.apache.org
> Subject: Re: Policy not supported: is it a bug ?
>
> Can you test this with Axis2 and Rampart 1.6.2-SNAPSHOT?
>
> Andreas
>
> On Thu, Jan 26, 2012 at 16:30, COURTAULT Francois <
> Francois.COURTAULT@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}TransportTo
> > ken 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-wss
> > ecurity-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-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
>


-- 
Sagara Gunathunga

Blog      - http://ssagara.blogspot.com
Web      - http://people.apache.org/~sagara/
LinkedIn - http://www.linkedin.com/in/ssagara

RE: Policy not supported: is it a bug ?

Posted by COURTAULT Francois <Fr...@gemalto.com>.
Hello,

Just for you to know regarding the tests I have made:
          - Axis2-1.5.1 and rampart-1.5: OK
          - Axis2-1.5.6 and rampart-1.5.2: OK
          - Axis2-1.6.0 and rampart-1.6.0: OK
          - Axis2-1.6.1 and rampart-1.6.1: KO

So I am pretty sure that it is a 1.6.1 bug.
Regarding the 1.6.2 snapshot: I have found the rampart (rampart-dist-1.6.2-20120124.041736-109-bin.zip) one but not the axis2 one. Where can I find it ?

Other question: imagine the 1.6.2 snapshot works when this release will be out ?

Best Regards.

-----Original Message-----
From: Andreas Veithen [mailto:andreas.veithen@gmail.com] 
Sent: jeudi 26 janvier 2012 21:49
To: java-user@axis.apache.org
Subject: Re: Policy not supported: is it a bug ?

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

Andreas

On Thu, Jan 26, 2012 at 16:30, COURTAULT Francois <Fr...@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}TransportTo
> ken 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-wss
> ecurity-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-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


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


Re: Policy not supported: is it a bug ?

Posted by Andreas Veithen <an...@gmail.com>.
Can you test this with Axis2 and Rampart 1.6.2-SNAPSHOT?

Andreas

On Thu, Jan 26, 2012 at 16:30, COURTAULT Francois
<Fr...@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-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org