cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r629609 [3/3] - in /incubator/cxf/trunk: api/src/main/java/org/apache/cxf/ws/policy/ api/src/main/java/org/apache/cxf/ws/policy/builder/jaxb/ api/src/main/java/org/apache/cxf/ws/policy/builder/primitive/ api/src/main/java/org/apache/cxf/ws/...
Date Wed, 20 Feb 2008 20:40:46 GMT
Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/AddressingAnonymousPolicyTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/AddressingAnonymousPolicyTest.java?rev=629609&view=auto
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/AddressingAnonymousPolicyTest.java
(added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/AddressingAnonymousPolicyTest.java
Wed Feb 20 12:40:27 2008
@@ -0,0 +1,129 @@
+/**
+ * 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.systest.ws.policy;
+
+import java.util.logging.Logger;
+
+import javax.xml.ws.Endpoint;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.greeter_control.BasicGreeterService;
+import org.apache.cxf.greeter_control.Greeter;
+import org.apache.cxf.greeter_control.PingMeFault;
+import org.apache.cxf.interceptor.LoggingInInterceptor;
+import org.apache.cxf.interceptor.LoggingOutInterceptor;
+import org.apache.cxf.systest.ws.util.ConnectionHelper;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+
+/**
+ * Tests the use of the WS-Policy Framework to automatically engage WS-Addressing and
+ * WS-RM in response to Policies defined for the endpoint via an external policy attachment.
+ */
+public class AddressingAnonymousPolicyTest extends AbstractBusClientServerTestBase {
+
+    private static final Logger LOG = LogUtils.getLogger(AddressingAnonymousPolicyTest.class);
+
+    public static class Server extends AbstractBusTestServerBase {
+    
+        protected void run()  {            
+            SpringBusFactory bf = new SpringBusFactory();
+            Bus bus = bf.createBus("org/apache/cxf/systest/ws/policy/addr-anon-server.xml");
+            BusFactory.setDefaultBus(bus);
+            LoggingInInterceptor in = new LoggingInInterceptor();
+            bus.getInInterceptors().add(in);
+            bus.getInFaultInterceptors().add(in);
+            LoggingOutInterceptor out = new LoggingOutInterceptor();
+            bus.getOutInterceptors().add(out);
+            bus.getOutFaultInterceptors().add(out);
+            
+            GreeterImpl implementor = new GreeterImpl();
+            String address = "http://localhost:9020/SoapContext/GreeterPort";
+            Endpoint.publish(address, implementor);
+            LOG.info("Published greeter endpoint.");            
+        }
+        
+
+        public static void main(String[] args) {
+            try { 
+                Server s = new Server(); 
+                s.start();
+            } catch (Exception ex) {
+                ex.printStackTrace();
+                System.exit(-1);
+            } finally { 
+                System.out.println("done!");
+            }
+        }
+    }    
+
+    @BeforeClass
+    public static void startServers() throws Exception {
+        assertTrue("server did not launch correctly", launchServer(Server.class));
+    }
+         
+    @Test
+    public void testUsingAddressing() throws Exception {
+        SpringBusFactory bf = new SpringBusFactory();
+        bus = bf.createBus("org/apache/cxf/systest/ws/policy/addr-anon-client.xml");
+        BusFactory.setDefaultBus(bus);
+        LoggingInInterceptor in = new LoggingInInterceptor();
+        bus.getInInterceptors().add(in);
+        bus.getInFaultInterceptors().add(in);
+        LoggingOutInterceptor out = new LoggingOutInterceptor();
+        bus.getOutInterceptors().add(out);
+        bus.getOutFaultInterceptors().add(out);
+        
+        BasicGreeterService gs = new BasicGreeterService();
+        final Greeter greeter = gs.getGreeterPort();
+        LOG.fine("Created greeter client.");     
+        ConnectionHelper.setKeepAliveConnection(greeter, true);
+
+        // oneway
+
+        greeter.greetMeOneWay("CXF");
+
+        // two-way
+
+        assertEquals("CXF", greeter.greetMe("cxf")); 
+     
+        // exception
+
+        try {
+            greeter.pingMe();
+        } catch (PingMeFault ex) {
+            fail("First invocation should have succeeded.");
+        } 
+       
+        try {
+            greeter.pingMe();
+            fail("Expected PingMeFault not thrown.");
+        } catch (PingMeFault ex) {
+            assertEquals(2, (int)ex.getFaultInfo().getMajor());
+            assertEquals(1, (int)ex.getFaultInfo().getMinor());
+        } 
+    }
+}

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/AddressingAnonymousPolicyTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/AddressingAnonymousPolicyTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/PolicyLoggingInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/PolicyLoggingInterceptor.java?rev=629609&r1=629608&r2=629609&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/PolicyLoggingInterceptor.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/PolicyLoggingInterceptor.java
Wed Feb 20 12:40:27 2008
@@ -36,9 +36,9 @@
 import org.apache.cxf.transport.http.policy.PolicyUtils;
 import org.apache.cxf.transports.http.configuration.HTTPServerPolicy;
 import org.apache.cxf.ws.policy.EffectivePolicy;
+import org.apache.cxf.ws.policy.PolicyAssertion;
 import org.apache.cxf.ws.policy.PolicyEngine;
 import org.apache.cxf.ws.policy.builder.jaxb.JaxbAssertion;
-import org.apache.neethi.Assertion;
 
 public class PolicyLoggingInterceptor extends AbstractPhaseInterceptor {
 
@@ -62,9 +62,10 @@
         EffectivePolicy ep = 
             bus.getExtension(PolicyEngine.class).getEffectiveServerRequestPolicy(ei, boi);
               
         for (Iterator it = ep.getPolicy().getAlternatives(); it.hasNext();) {
-            Collection<Assertion> as = CastUtils.cast((Collection)it.next(), Assertion.class);
+            Collection<PolicyAssertion> as = 
+                CastUtils.cast((Collection)it.next(), PolicyAssertion.class);
             LOG.fine("Checking alternative with " + as.size() + " assertions.");
-            for (Assertion a : as) {
+            for (PolicyAssertion a : as) {
                 LOG.fine("Assertion: " + a.getClass().getName());
                 HTTPServerPolicy p = (JaxbAssertion.cast(a, HTTPServerPolicy.class)).getData();

                 LOG.fine("server policy: " + PolicyUtils.toString(p));

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyWsdlTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyWsdlTest.java?rev=629609&r1=629608&r2=629609&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyWsdlTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/RMPolicyWsdlTest.java
Wed Feb 20 12:40:27 2008
@@ -38,11 +38,11 @@
 import org.apache.cxf.systest.ws.util.OutMessageRecorder;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+import org.apache.cxf.ws.policy.PolicyAssertion;
 import org.apache.cxf.ws.policy.PolicyConstants;
 import org.apache.cxf.ws.policy.PolicyEngine;
 import org.apache.cxf.ws.rm.RMConstants;
 import org.apache.neethi.All;
-import org.apache.neethi.Assertion;
 import org.apache.neethi.ExactlyOne;
 import org.apache.neethi.Policy;
 import org.junit.BeforeClass;
@@ -79,15 +79,17 @@
             ServerRegistry sr = bus.getExtension(ServerRegistry.class);
             PolicyEngine pe = bus.getExtension(PolicyEngine.class);
             
-            List<Assertion> assertions1 = getAssertions(pe, sr.getServers().get(0));
+            List<PolicyAssertion> assertions1 
+                = getAssertions(pe, sr.getServers().get(0));
             assertEquals("2 assertions should be available", 2, assertions1.size());
-            List<Assertion> assertions2 = getAssertions(pe, sr.getServers().get(1));
+            List<PolicyAssertion> assertions2 = 
+                getAssertions(pe, sr.getServers().get(1));
             assertEquals("1 assertion should be available", 1, assertions2.size());
             
             LOG.info("Published greeter endpoints.");
         }
         
-        protected List<Assertion> getAssertions(PolicyEngine pe, org.apache.cxf.endpoint.Server
s) {
+        protected List<PolicyAssertion> getAssertions(PolicyEngine pe, org.apache.cxf.endpoint.Server
s) {
             Policy p1 = pe.getServerEndpointPolicy(
                              s.getEndpoint().getEndpointInfo(), null).getPolicy();
             List<ExactlyOne> pops = 
@@ -96,7 +98,7 @@
             List<All> alts = 
                 CastUtils.cast(pops.get(0).getPolicyComponents(), All.class);
             assertEquals("1 alternatives should be available", 1, alts.size());
-            return CastUtils.cast(alts.get(0).getAssertions(), Assertion.class);
+            return CastUtils.cast(alts.get(0).getAssertions(), PolicyAssertion.class);
         }
         
         public static void main(String[] args) {

Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/addr-anon-client.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/addr-anon-client.xml?rev=629609&view=auto
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/addr-anon-client.xml
(added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/addr-anon-client.xml
Wed Feb 20 12:40:27 2008
@@ -0,0 +1,39 @@
+<?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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:http="http://cxf.apache.org/transports/http/configuration"
+       xmlns:cxf="http://cxf.apache.org/core"
+       xmlns:p="http://cxf.apache.org/policy"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
+http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
+http://cxf.apache.org/policy http://cxf.apache.org/schemas/policy.xsd
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+    <cxf:bus>
+        <cxf:features>
+            <p:policies/>
+        </cxf:features>
+    </cxf:bus>
+
+    <p:externalAttachment location="org/apache/cxf/systest/ws/policy/addr-external-anonymous-client.xml"/>
+
+</beans>
\ No newline at end of file

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/addr-anon-client.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/addr-anon-client.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/addr-anon-server.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/addr-anon-server.xml?rev=629609&view=auto
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/addr-anon-server.xml
(added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/addr-anon-server.xml
Wed Feb 20 12:40:27 2008
@@ -0,0 +1,39 @@
+<?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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:http="http://cxf.apache.org/transports/http/configuration"
+       xmlns:cxf="http://cxf.apache.org/core"
+       xmlns:p="http://cxf.apache.org/policy"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
+http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
+http://cxf.apache.org/policy http://cxf.apache.org/schemas/policy.xsd
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+    <cxf:bus>
+        <cxf:features>
+            <p:policies/>
+        </cxf:features>
+    </cxf:bus>
+
+    <p:externalAttachment location="org/apache/cxf/systest/ws/policy/addr-external-anonymous-server.xml"/>
+
+</beans>
\ No newline at end of file

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/addr-anon-server.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/addr-anon-server.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/addr-external-anonymous-client.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/addr-external-anonymous-client.xml?rev=629609&view=auto
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/addr-external-anonymous-client.xml
(added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/addr-external-anonymous-client.xml
Wed Feb 20 12:40:27 2008
@@ -0,0 +1,48 @@
+<?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.
+-->
+<attachments xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsa="http://www.w3.org/2005/08/addressing">
+    <wsp:PolicyAttachment>
+        <wsp:AppliesTo>
+            <wsa:EndpointReference>
+                <wsa:Address>http://localhost:9020/SoapContext/GreeterPort</wsa:Address>
+            </wsa:EndpointReference>
+        </wsp:AppliesTo>
+        <wsp:Policy>
+          <wsp:ExactlyOne>
+            <!-- TODO 
+                if you put a NonAnonymous on top here
+                then it will fail by defaul unless a client is using 
+                a different type of selector.
+                This should not be the case, the client should
+                be able to pick up the right alternative dynamically -->
+                
+          
+            <wsp:All>
+              <wsam:Addressing xmlns:wsam="http://www.w3.org/2007/02/addressing/metadata">
+                <wsp:Policy>
+                   <wsam:AnonymousResponses/>
+                </wsp:Policy>
+              </wsam:Addressing>
+            </wsp:All> 
+          </wsp:ExactlyOne>  
+        </wsp:Policy>
+    </wsp:PolicyAttachment>    
+</attachments>
+

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/addr-external-anonymous-client.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/addr-external-anonymous-client.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/addr-external-anonymous-client.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/addr-external-anonymous-server.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/addr-external-anonymous-server.xml?rev=629609&view=auto
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/addr-external-anonymous-server.xml
(added)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/addr-external-anonymous-server.xml
Wed Feb 20 12:40:27 2008
@@ -0,0 +1,47 @@
+<?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.
+-->
+<attachments xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsa="http://www.w3.org/2005/08/addressing">
+    <wsp:PolicyAttachment>
+        <wsp:AppliesTo>
+            <wsa:EndpointReference>
+                <wsa:Address>http://localhost:9020/SoapContext/GreeterPort</wsa:Address>
+            </wsa:EndpointReference>
+        </wsp:AppliesTo>
+        <wsp:Policy>
+          <wsp:ExactlyOne>
+            <wsp:All>
+              <wsam:Addressing xmlns:wsam="http://www.w3.org/2007/02/addressing/metadata">
+                <wsp:Policy>
+                   <wsam:NonAnonymousResponses/>
+                </wsp:Policy>
+              </wsam:Addressing>
+            </wsp:All>   
+            <wsp:All>
+              <wsam:Addressing xmlns:wsam="http://www.w3.org/2007/02/addressing/metadata">
+                <wsp:Policy>
+                   <wsam:AnonymousResponses/>
+                </wsp:Policy>
+              </wsam:Addressing>
+            </wsp:All> 
+          </wsp:ExactlyOne>  
+        </wsp:Policy>
+    </wsp:PolicyAttachment>    
+</attachments>
+

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/addr-external-anonymous-server.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/addr-external-anonymous-server.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/addr-external-anonymous-server.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/addr-external.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/addr-external.xml?rev=629609&r1=629608&r2=629609&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/addr-external.xml
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/addr-external.xml
Wed Feb 20 12:40:27 2008
@@ -17,7 +17,7 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<attachments xmlns:wsp="http://www.w3.org/2006/07/ws-policy" xmlns:wsa="http://www.w3.org/2005/08/addressing">
+<attachments xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsa="http://www.w3.org/2005/08/addressing">
     <wsp:PolicyAttachment>
         <wsp:AppliesTo>
             <wsa:EndpointReference>
@@ -25,9 +25,13 @@
             </wsa:EndpointReference>
         </wsp:AppliesTo>
         <wsp:Policy>
-            <wsam:Addressing xmlns:wsam="http://www.w3.org/2007/02/addressing/metadata">
+          <wsp:ExactlyOne>
+            <wsp:All>
+              <wsam:Addressing xmlns:wsam="http://www.w3.org/2007/02/addressing/metadata">
                 <wsp:Policy/>
-            </wsam:Addressing>
+              </wsam:Addressing>
+            </wsp:All>
+          </wsp:ExactlyOne>  
         </wsp:Policy>
     </wsp:PolicyAttachment>    
 </attachments>



Mime
View raw message