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 Fri, 08 Jul 2011 21:22:58 GMT
Dan,

This change seems to cause a regression in Rampart:

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(AssertionBuilderFactoryImpl.java:129)
	at org.apache.neethi.AssertionBuilderFactoryImpl.build(AssertionBuilderFactoryImpl.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:181)
	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(DescriptionBuilder.java:639)
	at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:307)
	at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:101)
	at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(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/neethi/PolicyBuilder.java
>
> Modified: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/PolicyBuilder.java
> URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/neethi/src/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/neethi/PolicyBuilder.java
(original)
> +++ webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/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


Mime
View raw message