cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andreasm...@apache.org
Subject svn commit: r505397 [2/2] - in /incubator/cxf/trunk: api/src/main/java/org/apache/cxf/extension/ api/src/main/java/org/apache/cxf/phase/ api/src/main/java/org/apache/cxf/service/model/ api/src/main/java/org/apache/cxf/ws/policy/ rt/core/src/main/java/o...
Date Fri, 09 Feb 2007 18:13:17 GMT
Propchange: incubator/cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/util/PolicyComparator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/util/PolicyComparator.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/cxf/trunk/rt/ws/policy/src/main/resources/META-INF/cxf/cxf-extension-policy.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/main/resources/META-INF/cxf/cxf-extension-policy.xml?view=diff&rev=505397&r1=505396&r2=505397
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/main/resources/META-INF/cxf/cxf-extension-policy.xml (original)
+++ incubator/cxf/trunk/rt/ws/policy/src/main/resources/META-INF/cxf/cxf-extension-policy.xml Fri Feb  9 10:13:13 2007
@@ -24,11 +24,6 @@
     
     <bean id="org.apache.cxf.ws.policy.AssertionBuilderRegistry" class="org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl">
         <constructor-arg>
-            <bean class="org.apache.cxf.extension.BusExtensionRegistrar">
-              <property name="bus" ref="cxf"/>
-            </bean>
-        </constructor-arg>
-        <constructor-arg>
             <bean class="org.apache.cxf.configuration.spring.SpringBeanQNameMap">
               <property name="type" value="org.apache.cxf.ws.policy.AssertionBuilder"/>
               <property name="idsProperty" value="knownElements"/>
@@ -38,11 +33,6 @@
     
     <bean id="org.apache.cxf.ws.policy.PolicyInterceptorProviderRegistry" class="org.apache.cxf.ws.policy.PolicyInterceptorProviderRegistryImpl">
         <constructor-arg>
-            <bean class="org.apache.cxf.extension.BusExtensionRegistrar">
-              <property name="bus" ref="cxf"/>
-            </bean>
-        </constructor-arg>
-        <constructor-arg>
             <bean class="org.apache.cxf.configuration.spring.SpringBeanQNameMap">
               <property name="type" value="org.apache.cxf.ws.policy.PolicyInterceptorProvider"/>
               <property name="idsProperty" value="assertionTypes"/>
@@ -50,4 +40,8 @@
         </constructor-arg>
     </bean>
     
-</beans>
\ No newline at end of file
+    <bean class="org.apache.cxf.ws.policy.PolicyEngine">
+       <property name="bus" ref="cxf"/>
+    </bean>
+    
+</beans>

Modified: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyEngineTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyEngineTest.java?view=diff&rev=505397&r1=505396&r2=505397
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyEngineTest.java (original)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyEngineTest.java Fri Feb  9 10:13:13 2007
@@ -27,7 +27,6 @@
 import junit.framework.TestCase;
 
 import org.apache.cxf.Bus;
-import org.apache.cxf.extension.BusExtensionRegistrar;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.interceptor.Interceptor;
 import org.apache.cxf.service.model.BindingFaultInfo;
