ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Veithen <andreas.veit...@gmail.com>
Subject Re: svn commit: r1143487 - /webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/PolicyBuilder.java
Date Sat, 09 Jul 2011 10:35:24 GMT
Correct. I've fixed the incorrect test cases in Rampart and the build
is working fine now. That means that from my point of view, we can
start the 3.0.1 release.

Andreas

On Sat, Jul 9, 2011 at 05:01, Daniel Kulp <dkulp@apache.org> wrote:
> On Friday, July 08, 2011 11:22:58 PM Andreas Veithen wrote:
>> Dan,
>>
>> This change seems to cause a regression in Rampart:
>>
>
> I'm not sure I'd call it a regression in Rampart.. :-)
>
> It's really exposing an invalid policy document.   If you look at
>
> src/test/resources/rampart/policy/16.xml
>
> you see:
>
>         <sp:Wss10
> xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
>           <sp:Policy>
>             <sp:MustSupportRefKeyIdentifier/>
>             <sp:MustSupportRefIssuerSerial/>
>           </sp:Policy>
>         </sp:Wss10>
>
> The namespace on the Policy elements there is incorrect.   It should be
> wsp:Policy.
>
> In anycase, this is probably a good change as it helps catching invalid
> policies that can cause interop issues and other such problems.
>
> Dan
>
>
>
>> Caused by: java.lang.IllegalArgumentException:
>> {http://schemas.xmlsoap.org/ws/2005/07/securitypolicy}Policy is not a
>> <wsp:Policy> element.
>>       at
>> org.apache.neethi.PolicyBuilder.getPolicyOperator(PolicyBuilder.java:177)
>> at org.apache.neethi.PolicyBuilder.getPolicy(PolicyBuilder.java:125) at
>> org.apache.neethi.PolicyEngine.getPolicy(PolicyEngine.java:102) at
>> org.apache.ws.secpolicy11.builders.WSS10Builder.build(WSS10Builder.java:40)
>> at
>> org.apache.ws.secpolicy11.builders.WSS10Builder.build(WSS10Builder.java:33)
>> at
>> org.apache.neethi.AssertionBuilderFactoryImpl.invokeBuilder(AssertionBuilde
>> rFactoryImpl.java:129) at
>> org.apache.neethi.AssertionBuilderFactoryImpl.build(AssertionBuilderFactory
>> Impl.java:110) at
>> org.apache.neethi.PolicyBuilder.processOperationElement(PolicyBuilder.java:
>> 225) at
>> org.apache.neethi.PolicyBuilder.getAllOperator(PolicyBuilder.java:185) at
>> org.apache.neethi.PolicyBuilder.processOperationElement(PolicyBuilder.java:
>> 218) at
>> org.apache.neethi.PolicyBuilder.getExactlyOneOperator(PolicyBuilder.java:18
>> 1) at
>> org.apache.neethi.PolicyBuilder.processOperationElement(PolicyBuilder.java:
>> 216) at
>> org.apache.neethi.PolicyBuilder.getPolicyOperator(PolicyBuilder.java:175)
>> at org.apache.neethi.PolicyBuilder.getPolicy(PolicyBuilder.java:125) at
>> org.apache.neethi.PolicyEngine.getPolicy(PolicyEngine.java:102) at
>> org.apache.axis2.deployment.DescriptionBuilder.processPolicyElements(Descri
>> ptionBuilder.java:639) at
>> org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.j
>> ava:307) at
>> org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup
>> (ArchiveReader.java:101) at
>> org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGro
>> up(ArchiveReader.java:143) ... 34 more
>>
>> Andreas
>>
>> On Wed, Jul 6, 2011 at 18:22,  <dkulp@apache.org> wrote:
>> > Author: dkulp
>> > Date: Wed Jul  6 16:22:40 2011
>> > New Revision: 1143487
>> >
>> > URL: http://svn.apache.org/viewvc?rev=1143487&view=rev
>> > Log:
>> > [NEETHI-12] Actually, check the entire element name, not just the
>> > namespace
>> >
>> > Modified:
>> >
>> >  webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neet
>> > hi/PolicyBuilder.java
>> >
>> > Modified:
>> > webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neeth
>> > i/PolicyBuilder.java URL:
>> > http://svn.apache.org/viewvc/webservices/commons/trunk/modules/neethi/s
>> > rc/main/java/org/apache/neethi/PolicyBuilder.java?rev=1143487&r1=1143486
>> > &r2=1143487&view=diff
>> > =======================================================================
>> > ======= ---
>> > webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neeth
>> > i/PolicyBuilder.java (original) +++
>> > webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neeth
>> > i/PolicyBuilder.java Wed Jul  6 16:22:40 2011 @@ -169,9 +169,9 @@ public
>> > class PolicyBuilder {
>> >
>> >     private Policy getPolicyOperator(Object element) {
>> >         QName qn = factory.getConverterRegistry().findQName(element);
>> > -        String ns = qn.getNamespaceURI();
>> >
>> > -        if (Constants.isPolicyNS(ns)) {
>> > +        if (Constants.isPolicyElement(qn)) {
>> > +            String ns = qn.getNamespaceURI();
>> >             return (Policy) processOperationElement(element, new
>> > Policy(defaultPolicyRegistry, ns)); }
>> >         throw new IllegalArgumentException(qn + " is not a <wsp:Policy>
>> > element.");
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: dev-help@ws.apache.org
> --
> Daniel Kulp
> dkulp@apache.org
> http://dankulp.com/blog
> Talend - http://www.talend.com
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


Mime
View raw message