cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andreasm...@apache.org
Subject svn commit: r498671 [2/3] - in /incubator/cxf/trunk: api/src/main/java/org/apache/cxf/service/model/ rt/core/src/main/java/org/apache/cxf/wsdl11/ rt/ws/policy/ rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/ rt/ws/policy/src/main/java/org/apache/c...
Date Mon, 22 Jan 2007 16:17:32 GMT
Added: incubator/cxf/trunk/rt/ws/policy/src/main/resources/schemas/ws-policy-200607.xsd
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/main/resources/schemas/ws-policy-200607.xsd?view=auto&rev=498671
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/main/resources/schemas/ws-policy-200607.xsd (added)
+++ incubator/cxf/trunk/rt/ws/policy/src/main/resources/schemas/ws-policy-200607.xsd Mon Jan 22 08:17:27 2007
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    W3C XML Schema defined in the Web Services Policy 1.5
+    Framework specification
+
+    http://www.w3.org/TR/ws-policy-framework
+
+   Copyright © 2006 World Wide Web Consortium,
+
+   (Massachusetts Institute of Technology, European Research Consortium for
+   Informatics and Mathematics, Keio University). All Rights Reserved. This
+   work is distributed under the W3C® Software License [1] in the hope that
+   it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+   warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+   [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+
+   $Id: ws-policy.xsd,v 1.1 2006/12/18 06:30:01 fsasaki Exp $
+-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.w3.org/2006/07/ws-policy" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" targetNamespace="http://www.w3.org/2006/07/ws-policy" blockDefault="#all" elementFormDefault="qualified">
+	
+  <xs:import namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" schemaLocation="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"/>
+
+  <xs:import namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" schemaLocation="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"/>
+  
+  <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+  
+	<!-- Constructs from the Web Services Policy 1.5 Framework -->
+
+  <xs:element name="Policy">
+    <xs:complexType>
+
+      <xs:complexContent>
+        <xs:extension base="tns:OperatorContentType">
+          <xs:attribute name="Name" type="xs:anyURI"/>
+          <xs:anyAttribute namespace="##any" processContents="lax"/>
+        </xs:extension>
+      </xs:complexContent>
+    </xs:complexType>
+  </xs:element>
+
+  <xs:element name="All" type="tns:OperatorContentType"/>
+  <xs:element name="ExactlyOne" type="tns:OperatorContentType"/>
+
+  <xs:complexType name="OperatorContentType">
+    <xs:sequence>
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element ref="tns:Policy"/>
+        <xs:element ref="tns:All"/>
+        <xs:element ref="tns:ExactlyOne"/>
+
+        <xs:element ref="tns:PolicyReference"/>
+        <xs:any namespace="##other" processContents="lax"/>
+      </xs:choice>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:element name="PolicyReference">
+    <xs:complexType>
+      <xs:sequence>
+        <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+      </xs:sequence>
+      <xs:attribute name="URI" type="xs:anyURI" use="required"/>
+
+      <xs:attribute name="Digest" type="xs:base64Binary"/>
+      <xs:attribute name="DigestAlgorithm" type="xs:anyURI" default="http://www.w3.org/2006/07/ws-policy/Sha1Exc"/>
+      <xs:anyAttribute namespace="##any" processContents="lax"/>
+    </xs:complexType>
+  </xs:element>
+
+  <xs:attribute name="Optional" type="xs:boolean" default="false"/>
+  <xs:attribute name="Ignorable" type="xs:boolean" default="false"/>
+  	
+	<!-- Constructs from the Web Services Policy 1.5 Attachment -->
+
+  <xs:attribute name="PolicyURIs">
+    <xs:simpleType>
+      <xs:list itemType="xs:anyURI"/>
+    </xs:simpleType>
+  </xs:attribute>
+
+  <xs:element name="PolicyAttachment">
+    <xs:complexType>
+      <xs:sequence>
+
+        <xs:element ref="tns:AppliesTo"/>
+        <xs:choice maxOccurs="unbounded">
+          <xs:element ref="tns:Policy"/>
+          <xs:element ref="tns:PolicyReference"/>
+        </xs:choice>
+        <!-- omitted only because it causes the content model to be non-determistic
+        <xs:element ref="wsse:Security" minOccurs="0" />
+-->
+        <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+      </xs:sequence>
+      <xs:anyAttribute namespace="##any" processContents="lax"/>
+
+    </xs:complexType>
+  </xs:element>
+
+  <xs:element name="AppliesTo">
+    <xs:complexType>
+      <xs:sequence>
+        <xs:any namespace="##any" processContents="lax" maxOccurs="unbounded"/>
+      </xs:sequence>
+      <xs:anyAttribute namespace="##any" processContents="lax"/>
+
+    </xs:complexType>
+  </xs:element>
+
+  <xs:element name="URI">
+    <xs:complexType>
+      <xs:simpleContent>
+        <xs:extension base="xs:anyURI">
+          <xs:anyAttribute namespace="##any" processContents="lax"/>
+        </xs:extension>
+      </xs:simpleContent>
+    </xs:complexType>
+  </xs:element>
+  	
+</xs:schema>
\ No newline at end of file

Propchange: incubator/cxf/trunk/rt/ws/policy/src/main/resources/schemas/ws-policy-200607.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/ws/policy/src/main/resources/schemas/ws-policy-200607.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/ws/policy/src/main/resources/schemas/ws-policy-200607.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/NormalizeTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/NormalizeTest.java?view=auto&rev=498671
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/NormalizeTest.java (added)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/NormalizeTest.java Mon Jan 22 08:17:27 2007
@@ -0,0 +1,68 @@
+/**
+ * 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;
+
+import java.io.InputStream;
+
+import javax.xml.namespace.QName;
+
+import junit.framework.TestCase;
+
+import org.apache.cxf.ws.policy.builders.AssertionBuilder;
+import org.apache.cxf.ws.policy.builders.xml.XMLPrimitiveAssertionBuilder;
+import org.apache.neethi.Policy;
+import org.apache.neethi.util.PolicyComparator;
+
+public class NormalizeTest extends TestCase {
+    
+    public void testNormalise() throws Exception {
+        
+        PolicyBuilder builder = new PolicyBuilder();
+        AssertionBuilderRegistry abr = new AssertionBuilderRegistry();
+        builder.setAssertionBuilderRegistry(abr);
+        AssertionBuilder ab = new XMLPrimitiveAssertionBuilder(); 
+        abr.registerBuilder(new QName("http://schemas.xmlsoap.org/ws/2002/12/secext", "SecurityToken"), ab);
+        abr.registerBuilder(new QName("http://schemas.xmlsoap.org/ws/2002/12/secext", "SecurityHeader"), ab);
+        abr.registerBuilder(new QName("http://schemas.xmlsoap.org/ws/2002/12/secext", "Integrity"), ab);
+        abr.registerBuilder(new QName("http://sample.org/Assertions", "A"), ab);
+        abr.registerBuilder(new QName("http://sample.org/Assertions", "B"), ab);
+        abr.registerBuilder(new QName("http://sample.org/Assertions", "C"), ab);
+        
+        int n = 26;
+        for (int i = 1; i < n; i++) {
+            String sample = "/samples/test" + i + ".xml";
+            String normalised = "/normalized/test" + i + ".xml";
+            
+            InputStream sampleIn = NormalizeTest.class.getResourceAsStream(sample);
+            assertNotNull("Could not get input stream for resource " + sample, sampleIn);
+            InputStream normalisedIn = NormalizeTest.class.getResourceAsStream(normalised);
+            assertNotNull("Could not get input stream for resource " + normalised, normalisedIn);
+                        
+            Policy samplePolicy = builder.getPolicy(sampleIn);
+            Policy normalisedPolicy = builder.getPolicy(normalisedIn);
+            assertNotNull(samplePolicy);
+            assertNotNull(normalisedPolicy);
+            
+            Policy normalisedSamplePolicy = (Policy)samplePolicy.normalize(true);
+            assertTrue(PolicyComparator.compare(normalisedPolicy, normalisedSamplePolicy));
+            
+        }       
+    }
+}

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

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

Added: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyAttachmentManagerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyAttachmentManagerTest.java?view=auto&rev=498671
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyAttachmentManagerTest.java (added)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyAttachmentManagerTest.java Mon Jan 22 08:17:27 2007
@@ -0,0 +1,299 @@
+/**
+ * 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;
+
+import java.net.URL;
+import java.util.List;
+
+import javax.wsdl.WSDLException;
+import javax.xml.namespace.QName;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.helpers.CastUtils;
+import org.apache.cxf.service.model.EndpointInfo;
+import org.apache.cxf.service.model.ServiceInfo;
+import org.apache.cxf.ws.policy.builders.AssertionBuilder;
+import org.apache.cxf.ws.policy.builders.xml.XMLPrimitiveAssertionBuilder;
+import org.apache.cxf.wsdl.WSDLManager;
+import org.apache.cxf.wsdl11.WSDLServiceBuilder;
+import org.apache.neethi.Constants;
+import org.apache.neethi.Policy;
+import org.apache.neethi.PolicyComponent;
+import org.apache.neethi.util.PolicyComparator;
+
+/**
+ * 
+ */
+public class PolicyAttachmentManagerTest extends TestCase {
+
+    private static Bus bus;
+    private static ServiceInfo[] services;
+    private static EndpointInfo[] endpoints;
+    private PolicyAttachmentManager pam; 
+    
+    public static Test suite() {
+        TestSuite suite = new TestSuite(PolicyAttachmentManagerTest.class);
+        TestSetup wrapper = new TestSetup(suite) {
+
+            protected void setUp() {
+                oneTimeSetUp();
+            }
+
+            protected void tearDown() {
+                oneTimeTearDown();
+            }
+        };
+
+        return wrapper;
+    }
+    
+    public static void oneTimeSetUp() {
+        bus = new SpringBusFactory().getDefaultBus();
+        WSDLManager manager = bus.getExtension(WSDLManager.class);
+        int n = 9;
+        services = new ServiceInfo[n];
+        endpoints = new EndpointInfo[n];
+        for (int i = 0; i < n; i++) {
+            String resourceName = "/attachment/wsdl11/test" + i + ".wsdl";
+            URL url = PolicyAttachmentManagerTest.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);
+        new SpringBusFactory().setDefaultBus(null);
+        endpoints = null;
+        services = null;
+        
+    }
+    
+    public void setUp() {
+        AssertionBuilderRegistry abr = bus.getExtension(AssertionBuilderRegistry.class);
+        assertNotNull(abr);
+        AssertionBuilder ab = new XMLPrimitiveAssertionBuilder();
+        abr.registerBuilder(new QName("http://cxf.apache.org/test/assertions", "A"), ab);
+        abr.registerBuilder(new QName("http://cxf.apache.org/test/assertions", "B"), ab);
+        abr.registerBuilder(new QName("http://cxf.apache.org/test/assertions", "C"), ab);
+        
+        PolicyBuilder pb = new PolicyBuilder(); 
+        pb.setAssertionBuilderRegistry(abr);
+        pam = new PolicyAttachmentManager();
+        pam.setBuilder(pb);
+        
+    }
+    
+    public void testElementPolicies() throws WSDLException {
+    
+        Policy p;
+        
+        // no extensions       
+        p = pam.getElementPolicy(services[0]);
+        assertNotNull(p);
+        assertTrue(p.isEmpty());
+        
+        // extensions not of type Policy or PolicyReference
+        p = pam.getElementPolicy(services[1]);
+        assertNotNull(p);
+        assertTrue(p.isEmpty());
+        
+        // one extension of type Policy, without assertion builder
+        try {
+            p = pam.getElementPolicy(services[2]);
+            fail("Expected PolicyException not thrown.");
+        } catch (PolicyException ex) {
+            // expected
+        }
+        
+        // one extension of type Policy
+        p = pam.getElementPolicy(services[3]);
+        assertNotNull(p);
+        assertTrue(!p.isEmpty());
+        verifyAssertionsOnly(p, 2);
+        
+        // two extensions of type Policy
+        p = pam.getElementPolicy(services[4]);
+        assertNotNull(p);
+        assertTrue(!p.isEmpty());
+        verifyAssertionsOnly(p, 3);
+    }
+    
+    public void testServiceSubjectPolicies() throws WSDLException {
+        
+        Policy p;
+        Policy sp;
+        
+        // no extensions        
+        sp = pam.getSubjectPolicy(services[0]);
+        assertNotNull(sp);
+        assertTrue(sp.isEmpty());
+        p = pam.getElementPolicy(services[0]);
+        assertTrue(PolicyComparator.compare(p, sp));
+        
+        // extensions not of type Policy or PolicyReference
+        sp = pam.getSubjectPolicy(services[1]);
+        assertNotNull(sp);
+        assertTrue(sp.isEmpty());
+        
+        // one extension of type Policy, without assertion builder
+        try {
+            sp = pam.getSubjectPolicy(services[2]);
+            fail("Expected PolicyException not thrown.");
+        } catch (PolicyException ex) {
+            // expected
+        }
+        
+        // one extension of type Policy
+        sp = pam.getSubjectPolicy(services[3]);
+        assertNotNull(sp);
+        assertTrue(!sp.isEmpty());
+        verifyAssertionsOnly(sp, 2);
+        p = pam.getElementPolicy(services[3]);
+        assertTrue(PolicyComparator.compare(p, sp));
+        
+        // two extensions of type Policy
+        sp = pam.getSubjectPolicy(services[4]);
+        assertNotNull(sp);
+        assertTrue(!sp.isEmpty());
+        verifyAssertionsOnly(sp, 3);
+        p = pam.getElementPolicy(services[4]);
+        assertTrue(PolicyComparator.compare(p, sp));
+    }
+    
+    public void testServiceEffectivePolicies() throws WSDLException {
+        
+        Policy p;
+        Policy ep;
+        
+        // no extensions        
+        ep = pam.getEffectivePolicy(services[0]);
+        assertNotNull(ep);
+        assertTrue(ep.isEmpty());
+        p = pam.getElementPolicy(services[0]);
+        assertTrue(PolicyComparator.compare(p, ep));
+        
+        // extensions not of type Policy or PolicyReference
+        ep = pam.getEffectivePolicy(services[1]);
+        assertNotNull(ep);
+        assertTrue(ep.isEmpty());
+        
+        // one extension of type Policy, without assertion builder
+        try {
+            ep = pam.getEffectivePolicy(services[2]);
+            fail("Expected PolicyException not thrown.");
+        } catch (PolicyException ex) {
+            // expected
+        }
+        
+        // one extension of type Policy
+        ep = pam.getEffectivePolicy(services[3]);
+        assertNotNull(ep);
+        assertTrue(!ep.isEmpty());
+        verifyAssertionsOnly(ep, 2);
+        p = pam.getElementPolicy(services[3]);
+        assertTrue(PolicyComparator.compare(p, ep));
+        
+        // two extensions of type Policy
+        ep = pam.getEffectivePolicy(services[4]);
+        assertNotNull(ep);
+        assertTrue(!ep.isEmpty());
+        verifyAssertionsOnly(ep, 3);
+        p = pam.getElementPolicy(services[4]);
+        assertTrue(PolicyComparator.compare(p, ep));
+    }
+
+
+    public void testEndpointSubjectPolicies() {
+        Policy sp;
+        Policy p;
+        
+        // port has no extensions
+        // porttype has no extensions
+        // binding has no extensions
+        sp = pam.getSubjectPolicy(endpoints[0]);
+        assertNotNull(sp);
+        assertTrue(sp.isEmpty());
+        
+        // port has one extension of type Policy        
+        // binding has no extensions
+        // porttype has no extensions
+        sp = pam.getSubjectPolicy(endpoints[5]);
+        assertNotNull(sp);
+        assertTrue(!sp.isEmpty());
+        verifyAssertionsOnly(sp, 1);
+        p = pam.getElementPolicy(endpoints[5]);
+        assertTrue(PolicyComparator.compare(p, sp));
+        
+        // port has no extensions
+        // binding has one extension of type Policy
+        // porttype has no extensions
+        sp = pam.getSubjectPolicy(endpoints[6]);
+        assertNotNull(sp);
+        assertTrue(!sp.isEmpty());
+        verifyAssertionsOnly(sp, 1);
+        p = pam.getElementPolicy(endpoints[6].getBinding());
+        assertTrue(PolicyComparator.compare(p, sp));
+        
+        // port has no extensions
+        // binding has no extensions
+        // porttype has one extension of type Policy
+        sp = pam.getSubjectPolicy(endpoints[7]);
+        assertNotNull(sp);
+        assertTrue(!sp.isEmpty());
+        verifyAssertionsOnly(sp, 1);
+        p = pam.getElementPolicy(endpoints[7].getInterface());
+        assertTrue(PolicyComparator.compare(p, sp));
+        
+        // port has one extension of type Policy
+        // porttype has one extension of type Policy
+        // binding has one extension of type Policy
+        sp = pam.getSubjectPolicy(endpoints[8]);
+        assertNotNull(sp);
+        assertTrue(!sp.isEmpty());
+        verifyAssertionsOnly(sp, 3);
+        
+    }
+    
+    private void verifyAssertionsOnly(Policy p, int expectedAssertions) {
+        List<PolicyComponent> pcs;
+        pcs = CastUtils.cast(p.getAssertions(), PolicyComponent.class);
+        assertEquals(expectedAssertions, pcs.size());
+        for (int i = 0; i < expectedAssertions; i++) {
+            assertEquals(Constants.TYPE_ASSERTION, pcs.get(i).getType());
+        }
+    }
+    
+    
+}

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

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

Added: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyBuilderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyBuilderTest.java?view=auto&rev=498671
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyBuilderTest.java (added)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/PolicyBuilderTest.java Mon Jan 22 08:17:27 2007
@@ -0,0 +1,57 @@
+/**
+ * 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;
+
+import java.io.InputStream;
+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.AssertionBuilder;
+import org.apache.cxf.ws.policy.builders.xml.XMLPrimitiveAssertionBuilder;
+import org.apache.neethi.Constants;
+import org.apache.neethi.Policy;
+import org.apache.neethi.PolicyComponent;
+
+public class PolicyBuilderTest extends TestCase {
+    
+    public void testGetPolicy() throws Exception {
+        String name = "/samples/test25.xml";
+        InputStream is = PolicyBuilderTest.class.getResourceAsStream(name);
+        PolicyBuilder builder = new PolicyBuilder();
+        AssertionBuilderRegistry abr = new AssertionBuilderRegistry();
+        builder.setAssertionBuilderRegistry(abr);
+        AssertionBuilder ab = new XMLPrimitiveAssertionBuilder();
+        abr.registerBuilder(new QName("http://sample.org/Assertions", "A"), ab);
+        abr.registerBuilder(new QName("http://sample.org/Assertions", "B"), ab);
+        abr.registerBuilder(new QName("http://sample.org/Assertions", "C"), ab);        
+        
+        Policy p = builder.getPolicy(is);
+        assertNotNull(p);
+        List<PolicyComponent> a = CastUtils.cast(p.getAssertions(), PolicyComponent.class);
+        assertEquals(3, a.size());
+        for (int i = 0; i < 3; i++) {
+            assertEquals(Constants.TYPE_ASSERTION, a.get(i).getType());
+        }
+    }
+}

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

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

Added: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/jaxb/JaxbAssertionBuilderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/jaxb/JaxbAssertionBuilderTest.java?view=auto&rev=498671
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/jaxb/JaxbAssertionBuilderTest.java (added)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/jaxb/JaxbAssertionBuilderTest.java Mon Jan 22 08:17:27 2007
@@ -0,0 +1,65 @@
+/**
+ * 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.jaxb;
+
+import java.io.InputStream;
+
+import javax.xml.namespace.QName;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import junit.framework.TestCase;
+
+import org.apache.cxf.helpers.DOMUtils;
+import org.apache.cxf.test.assertions.foo.FooType;
+import org.apache.neethi.Assertion;
+
+/**
+ * 
+ */
+public class JaxbAssertionBuilderTest extends TestCase {
+    
+    public void testGetSupported() throws Exception {
+        QName qn = new QName("http://cxf.apache.org/test/assertions/foo", "FooType");
+        JaxbAssertionBuilder<FooType> ab = new JaxbAssertionBuilder<FooType>(FooType.class, qn);
+        assertNotNull(ab);
+        assertEquals(1, ab.getKnownElements().size());
+        assertSame(qn, ab.getKnownElements().iterator().next());
+    }
+    
+    @SuppressWarnings("unchecked")
+    public void testBuild() throws Exception {
+        QName qn = new QName("http://cxf.apache.org/test/assertions/foo", "FooType");
+        JaxbAssertionBuilder<FooType> ab = new JaxbAssertionBuilder<FooType>(FooType.class, qn);
+        assertNotNull(ab);
+        InputStream is = JaxbAssertionBuilderTest.class.getResourceAsStream("foo.xml");
+        Document doc = DOMUtils.readXml(is);
+        Element elem = (Element)doc.getDocumentElement()
+            .getElementsByTagNameNS("http://cxf.apache.org/test/assertions/foo", "foo").item(0);
+        Assertion a = ab.build(elem);
+        JaxbAssertion<FooType> jba = (JaxbAssertion<FooType>)a;
+        FooType foo = jba.getData();
+        assertEquals("CXF", foo.getName());
+        assertEquals(2, foo.getNumber().intValue()); 
+        
+    }
+
+}

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

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

Added: 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=auto&rev=498671
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/jaxb/JaxbAssertionTest.java (added)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/jaxb/JaxbAssertionTest.java Mon Jan 22 08:17:27 2007
@@ -0,0 +1,133 @@
+/**
+ * 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.jaxb;
+
+import java.util.Iterator;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+import junit.framework.TestCase;
+
+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.neethi.All;
+import org.apache.neethi.Constants;
+import org.apache.neethi.ExactlyOne;
+import org.apache.neethi.Policy;
+import org.apache.neethi.PolicyComponent;
+import org.easymock.classextension.EasyMock;
+import org.easymock.classextension.IMocksControl;
+
+/**
+ * 
+ */
+public class JaxbAssertionTest extends TestCase {
+
+    public void testBasic() {
+        JaxbAssertion<FooType> assertion = new JaxbAssertion<FooType>();
+        assertNull(assertion.getName());
+        assertNull(assertion.getData());
+        assertTrue(!assertion.isOptional());
+        assertEquals(Constants.TYPE_ASSERTION, assertion.getType());
+        FooType data = new FooType();
+        data.setName("CXF");
+        data.setNumber(2);
+        QName qn = new QName("http://cxf.apache.org/test/assertions/foo", "FooType");
+        assertion.setName(qn);
+        assertion.setData(data);
+        assertion.setOptional(true);
+        assertSame(qn, assertion.getName());
+        assertSame(data, assertion.getData());
+        assertTrue(assertion.isOptional());
+        assertEquals(Constants.TYPE_ASSERTION, assertion.getType());
+    }
+    
+    public void testEqual() {
+        JaxbAssertion<FooType> assertion = new JaxbAssertion<FooType>();
+        FooType data = new FooType();
+        data.setName("CXF");
+        data.setNumber(2);
+        QName qn = new QName("http://cxf.apache.org/test/assertions/foo", "FooType");
+        assertion.setName(qn);
+        assertion.setData(data);
+        
+        PolicyComponent pc = new Policy();
+        assertTrue(!assertion.equal(pc));
+        pc = (PolicyComponent)new All();
+        assertTrue(!assertion.equal(pc));
+        pc = (PolicyComponent)new ExactlyOne();
+        assertTrue(!assertion.equal(pc));
+        
+        IMocksControl ctrl = EasyMock.createNiceControl();
+        XmlPrimtiveAssertion xpa = ctrl.createMock(XmlPrimtiveAssertion.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);
+        
+        ctrl.replay();
+        assertTrue(!assertion.equal(xpa));
+        ctrl.verify();
+            
+        FooType odata = new FooType();
+        odata.setName(data.getName());
+        odata.setNumber(data.getNumber());
+        JaxbAssertion<FooType> oassertion = new JaxbAssertion<FooType>();
+        oassertion.setData(odata);
+        oassertion.setName(qn);
+        assertTrue(!assertion.equal(xpa));
+        
+        oassertion.setData(data);
+        assertTrue(assertion.equal(assertion));  
+        
+        assertTrue(assertion.equal(assertion));          
+    }
+    
+    public void testNormalise() {
+        JaxbAssertion<FooType> assertion = new JaxbAssertion<FooType>();
+        FooType data = new FooType();
+        data.setName("CXF");
+        data.setNumber(2);
+        QName qn = new QName("http://cxf.apache.org/test/assertions/foo", "FooType");
+        assertion.setName(qn);
+        assertion.setData(data);
+        
+        assertSame(assertion, assertion.normalize()); 
+        
+        assertion.setOptional(true);        
+        PolicyComponent pc = assertion.normalize();
+        assertEquals(Constants.TYPE_POLICY, pc.getType());
+        Policy p = (Policy)pc; 
+        Iterator alternatives = p.getAlternatives();
+
+        int total = 0;
+        for (int i = 0; i < 2; i++) {
+            List<PolicyComponent> pcs = 
+                CastUtils.cast((List<?>)(alternatives.next()), PolicyComponent.class);
+            if (!pcs.isEmpty()) {
+                assertTrue(assertion.equal(pcs.get(0)));
+                total += pcs.size();
+            }
+        }
+        assertTrue(!alternatives.hasNext());
+        assertEquals(1, total);    
+    }
+}

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

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

Added: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/jaxb/foo.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/jaxb/foo.xml?view=auto&rev=498671
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/jaxb/foo.xml (added)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/builders/jaxb/foo.xml Mon Jan 22 08:17:27 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:foo="http://cxf.apache.org/test/assertions/foo">
+	<foo:foo>
+	    <foo:name>CXF</foo:name>
+	    <foo:number>2</foo:number>
+	</foo:foo>
+</wsp:Policy>
\ No newline at end of file

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

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

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

Added: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/calculator-abstract.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/calculator-abstract.wsdl?view=auto&rev=498671
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/calculator-abstract.wsdl (added)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/calculator-abstract.wsdl Mon Jan 22 08:17:27 2007
@@ -0,0 +1,75 @@
+<?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.
+-->
+
+<definitions name="Calculator"  
+	     targetNamespace="http://apache.org/cxf/calculator"
+	     xmlns:tns="http://apache.org/cxf/calculator"
+	     xmlns="http://schemas.xmlsoap.org/wsdl/" 
+	     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+	     xmlns:x1="http://apache.org/cxf/calculator/types"
+	     xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/">
+    <types>
+	<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" 
+		    elementFormDefault="qualified" 
+		    targetNamespace="http://apache.org/cxf/calculator/types">
+
+	    <complexType name="addNumbersResponse">
+		<sequence>
+		    <element name="return" type="xsd:int" />
+		</sequence>
+	    </complexType>
+	    <element name="addNumbersResponse" type="x1:addNumbersResponse" />
+
+	    <complexType name="addNumbers">
+		<sequence>
+		    <element name="arg0" type="xsd:int" />
+		    <element name="arg1" type="xsd:int" />
+		</sequence>
+	    </complexType>
+	    <element name="add" type="x1:addNumbers" />
+
+	    <element name="CalculatorFault" type="x1:CalculatorFault" />
+	    <complexType name="CalculatorFault">
+		<sequence>
+		    <element name="faultInfo" type="xsd:string" />
+		    <element name="message" type="xsd:string" />
+		</sequence>
+	    </complexType>
+	</xsd:schema>
+    </types>
+    <message name="add">
+	<part name="parameters" element="x1:add" />
+    </message>
+    <message name="addNumbersResponse">
+	<part name="result" element="x1:addNumbersResponse" />
+    </message>
+    <message name="addNumbersFault">
+	<part name="CalculatorFault" element="x1:CalculatorFault" />
+    </message>
+
+    <portType name="CalculatorPortType">
+	<operation name="add">
+	    <input message="tns:add"/>
+	    <output message="tns:addNumbersResponse"/>
+	    <fault name="addNumbersFault" message="tns:addNumbersFault"/>
+	</operation>
+    </portType>
+
+</definitions>

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/calculator-abstract.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/calculator-abstract.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/calculator-abstract.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/calculator-binding.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/calculator-binding.wsdl?view=auto&rev=498671
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/calculator-binding.wsdl (added)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/calculator-binding.wsdl Mon Jan 22 08:17:27 2007
@@ -0,0 +1,53 @@
+<?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.
+-->
+
+<definitions name="Calculator"  
+	     targetNamespace="http://apache.org/cxf/calculator"
+	     xmlns:tns="http://apache.org/cxf/calculator"
+	     xmlns="http://schemas.xmlsoap.org/wsdl/" 
+	     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+	     xmlns:x1="http://apache.org/cxf/calculator/types"
+	     xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/">
+    <import namespace="http://apache.org/cxf/calculator"
+       location="calculator-abstract.wsdl" />
+
+    <binding name="CalculatorBinding" type="tns:CalculatorPortType">
+	<soap12:binding transport="http://www.w3.org/2003/05/soap/bindings/HTTP/" style="document" />
+	<operation name="add">
+	    <soap12:operation soapAction="" />
+	    <input>
+		<soap12:body use="literal" />
+	    </input>
+	    <output>
+		<soap12:body use="literal" />
+	    </output>
+	    <fault name="addNumbersFault">
+		<soap12:fault name="addNumbersFault" use="literal" />
+	    </fault>
+	</operation>
+    </binding>
+
+    <service name="CalculatorService">
+	<port name="CalculatorPort" binding="tns:CalculatorBinding">
+	    <soap12:address location="http://localhost:9000/CalculatorService/SoapPort" />
+	</port>
+    </service>
+
+</definitions>

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/calculator-binding.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/calculator-binding.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/calculator-binding.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/calculator.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/calculator.wsdl?view=auto&rev=498671
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/calculator.wsdl (added)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/calculator.wsdl Mon Jan 22 08:17:27 2007
@@ -0,0 +1,97 @@
+<?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.
+-->
+
+<definitions name="Calculator"  
+	     targetNamespace="http://apache.org/cxf/calculator"
+	     xmlns:tns="http://apache.org/cxf/calculator"
+	     xmlns="http://schemas.xmlsoap.org/wsdl/" 
+	     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+	     xmlns:x1="http://apache.org/cxf/calculator/types"
+	     xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/">
+    <types>
+	<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" 
+		    elementFormDefault="qualified" 
+		    targetNamespace="http://apache.org/cxf/calculator/types">
+
+	    <complexType name="addNumbersResponse">
+		<sequence>
+		    <element name="return" type="xsd:int" />
+		</sequence>
+	    </complexType>
+	    <element name="addNumbersResponse" type="x1:addNumbersResponse" />
+
+	    <complexType name="addNumbers">
+		<sequence>
+		    <element name="arg0" type="xsd:int" />
+		    <element name="arg1" type="xsd:int" />
+		</sequence>
+	    </complexType>
+	    <element name="add" type="x1:addNumbers" />
+
+	    <element name="CalculatorFault" type="x1:CalculatorFault" />
+	    <complexType name="CalculatorFault">
+		<sequence>
+		    <element name="faultInfo" type="xsd:string" />
+		    <element name="message" type="xsd:string" />
+		</sequence>
+	    </complexType>
+	</xsd:schema>
+    </types>
+    <message name="add">
+	<part name="parameters" element="x1:add" />
+    </message>
+    <message name="addNumbersResponse">
+	<part name="result" element="x1:addNumbersResponse" />
+    </message>
+    <message name="addNumbersFault">
+	<part name="CalculatorFault" element="x1:CalculatorFault" />
+    </message>
+
+    <portType name="CalculatorPortType">
+	<operation name="add">
+	    <input message="tns:add"/>
+	    <output message="tns:addNumbersResponse"/>
+	    <fault name="addNumbersFault" message="tns:addNumbersFault"/>
+	</operation>
+    </portType>
+
+    <binding name="CalculatorBinding" type="tns:CalculatorPortType">
+	<soap12:binding transport="http://www.w3.org/2003/05/soap/bindings/HTTP/" style="document" />
+	<operation name="add">
+	    <soap12:operation soapAction="" />
+	    <input>
+		<soap12:body use="literal" />
+	    </input>
+	    <output>
+		<soap12:body use="literal" />
+	    </output>
+	    <fault name="addNumbersFault">
+		<soap12:fault name="addNumbersFault" use="literal" />
+	    </fault>
+	</operation>
+    </binding>
+
+    <service name="CalculatorService">
+	<port name="CalculatorPort" binding="tns:CalculatorBinding">
+	    <soap12:address location="http://localhost:9000/CalculatorService/SoapPort" />
+	</port>
+    </service>
+
+</definitions>

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/calculator.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/calculator.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/calculator.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/calculator.xsd
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/calculator.xsd?view=auto&rev=498671
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/calculator.xsd (added)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/calculator.xsd Mon Jan 22 08:17:27 2007
@@ -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.
+-->
+
+<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" 
+            elementFormDefault="qualified" 
+            targetNamespace="http://apache.org/cxf/calculator/types">
+
+    <complexType name="addNumbersResponse">
+       <sequence>
+            <element name="return" type="xsd:int" />
+        </sequence>
+    </complexType>
+    <element name="addNumbersResponse" type="x1:addNumbersResponse" />
+
+    <complexType name="addNumbers">
+        <sequence>
+            <element name="arg0" type="xsd:int" />
+            <element name="arg1" type="xsd:int" />
+        </sequence>
+    </complexType>
+    <element name="add" type="x1:addNumbers" />
+
+    <element name="CalculatorFault" type="x1:CalculatorFault" />
+    <complexType name="CalculatorFault">
+        <sequence>
+            <element name="faultInfo" type="xsd:string" />
+            <element name="message" type="xsd:string" />
+        </sequence>
+    </complexType>
+</xsd:schema>

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/calculator.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/calculator.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/calculator.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test0.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test0.wsdl?view=auto&rev=498671
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test0.wsdl (added)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test0.wsdl Mon Jan 22 08:17:27 2007
@@ -0,0 +1,59 @@
+<?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.
+-->
+
+<definitions name="Calculator"  
+    targetNamespace="http://apache.org/cxf/calculator"
+    xmlns:tns="http://apache.org/cxf/calculator"
+    xmlns="http://schemas.xmlsoap.org/wsdl/" 
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:x1="http://apache.org/cxf/calculator/types"
+    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
+    xmlns:ta="http://cxf.apache.org/test/assertions"
+    xmlns:rmp="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
+    xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"
+    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" >
+
+    <import namespace="http://apache.org/cxf/calculator"
+       location="calculator-abstract.wsdl" />
+
+    <binding name="CalculatorBinding" type="tns:CalculatorPortType">
+	<soap12:binding transport="http://www.w3.org/2003/05/soap/bindings/HTTP/" style="document" />
+	<operation name="add">
+	    <soap12:operation soapAction="" />
+	    <input>
+		<soap12:body use="literal" />
+	    </input>
+	    <output>
+		<soap12:body use="literal" />
+	    </output>
+	    <fault name="addNumbersFault">
+		<soap12:fault name="addNumbersFault" use="literal" />
+	    </fault>
+	</operation>
+    </binding>
+
+    <service name="CalculatorService">
+	<port name="CalculatorPort" binding="tns:CalculatorBinding">
+	    <soap12:address location="http://localhost:9000/CalculatorService/SoapPort" />
+	</port>
+    </service>
+
+</definitions>

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test0.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test0.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test0.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test1.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test1.wsdl?view=auto&rev=498671
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test1.wsdl (added)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test1.wsdl Mon Jan 22 08:17:27 2007
@@ -0,0 +1,61 @@
+<?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.
+-->
+
+<definitions name="Calculator"  
+    targetNamespace="http://apache.org/cxf/calculator"
+    xmlns:tns="http://apache.org/cxf/calculator"
+    xmlns="http://schemas.xmlsoap.org/wsdl/" 
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:x1="http://apache.org/cxf/calculator/types"
+    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
+    xmlns:ta="http://cxf.apache.org/test/assertions"
+    xmlns:rmp="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
+    xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"
+    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" >
+
+    <import namespace="http://apache.org/cxf/calculator"
+       location="calculator-abstract.wsdl" />
+
+    <binding name="CalculatorBinding" type="tns:CalculatorPortType">
+	<soap12:binding transport="http://www.w3.org/2003/05/soap/bindings/HTTP/" style="document" />
+	<operation name="add">
+	    <soap12:operation soapAction="" />
+	    <input>
+		<soap12:body use="literal" />
+	    </input>
+	    <output>
+		<soap12:body use="literal" />
+	    </output>
+	    <fault name="addNumbersFault">
+		<soap12:fault name="addNumbersFault" use="literal" />
+	    </fault>
+	</operation>
+    </binding>
+
+    <service name="CalculatorService">
+        <ta:A>A</ta:A> 
+        <ta:B>B</ta:B> 
+        <port name="CalculatorPort" binding="tns:CalculatorBinding">
+	        <soap12:address location="http://localhost:9000/CalculatorService/SoapPort" />            
+	    </port>
+    </service>
+
+</definitions>

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test1.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test1.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test1.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test100.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test100.wsdl?view=auto&rev=498671
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test100.wsdl (added)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test100.wsdl Mon Jan 22 08:17:27 2007
@@ -0,0 +1,70 @@
+<definitions name="Calculator"
+   targetNamespace="http://apache.org/cxf/calculato/test"
+   xmlns:tns="http://apache.org/cxf/calculator/test"
+   xmlns:calc="http://apache.org/cxf/calculator"
+   xmlns:rmp="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
+   xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"
+   xmlns="http://schemas.xmlsoap.org/wsdl/"
+   xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
+   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:Policy wsu:Id="RmPolicy" >
+    <rmp:RMAssertion>
+      <rmp:InactivityTimeout Milliseconds="600000" />
+      <rmp:BaseRetransmissionInterval Milliseconds="3000" />
+      <rmp:ExponentialBackoff />
+      <rmp:AcknowledgementInterval Milliseconds="200" />
+    </rmp:RMAssertion>
+  </wsp:Policy>
+
+    <wsp:Policy wsu:Id="X509EndpointPolicy" >
+      <sp:AsymmetricBinding>
+        <wsp:Policy>
+          <!-- Details omitted for readability -->
+          <sp:IncludeTimestamp />
+          <sp:OnlySignEntireHeadersAndBody />
+        </wsp:Policy>
+      </sp:AsymmetricBinding>
+    </wsp:Policy>
+
+    <wsp:Policy wsu:Id="SecureMessagePolicy" >
+      <sp:SignedParts>
+        <sp:Body />
+      </sp:SignedParts>
+      <sp:EncryptedParts>
+        <sp:Body />
+      </sp:EncryptedParts>
+    </wsp:Policy>
+
+    <import namespace="http://apache.org/cxf/calculator"
+       location="calculator.wsdl" />
+
+    <binding name="CalculatorBinding" type="calc:CalculatorPortType" >
+      <soap12:binding style="document"
+         transport="http://schemas.xmlsoap.org/soap/http" />
+      <wsp:PolicyReference URI="#RmPolicy" required="true" />
+      <wsp:PolicyReference URI="#X509EndpointPolicy" required="true" />
+      <operation name="add" >
+        <soap12:operation soapAction="http://apache.org/cxf/calculator/Calculator/add" />
+          <input>
+            <soap12:body use="literal"/>
+            <wsp:PolicyReference URI="#SecureMessagePolicy"
+                                 required="true" />
+          </input>
+          <output>
+            <soap12:body use="literal"/>
+            <wsp:PolicyReference URI="#SecureMessagePolicy"
+            <wsp:PolicyReference URI="#SecureMessagePolicy"
+                                 required="true" />
+          </output>
+      </operation>
+    </binding>
+
+    <service name="CalculatorService">
+	<port name="CalculatorPort" binding="tns:CalculatorBinding">
+	    <soap12:address location="http://localhost:9000/CalculatorService/SoapPort" />
+	</port>
+    </service>
+
+</definitions>

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test100.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test100.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test100.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test2.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test2.wsdl?view=auto&rev=498671
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test2.wsdl (added)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test2.wsdl Mon Jan 22 08:17:27 2007
@@ -0,0 +1,63 @@
+<?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.
+-->
+
+<definitions name="Calculator"  
+    targetNamespace="http://apache.org/cxf/calculator"
+    xmlns:tns="http://apache.org/cxf/calculator"
+    xmlns="http://schemas.xmlsoap.org/wsdl/" 
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:x1="http://apache.org/cxf/calculator/types"
+    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
+    xmlns:ta="http://cxf.apache.org/test/assertions"
+    xmlns:rmp="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
+    xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"
+    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" >
+
+    <import namespace="http://apache.org/cxf/calculator"
+       location="calculator-abstract.wsdl" />
+
+    <binding name="CalculatorBinding" type="tns:CalculatorPortType">
+	<soap12:binding transport="http://www.w3.org/2003/05/soap/bindings/HTTP/" style="document" />
+	<operation name="add">
+	    <soap12:operation soapAction="" />
+	    <input>
+		<soap12:body use="literal" />
+	    </input>
+	    <output>
+		<soap12:body use="literal" />
+	    </output>
+	    <fault name="addNumbersFault">
+		<soap12:fault name="addNumbersFault" use="literal" />
+	    </fault>
+	</operation>
+    </binding>
+
+    <service name="CalculatorService">
+        <wsp:Policy>
+            <ta:A>A</ta:A> 
+            <ta:X>X</ta:X> 
+        </wsp:Policy>
+        <port name="CalculatorPort" binding="tns:CalculatorBinding">
+	        <soap12:address location="http://localhost:9000/CalculatorService/SoapPort" />            
+	    </port>
+    </service>
+
+</definitions>

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test2.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test2.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test2.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test3.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test3.wsdl?view=auto&rev=498671
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test3.wsdl (added)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test3.wsdl Mon Jan 22 08:17:27 2007
@@ -0,0 +1,63 @@
+<?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.
+-->
+
+<definitions name="Calculator"  
+    targetNamespace="http://apache.org/cxf/calculator"
+    xmlns:tns="http://apache.org/cxf/calculator"
+    xmlns="http://schemas.xmlsoap.org/wsdl/" 
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:x1="http://apache.org/cxf/calculator/types"
+    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
+    xmlns:ta="http://cxf.apache.org/test/assertions"
+    xmlns:rmp="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
+    xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"
+    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" >
+
+    <import namespace="http://apache.org/cxf/calculator"
+       location="calculator-abstract.wsdl" />
+
+    <binding name="CalculatorBinding" type="tns:CalculatorPortType">
+	<soap12:binding transport="http://www.w3.org/2003/05/soap/bindings/HTTP/" style="document" />
+	<operation name="add">
+	    <soap12:operation soapAction="" />
+	    <input>
+		<soap12:body use="literal" />
+	    </input>
+	    <output>
+		<soap12:body use="literal" />
+	    </output>
+	    <fault name="addNumbersFault">
+		<soap12:fault name="addNumbersFault" use="literal" />
+	    </fault>
+	</operation>
+    </binding>
+
+    <service name="CalculatorService">
+        <wsp:Policy>
+            <ta:A>A</ta:A> 
+            <ta:B>B</ta:B> 
+        </wsp:Policy>
+        <port name="CalculatorPort" binding="tns:CalculatorBinding">
+	        <soap12:address location="http://localhost:9000/CalculatorService/SoapPort" />            
+	    </port>
+    </service>
+
+</definitions>

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test3.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test3.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test3.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test4.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test4.wsdl?view=auto&rev=498671
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test4.wsdl (added)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test4.wsdl Mon Jan 22 08:17:27 2007
@@ -0,0 +1,66 @@
+<?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.
+-->
+
+<definitions name="Calculator"  
+    targetNamespace="http://apache.org/cxf/calculator"
+    xmlns:tns="http://apache.org/cxf/calculator"
+    xmlns="http://schemas.xmlsoap.org/wsdl/" 
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:x1="http://apache.org/cxf/calculator/types"
+    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
+    xmlns:ta="http://cxf.apache.org/test/assertions"
+    xmlns:rmp="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
+    xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"
+    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" >
+
+    <import namespace="http://apache.org/cxf/calculator"
+       location="calculator-abstract.wsdl" />
+
+    <binding name="CalculatorBinding" type="tns:CalculatorPortType">
+	<soap12:binding transport="http://www.w3.org/2003/05/soap/bindings/HTTP/" style="document" />
+	<operation name="add">
+	    <soap12:operation soapAction="" />
+	    <input>
+		<soap12:body use="literal" />
+	    </input>
+	    <output>
+		<soap12:body use="literal" />
+	    </output>
+	    <fault name="addNumbersFault">
+		<soap12:fault name="addNumbersFault" use="literal" />
+	    </fault>
+	</operation>
+    </binding>
+
+    <service name="CalculatorService">
+        <wsp:Policy>
+            <ta:A>A</ta:A> 
+            <ta:B>B</ta:B> 
+        </wsp:Policy>
+        <wsp:Policy>
+            <ta:C>C</ta:C>  
+        </wsp:Policy>
+        <port name="CalculatorPort" binding="tns:CalculatorBinding">
+	        <soap12:address location="http://localhost:9000/CalculatorService/SoapPort" />            
+	    </port>
+    </service>
+
+</definitions>

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test4.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test4.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test4.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test5.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test5.wsdl?view=auto&rev=498671
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test5.wsdl (added)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test5.wsdl Mon Jan 22 08:17:27 2007
@@ -0,0 +1,62 @@
+<?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.
+-->
+
+<definitions name="Calculator"  
+    targetNamespace="http://apache.org/cxf/calculator"
+    xmlns:tns="http://apache.org/cxf/calculator"
+    xmlns="http://schemas.xmlsoap.org/wsdl/" 
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:x1="http://apache.org/cxf/calculator/types"
+    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
+    xmlns:ta="http://cxf.apache.org/test/assertions"
+    xmlns:rmp="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
+    xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"
+    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" >
+
+    <import namespace="http://apache.org/cxf/calculator"
+       location="calculator-abstract.wsdl" />
+
+    <binding name="CalculatorBinding" type="tns:CalculatorPortType">
+	<soap12:binding transport="http://www.w3.org/2003/05/soap/bindings/HTTP/" style="document" />
+	<operation name="add">
+	    <soap12:operation soapAction="" />
+	    <input>
+		<soap12:body use="literal" />
+	    </input>
+	    <output>
+		<soap12:body use="literal" />
+	    </output>
+	    <fault name="addNumbersFault">
+		<soap12:fault name="addNumbersFault" use="literal" />
+	    </fault>
+	</operation>
+    </binding>
+
+    <service name="CalculatorService">        
+        <port name="CalculatorPort" binding="tns:CalculatorBinding">
+	        <soap12:address location="http://localhost:9000/CalculatorService/SoapPort" /> 
+	        <wsp:Policy>
+                <ta:A>A</ta:A>  
+            </wsp:Policy>           
+	    </port>
+    </service>
+
+</definitions>

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test5.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test5.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test5.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test6.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test6.wsdl?view=auto&rev=498671
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test6.wsdl (added)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test6.wsdl Mon Jan 22 08:17:27 2007
@@ -0,0 +1,62 @@
+<?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.
+-->
+
+<definitions name="Calculator"  
+    targetNamespace="http://apache.org/cxf/calculator"
+    xmlns:tns="http://apache.org/cxf/calculator"
+    xmlns="http://schemas.xmlsoap.org/wsdl/" 
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    xmlns:x1="http://apache.org/cxf/calculator/types"
+    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
+    xmlns:ta="http://cxf.apache.org/test/assertions"
+    xmlns:rmp="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
+    xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"
+    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" >
+
+    <import namespace="http://apache.org/cxf/calculator"
+       location="calculator-abstract.wsdl" />
+
+    <binding name="CalculatorBinding" type="tns:CalculatorPortType">
+	<soap12:binding transport="http://www.w3.org/2003/05/soap/bindings/HTTP/" style="document" />
+	<wsp:Policy>
+        <ta:B>B</ta:B>  
+    </wsp:Policy>
+	<operation name="add">
+	    <soap12:operation soapAction="" />
+	    <input>
+		<soap12:body use="literal" />
+	    </input>
+	    <output>
+		<soap12:body use="literal" />
+	    </output>
+	    <fault name="addNumbersFault">
+		<soap12:fault name="addNumbersFault" use="literal" />
+	    </fault>
+	</operation>
+    </binding>
+
+    <service name="CalculatorService">                
+        <port name="CalculatorPort" binding="tns:CalculatorBinding">
+	        <soap12:address location="http://localhost:9000/CalculatorService/SoapPort" />           
+	    </port>
+    </service>
+
+</definitions>

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test6.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test6.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test6.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test7.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test7.wsdl?view=auto&rev=498671
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test7.wsdl (added)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test7.wsdl Mon Jan 22 08:17:27 2007
@@ -0,0 +1,105 @@
+<?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.
+-->
+
+<definitions name="Calculator"  
+    targetNamespace="http://apache.org/cxf/calculator"
+    xmlns:tns="http://apache.org/cxf/calculator"
+    xmlns="http://schemas.xmlsoap.org/wsdl/" 
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+	xmlns:x1="http://apache.org/cxf/calculator/types"
+    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
+    xmlns:ta="http://cxf.apache.org/test/assertions"
+    xmlns:rmp="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
+    xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"
+    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">
+    <types>
+	<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" 
+		    elementFormDefault="qualified" 
+		    targetNamespace="http://apache.org/cxf/calculator/types">
+
+	    <complexType name="addNumbersResponse">
+		<sequence>
+		    <element name="return" type="xsd:int" />
+		</sequence>
+	    </complexType>
+	    <element name="addNumbersResponse" type="x1:addNumbersResponse" />
+
+	    <complexType name="addNumbers">
+		<sequence>
+		    <element name="arg0" type="xsd:int" />
+		    <element name="arg1" type="xsd:int" />
+		</sequence>
+	    </complexType>
+	    <element name="add" type="x1:addNumbers" />
+
+	    <element name="CalculatorFault" type="x1:CalculatorFault" />
+	    <complexType name="CalculatorFault">
+		<sequence>
+		    <element name="faultInfo" type="xsd:string" />
+		    <element name="message" type="xsd:string" />
+		</sequence>
+	    </complexType>
+	</xsd:schema>
+    </types>
+    <message name="add">
+	<part name="parameters" element="x1:add" />
+    </message>
+    <message name="addNumbersResponse">
+	<part name="result" element="x1:addNumbersResponse" />
+    </message>
+    <message name="addNumbersFault">
+	<part name="CalculatorFault" element="x1:CalculatorFault" />
+    </message>
+
+    <portType name="CalculatorPortType">
+    <wsp:Policy>
+        <ta:C>C</ta:C>  
+    </wsp:Policy>
+	<operation name="add">
+	    <input message="tns:add"/>
+	    <output message="tns:addNumbersResponse"/>
+	    <fault name="addNumbersFault" message="tns:addNumbersFault"/>
+	</operation>
+    </portType>
+
+    <binding name="CalculatorBinding" type="tns:CalculatorPortType">
+	<soap12:binding transport="http://www.w3.org/2003/05/soap/bindings/HTTP/" style="document" />
+	<operation name="add">
+	    <soap12:operation soapAction="" />
+	    <input>
+		<soap12:body use="literal" />
+	    </input>
+	    <output>
+		<soap12:body use="literal" />
+	    </output>
+	    <fault name="addNumbersFault">
+		<soap12:fault name="addNumbersFault" use="literal" />
+	    </fault>
+	</operation>
+    </binding>
+
+    <service name="CalculatorService">
+	<port name="CalculatorPort" binding="tns:CalculatorBinding">
+	    <soap12:address location="http://localhost:9000/CalculatorService/SoapPort" />
+	</port>
+    </service>
+
+</definitions>

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test7.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test7.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test7.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message