@@ -68,17 +67,12 @@
     }
     
     public void testInit() {  
+        engine = new PolicyEngine();
         Bus bus = control.createMock(Bus.class);
-        BusExtensionRegistrar br = control.createMock(BusExtensionRegistrar.class);
-        br.registerExtension((PolicyEngine)EasyMock.isA(PolicyEngine.class), 
-                             EasyMock.eq(PolicyEngine.class));
-        EasyMock.expectLastCall();
-        EasyMock.expect(br.getBus()).andReturn(bus);
+        engine.setBus(bus);
         AssertionBuilderRegistry abr = control.createMock(AssertionBuilderRegistry.class);
         EasyMock.expect(bus.getExtension(AssertionBuilderRegistry.class)).andReturn(abr);
-        
         control.replay();
-        engine = new PolicyEngine(br);
         engine.init();
         assertSame(bus, engine.getBus());
         assertEquals(1, engine.getPolicyProviders().size());

Modified: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyExtensionsTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyExtensionsTest.java?view=diff&rev=505397&r1=505396&r2=505397
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyExtensionsTest.java (original)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyExtensionsTest.java Fri Feb  9 10:13:13 2007
@@ -61,6 +61,16 @@
             assertNotNull(pip);
             pip = pipr.get(UNKNOWN);
             assertNull(pip);
+            
+            PolicyEngine engine = bus.getExtension(PolicyEngine.class);
+            assertNotNull(engine);            
+            PolicyBuilder builder = engine.getBuilder();
+            assertNotNull(builder);
+            assertSame(abr, builder.getAssertionBuilderRegistry());
+            assertNotNull(engine.getPolicyProviders());
+            assertNotNull(engine.getRegistry());
+            
+            
         } finally {
             if (null != bus) {
                 bus.shutdown(true);

Modified: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyTest.java?view=diff&rev=505397&r1=505396&r2=505397
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyTest.java (original)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyTest.java Fri Feb  9 10:13:13 2007
@@ -19,26 +19,19 @@
 
 package org.apache.cxf.ws.policy;
 
-import java.util.List;
-
 import javax.xml.namespace.QName;
 
 import junit.framework.TestCase;
 
-import org.apache.cxf.helpers.CastUtils;
+import org.apache.cxf.ws.policy.builders.primitive.PrimitiveAssertion;
 import org.apache.neethi.Assertion;
-import org.apache.neethi.Constants;
 import org.apache.neethi.Policy;
-import org.apache.neethi.PolicyComponent;
-import org.apache.neethi.PolicyOperator;
 
 /**
  * 
  */
 public class PolicyTest extends TestCase {
-
-    private static final String INDENT = "  ";
-    
+ 
     public void testNothing() {
     }
     
@@ -47,92 +40,83 @@
         Assertion a1 = new TestAssertion(new QName("http://x.y.z", "a"));
         p1.addPolicyComponent(a1);
         System.out.println("Policy p1:");
-        printPolicyComponent(p1);
+        PolicyUtils.printPolicyComponent(p1);
         
         Policy p2 = new Policy();
         Assertion a2 = new TestAssertion(new QName("http://x.y.z", "b"));
         p2.addPolicyComponent(a2);
         System.out.println("Policy p2:");
-        printPolicyComponent(p2);
+        PolicyUtils.printPolicyComponent(p2);
         
         Policy p3 = new Policy();
         p3.addPolicyComponent(a1);
         System.out.println("Policy p3:");
-        printPolicyComponent(p3);
+        PolicyUtils.printPolicyComponent(p3);
         
         Policy p = p1.merge(p2);
         System.out.println("p1 merged with p2:");
-        printPolicyComponent(p);
+        PolicyUtils.printPolicyComponent(p);
         
         System.out.println("normalised merge result:");
-        printPolicyComponent(p.normalize(true));
+        PolicyUtils.printPolicyComponent(p.normalize(true));
         
         p = p1.merge(p3);
         System.out.println("p1 merged with p3:");
-        printPolicyComponent(p);
+        PolicyUtils.printPolicyComponent(p);
         
         System.out.println("normalised merge result:");
-        printPolicyComponent(p.normalize(true));
-        
-        
-        
-        
+        PolicyUtils.printPolicyComponent(p.normalize(true));    
     }
     
-    private void printPolicyComponent(PolicyComponent pc) {
-        StringBuffer buf = new StringBuffer();
-        printPolicyComponent(pc, buf, 0);
-        System.out.println(buf.toString());
-    }
+    public void xtestNormalisePrimitives() {
+        Policy p;
+        /*
+        p = getOneOptionalAssertion();
+        doNormalise(p, true);
+        
+        p = getOneAssertion();
+        doNormalise(p, true);
+        */
+        
+        p = getTwoOptionalAssertions();
+        doNormalise(p, true);
+     
+    }   
     
-    private void printPolicyComponent(PolicyComponent pc, StringBuffer buf, int level) {
-        indent(buf, level);
-        buf.append("type: ");
-        buf.append(typeToString(pc.getType()));
-        if (Constants.TYPE_ASSERTION == pc.getType()) {
-            buf.append(" (");
-            buf.append(((Assertion)pc).getName());
-            buf.append(")");
-            nl(buf);
-        } else {
-            level++;
-            List<PolicyComponent> children = CastUtils.cast(((PolicyOperator)pc).getPolicyComponents(),
-                PolicyComponent.class);
-            nl(buf);
-            for (PolicyComponent child : children) {
-                printPolicyComponent(child, buf, level);
-            }
-            level--;
-        }
+    Policy getOneAssertion() {
+        String uri = "http://www.w3.org/2007/01/addressing/metadata";
+        Policy p = new Policy();
+        p.addAssertion(new PrimitiveAssertion(new QName(uri, "AnonymousResponses"), false));
+        return p;
     }
     
-    private void indent(StringBuffer buf, int level) {
-        for (int i = 0; i < level; i++) {
-            buf.append(INDENT);
-        }
+    Policy getOneOptionalAssertion() {
+        String uri = "http://www.w3.org/2007/01/addressing/metadata";
+        Policy p = new Policy();
+        p.addAssertion(new PrimitiveAssertion(new QName(uri, "AnonymousResponses"), true));
+        return p;
     }
     
-    private void nl(StringBuffer buf) {
-        buf.append(System.getProperty("line.separator"));
+    Policy getTwoOptionalAssertions() {
+        String uri = "http://www.w3.org/2007/01/addressing/metadata";
+        Policy p = new Policy();
+        p.addAssertion(new PrimitiveAssertion(new QName(uri, "AnonymousResponses"), true));
+        p.addAssertion(new PrimitiveAssertion(new QName(uri, "NonAnonymousResponses"), true));
+        return p;
     }
     
-    private String typeToString(short type) {
-        switch(type) {
-        case Constants.TYPE_ASSERTION:
-            return "Assertion";
-        case Constants.TYPE_ALL:
-            return "All";
-        case Constants.TYPE_EXACTLYONE:
-            return "ExactlyOne";
-        case Constants.TYPE_POLICY:
-            return "Policy";
-        case Constants.TYPE_POLICY_REF:
-            return "PolicyReference";
-        default:
-            break;
+    private void doNormalise(Policy p, boolean deep) {
+        System.out.println("compact form:");
+        PolicyUtils.printPolicyComponent(p);
+        System.out.println();
+        
+        if (deep) {
+            System.out.println("normalised form (deep):");
+        } else {
+            System.out.println("normalised form (shallow):");
         }
-        return "";
+        PolicyUtils.printPolicyComponent(p.normalize(true));
+        System.out.println();
     }
-    
-    
+   
 }

Modified: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/attachment/wsdl11/Wsdl11AttachmentPolicyProviderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/attachment/wsdl11/Wsdl11AttachmentPolicyProviderTest.java?view=diff&rev=505397&r1=505396&r2=505397
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/attachment/wsdl11/Wsdl11AttachmentPolicyProviderTest.java (original)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/attachment/wsdl11/Wsdl11AttachmentPolicyProviderTest.java Fri Feb  9 10:13:13 2007
@@ -43,6 +43,7 @@
 import org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl;
 import org.apache.cxf.ws.policy.PolicyBuilder;
 import org.apache.cxf.ws.policy.PolicyException;
+import org.apache.cxf.ws.policy.PolicyRegistryImpl;
 import org.apache.cxf.ws.policy.builders.xml.XMLPrimitiveAssertionBuilder;
 import org.apache.cxf.wsdl.WSDLManager;
 import org.apache.cxf.wsdl11.WSDLManagerImpl;
@@ -118,45 +119,17 @@
         }
         
         control.verify();
-        
-        /*
-        BusFactory.setDefaultBus(null);
-        bus = new SpringBusFactory().createBus();
-        WSDLManager manager = bus.getExtension(WSDLManager.class);
-        int n = 17;
-        services = new ServiceInfo[n];
-        endpoints = new EndpointInfo[n];
-        for (int i = 0; i < n; i++) {
-            String resourceName = "/attachment/wsdl11/test" + i + ".wsdl";
-            URL url = Wsdl11AttachmentPolicyProviderTest.class.getResource(resourceName);       
-            WSDLServiceBuilder builder = new WSDLServiceBuilder(bus);
-            try {
-                services[i] = builder.buildService(manager.getDefinition(url)).get(0);
-            } catch (WSDLException ex) {
-                ex.printStackTrace();
-                fail("Failed to build service from resource " + resourceName);
-            }
-            assertNotNull(services[i]);
-            endpoints[i] = services[i].getEndpoints().iterator().next();
-            assertNotNull(endpoints[i]);
-        }
-        */
+
     }
     
     public static void oneTimeTearDown() {
-        /*
-        bus.shutdown(true);
-        BusFactory.setDefaultBus(null);
-        */
         endpoints = null;
         services = null;
         
     }
     
     public void setUp() {
-        // AssertionBuilderRegistry abr = bus.getExtension(AssertionBuilderRegistry.class);
         AssertionBuilderRegistry abr = new AssertionBuilderRegistryImpl();
-        // assertNotNull(abr);
         AssertionBuilder ab = new XMLPrimitiveAssertionBuilder();
         abr.register(new QName("http://cxf.apache.org/test/assertions", "A"), ab);
         abr.register(new QName("http://cxf.apache.org/test/assertions", "B"), ab);
@@ -166,7 +139,7 @@
         pb.setAssertionBuilderRegistry(abr);
         app = new Wsdl11AttachmentPolicyProvider();
         app.setBuilder(pb);
-        
+        app.setRegistry(new PolicyRegistryImpl());
     }
     
     public void testElementPolicies() throws WSDLException {

Modified: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/jaxb/JaxbAssertionTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/jaxb/JaxbAssertionTest.java?view=diff&rev=505397&r1=505396&r2=505397
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/jaxb/JaxbAssertionTest.java (original)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/jaxb/JaxbAssertionTest.java Fri Feb  9 10:13:13 2007
@@ -28,7 +28,7 @@
 
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.test.assertions.foo.FooType;
-import org.apache.cxf.ws.policy.builders.xml.XmlPrimtiveAssertion;
+import org.apache.cxf.ws.policy.builders.xml.XmlPrimitiveAssertion;
 import org.apache.neethi.All;
 import org.apache.neethi.Constants;
 import org.apache.neethi.ExactlyOne;
@@ -78,7 +78,7 @@
         assertTrue(!assertion.equal(pc));
         
         IMocksControl ctrl = EasyMock.createNiceControl();
-        XmlPrimtiveAssertion xpa = ctrl.createMock(XmlPrimtiveAssertion.class);
+        XmlPrimitiveAssertion xpa = ctrl.createMock(XmlPrimitiveAssertion.class);
         QName oqn = new QName("http://cxf.apache.org/test/assertions/blah", "OtherType");
         EasyMock.expect(xpa.getName()).andReturn(oqn);
         EasyMock.expect(xpa.getType()).andReturn(Constants.TYPE_ASSERTION);

Added: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/NestedPrimitiveAssertionTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/NestedPrimitiveAssertionTest.java?view=auto&rev=505397
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/NestedPrimitiveAssertionTest.java (added)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/NestedPrimitiveAssertionTest.java Fri Feb  9 10:13:13 2007
@@ -0,0 +1,153 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.ws.policy.builders.primitive;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+
+import javax.xml.namespace.QName;
+
+import junit.framework.TestCase;
+
+import org.apache.cxf.ws.policy.AssertionBuilderRegistry;
+import org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl;
+import org.apache.cxf.ws.policy.PolicyBuilder;
+import org.apache.cxf.ws.policy.PolicyEngine;
+import org.apache.cxf.ws.policy.PolicyException;
+import org.apache.cxf.ws.policy.util.PolicyComparator;
+import org.apache.neethi.Assertion;
+import org.apache.neethi.Policy;
+import org.apache.neethi.PolicyComponent;
+
+
+/**
+ * 
+ */
+public class NestedPrimitiveAssertionTest extends TestCase {
+
+    private static final String TEST_NAMESPACE = "http://www.w3.org/2007/01/addressing/metadata";
+    private static final QName TEST_NAME1 = new QName(TEST_NAMESPACE, "Addressing");
+    private static final QName TEST_NAME2 = new QName(TEST_NAMESPACE, "AnonymousResponses");
+    private static final QName TEST_NAME3 = new QName(TEST_NAMESPACE, "NonAnonymousResponses");
+
+    private PolicyBuilder builder;
+    
+    public void setUp() {
+        AssertionBuilderRegistry abr = new AssertionBuilderRegistryImpl();
+        builder = new PolicyBuilder();
+        builder.setAssertionBuilderRegistry(abr);
+        PolicyEngine engine = new PolicyEngine();
+        engine.setBuilder(builder);
+        
+        NestedPrimitiveAssertionBuilder npab = new NestedPrimitiveAssertionBuilder();
+        npab.setPolicyEngine(engine);
+        npab.setKnownElements(Collections.singletonList(TEST_NAME1));
+        abr.register(TEST_NAME1, npab);
+        
+        PrimitiveAssertionBuilder pab = new PrimitiveAssertionBuilder();
+        Collection<QName> known = new ArrayList<QName>();
+        known.add(TEST_NAME2);
+        known.add(TEST_NAME3);
+        pab.setKnownElements(known);
+        abr.register(TEST_NAME2, pab);
+        abr.register(TEST_NAME3, pab); 
+    }
+    
+    public void testBuildFail() throws Exception {
+        String resource = "resources/compact0.xml";
+        InputStream is = NestedPrimitiveAssertionTest.class.getResourceAsStream(resource);
+        try {
+            builder.getPolicy(is);
+            fail("Expected PolicyException not thrown.");
+        } catch (PolicyException ex) {
+            // expected
+        }
+    }
+    
+    public void testBuildNonNested() throws Exception {
+        String resource = "resources/compact1.xml";
+        InputStream is = NestedPrimitiveAssertionTest.class.getResourceAsStream(resource);
+        Policy policy = builder.getPolicy(is);
+        assertEquals(1, policy.getPolicyComponents().size());
+        PolicyComponent pc = policy.getFirstPolicyComponent();
+        assertTrue(pc instanceof NestedPrimitiveAssertion);
+        NestedPrimitiveAssertion npc = (NestedPrimitiveAssertion)pc;
+        assertEquals(TEST_NAME1, npc.getName());
+        Policy nested = npc.getNested();
+        assertTrue(nested.isEmpty());
+    }
+    
+    public void testBuildNested() throws Exception {
+        String resource = "resources/compact3.xml";
+        InputStream is = NestedPrimitiveAssertionTest.class.getResourceAsStream(resource);
+        Policy policy = builder.getPolicy(is);
+        assertEquals(1, policy.getPolicyComponents().size());
+        PolicyComponent pc = policy.getFirstPolicyComponent();
+        assertTrue(pc instanceof NestedPrimitiveAssertion);
+        NestedPrimitiveAssertion npc = (NestedPrimitiveAssertion)pc;
+        assertEquals(TEST_NAME1, npc.getName());
+        Policy nested = npc.getNested();
+        assertEquals(2, nested.getPolicyComponents().size());
+        Assertion a1 = (Assertion)(nested.getPolicyComponents().get(0));
+        assertTrue(a1 instanceof PrimitiveAssertion);
+        assertTrue(TEST_NAME2.equals(a1.getName()) || TEST_NAME3.equals(a1.getName()));
+        Assertion a2 = (Assertion)(nested.getPolicyComponents().get(0));
+        assertTrue(a2 instanceof PrimitiveAssertion);
+        assertTrue(TEST_NAME2.equals(a2.getName()) || TEST_NAME3.equals(a2.getName()));       
+    }
+    
+    
+    /**
+     * Resources for this tests are taken from WS-Addressing 1.0 Metadata
+     * specification
+     * http://dev.w3.org/cvsweb/~checkout~/2004/ws/addressing/ws-addr-wsdl.html
+     * 
+     * @throws Exception
+     */
+    public void testNormalise() throws Exception {    
+        
+        int n = 6;
+        for (int i = 1; i < n; i++) {
+            String compact = "resources/compact" + i + ".xml";
+            String normalised = "resources/normalised" + i + ".xml";
+            
+            InputStream compactIn = NestedPrimitiveAssertionTest.class.getResourceAsStream(compact);
+            assertNotNull("Could not get input stream for resource " + compact, compactIn);
+            InputStream normalisedIn = NestedPrimitiveAssertionTest.class.getResourceAsStream(normalised);
+            assertNotNull("Could not get input stream for resource " + normalised, normalisedIn);
+                        
+            Policy compactPolicy = builder.getPolicy(compactIn);
+            Policy expectedNormalisedPolicy = builder.getPolicy(normalisedIn);
+            
+            assertNotNull(compactPolicy);
+            assertNotNull(expectedNormalisedPolicy);
+                        
+            Policy normalisedPolicy = (Policy)compactPolicy.normalize(true);
+            assertNotNull(normalisedPolicy);
+
+            assertTrue("Normalised version of policy defined in compact" + i
+                       + ".xml does not match expected version defined in normalised" + i + ".xml",
+                       PolicyComparator.compare(expectedNormalisedPolicy, normalisedPolicy));
+            
+        }       
+    }
+}

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/NestedPrimitiveAssertionTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/NestedPrimitiveAssertionTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact0.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact0.xml?view=auto&rev=505397
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact0.xml (added)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact0.xml Fri Feb  9 10:13:13 2007
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+ 
+  http://www.apache.org/licenses/LICENSE-2.0
+ 
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/01/addressing/metadata">
+    <wsam:Addressing wsp:Optional="true"/>
+</wsp:Policy>
\ No newline at end of file

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact0.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact0.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact0.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact1.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact1.xml?view=auto&rev=505397
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact1.xml (added)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact1.xml Fri Feb  9 10:13:13 2007
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+ 
+  http://www.apache.org/licenses/LICENSE-2.0
+ 
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/01/addressing/metadata">
+    <wsam:Addressing wsp:Optional="true">
+        <wsp:Policy/>
+    </wsam:Addressing>
+</wsp:Policy>
\ No newline at end of file

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact1.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact1.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact1.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact2.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact2.xml?view=auto&rev=505397
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact2.xml (added)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact2.xml Fri Feb  9 10:13:13 2007
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+ 
+  http://www.apache.org/licenses/LICENSE-2.0
+ 
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/01/addressing/metadata">
+    <wsam:Addressing>
+        <wsp:Policy/>
+    </wsam:Addressing>
+</wsp:Policy>
\ No newline at end of file

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact2.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact2.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact2.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact3.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact3.xml?view=auto&rev=505397
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact3.xml (added)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact3.xml Fri Feb  9 10:13:13 2007
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+ 
+  http://www.apache.org/licenses/LICENSE-2.0
+ 
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/01/addressing/metadata">
+    <wsam:Addressing wsp:Optional="true">
+        <wsp:Policy>
+            <wsam:AnonymousResponses wsp:Optional="true"/>
+            <wsam:NonAnonymousResponses wsp:Optional="true"/>
+        </wsp:Policy>
+    </wsam:Addressing>
+</wsp:Policy>
\ No newline at end of file

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact3.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact3.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact3.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact4.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact4.xml?view=auto&rev=505397
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact4.xml (added)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact4.xml Fri Feb  9 10:13:13 2007
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+ 
+  http://www.apache.org/licenses/LICENSE-2.0
+ 
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/01/addressing/metadata">
+    <wsam:Addressing>
+        <wsp:Policy>
+            <wsp:ExactlyOne>
+                <wsam:AnonymousResponses/>
+                <wsam:NonAnonymousResponses/>
+            </wsp:ExactlyOne>
+        </wsp:Policy>
+    </wsam:Addressing>
+</wsp:Policy>
\ No newline at end of file

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact4.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact4.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact4.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact5.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact5.xml?view=auto&rev=505397
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact5.xml (added)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact5.xml Fri Feb  9 10:13:13 2007
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+ 
+  http://www.apache.org/licenses/LICENSE-2.0
+ 
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/01/addressing/metadata">
+    <wsam:Addressing>
+        <wsp:Policy>
+            <wsam:NonAnonymousResponses/>
+        </wsp:Policy>
+    </wsam:Addressing>
+</wsp:Policy>
\ No newline at end of file

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact5.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact5.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/compact5.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised1.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised1.xml?view=auto&rev=505397
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised1.xml (added)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised1.xml Fri Feb  9 10:13:13 2007
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+ 
+  http://www.apache.org/licenses/LICENSE-2.0
+ 
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"  xmlns:wsam="http://www.w3.org/2007/01/addressing/metadata">
+    <wsp:ExactlyOne>
+        <wsp:All/>
+        <wsp:All>
+            <wsam:Addressing>
+                <wsp:Policy>
+                    <wsp:ExactlyOne>
+                        <wsp:All/>
+                    </wsp:ExactlyOne>
+                </wsp:Policy>
+            </wsam:Addressing>
+        </wsp:All>
+    </wsp:ExactlyOne>
+</wsp:Policy>
\ No newline at end of file

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised1.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised1.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised1.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised2.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised2.xml?view=auto&rev=505397
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised2.xml (added)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised2.xml Fri Feb  9 10:13:13 2007
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+ 
+  http://www.apache.org/licenses/LICENSE-2.0
+ 
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/01/addressing/metadata">
+    <wsp:ExactlyOne>
+        <wsp:All>
+            <wsam:Addressing>
+                <wsp:Policy>
+                    <wsp:ExactlyOne>
+                        <wsp:All/>
+                    </wsp:ExactlyOne>
+                </wsp:Policy>
+            </wsam:Addressing>
+        </wsp:All>
+    </wsp:ExactlyOne>
+</wsp:Policy>
\ No newline at end of file

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised2.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised2.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised2.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised3.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised3.xml?view=auto&rev=505397
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised3.xml (added)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised3.xml Fri Feb  9 10:13:13 2007
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+ 
+  http://www.apache.org/licenses/LICENSE-2.0
+ 
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/01/addressing/metadata">
+    <wsp:ExactlyOne>
+        <wsp:All/>
+        <wsp:All>
+            <wsam:Addressing>
+                <wsp:Policy>
+                    <wsp:ExactlyOne>
+                        <wsp:All/>
+                    </wsp:ExactlyOne>
+                </wsp:Policy>
+            </wsam:Addressing>
+        </wsp:All>
+        <wsp:All>
+            <wsam:Addressing>
+                <wsp:Policy>
+                    <wsp:ExactlyOne>
+                        <wsp:All>
+                            <wsam:AnonymousResponses/>
+                        </wsp:All>
+                    </wsp:ExactlyOne>
+                </wsp:Policy>
+            </wsam:Addressing>
+        </wsp:All>
+        <wsp:All>
+            <wsam:Addressing>
+                <wsp:Policy>
+                    <wsp:ExactlyOne>
+                        <wsp:All>
+                            <wsam:NonAnonymousResponses/>
+                        </wsp:All>
+                    </wsp:ExactlyOne>
+                </wsp:Policy>
+            </wsam:Addressing>
+        </wsp:All>
+        <wsp:All>
+            <wsam:Addressing>
+                <wsp:Policy>
+                    <wsp:ExactlyOne>
+                        <wsp:All>
+                            <wsam:AnonymousResponses/>
+                            <wsam:NonAnonymousResponses/>
+                        </wsp:All>
+                    </wsp:ExactlyOne>
+                </wsp:Policy>
+            </wsam:Addressing>
+        </wsp:All>
+    </wsp:ExactlyOne>
+</wsp:Policy>
\ No newline at end of file

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised3.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised3.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised3.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised4.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised4.xml?view=auto&rev=505397
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised4.xml (added)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised4.xml Fri Feb  9 10:13:13 2007
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+ 
+  http://www.apache.org/licenses/LICENSE-2.0
+ 
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/01/addressing/metadata">
+    <wsp:ExactlyOne>
+        <wsp:All>
+            <wsam:Addressing>
+                <wsp:Policy>
+                    <wsp:ExactlyOne>
+                        <wsp:All>
+                            <wsam:AnonymousResponses/>
+                        </wsp:All>
+                    </wsp:ExactlyOne>
+                </wsp:Policy>
+            </wsam:Addressing>
+        </wsp:All>
+        <wsp:All>
+            <wsam:Addressing>
+                <wsp:Policy>
+                    <wsp:ExactlyOne>
+                        <wsp:All>
+                            <wsam:NonAnonymousResponses/>
+                        </wsp:All>
+                    </wsp:ExactlyOne>
+                </wsp:Policy>
+            </wsam:Addressing>
+        </wsp:All>
+    </wsp:ExactlyOne>
+</wsp:Policy>
\ No newline at end of file

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised4.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised4.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised4.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised5.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised5.xml?view=auto&rev=505397
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised5.xml (added)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised5.xml Fri Feb  9 10:13:13 2007
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+ 
+  http://www.apache.org/licenses/LICENSE-2.0
+ 
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/01/addressing/metadata">
+    <wsp:ExactlyOne>
+        <wsp:All>
+            <wsam:Addressing>
+                <wsp:Policy>
+                    <wsp:ExactlyOne>
+                        <wsp:All>
+                            <wsam:NonAnonymousResponses/>
+                        </wsp:All>
+                    </wsp:ExactlyOne>
+                </wsp:Policy>
+            </wsam:Addressing>
+        </wsp:All>
+    </wsp:ExactlyOne>
+</wsp:Policy>
\ No newline at end of file

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised5.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised5.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/primitive/resources/normalised5.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/policy-bus.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/policy-bus.xml?view=diff&rev=505397&r1=505396&r2=505397
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/policy-bus.xml (original)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/policy-bus.xml Fri Feb  9 10:13:13 2007
@@ -30,6 +30,8 @@
     <bean class="org.apache.cxf.ws.policy.PolicyExtensionsTest$TestPolicyInterceptorProvider"/>
 
     <bean id="cxf" class="org.apache.cxf.bus.CXFBusImpl"/>
+    <bean class="org.apache.cxf.bus.spring.Jsr250BeanPostProcessor"/>
+    <bean class="org.apache.cxf.bus.spring.BusExtensionPostProcessor"/>
     <import resource="../../../../../META-INF/cxf/cxf-extension-policy.xml"/>  
 
 </beans>



Mime
View raw message