cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andreasm...@apache.org
Subject svn commit: r515527 - in /incubator/cxf/trunk: api/src/main/java/org/apache/cxf/service/model/ api/src/main/java/org/apache/cxf/ws/policy/ rt/core/src/main/java/org/apache/cxf/wsdl11/ rt/core/src/test/java/org/apache/cxf/wsdl11/ rt/core/src/test/resour...
Date Wed, 07 Mar 2007 10:50:25 GMT
Author: andreasmyth
Date: Wed Mar  7 02:50:24 2007
New Revision: 515527

URL: http://svn.apache.org/viewvc?view=rev&rev=515527
Log:
[JIRA CXF-210] Service model to store WSDL extension attributes.
[JIRA CXF-376] Policy Attachment using WSDL 1.1 - completed now with support for policyURIs attribute.

Added:
    incubator/cxf/trunk/rt/core/src/test/resources/org/apache/cxf/wsdl11/hello_world_ext.wsdl   (with props)
    incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test18.wsdl   (with props)
Modified:
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/AbstractPropertiesHolder.java
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/Extensible.java
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/ws/policy/PolicyConstants.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/wsdl11/WSDLServiceBuilderTest.java
    incubator/cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/wsdl11/Wsdl11AttachmentPolicyProvider.java
    incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/attachment/wsdl11/Wsdl11AttachmentPolicyProviderTest.java

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/AbstractPropertiesHolder.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/AbstractPropertiesHolder.java?view=diff&rev=515527&r1=515526&r2=515527
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/AbstractPropertiesHolder.java (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/AbstractPropertiesHolder.java Wed Mar  7 02:50:24 2007
@@ -20,14 +20,18 @@
 package org.apache.cxf.service.model;
 
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.atomic.AtomicReference;
 
+import javax.xml.namespace.QName;
+
 public abstract class AbstractPropertiesHolder implements Extensible {
     private AtomicReference<Map<String, Object>> propertyMap = new AtomicReference<Map<String, Object>>();
     private AtomicReference<Object[]> extensors = new AtomicReference<Object[]>();
+    private Map<QName, Object> extensionAttributes;
     
     public Object getProperty(String name) {
         if (null == propertyMap.get()) {
@@ -100,6 +104,26 @@
         return extensors;
     }
     
+      
+    public Object getExtensionAttribute(QName name) {        
+        return null == extensionAttributes ? null : extensionAttributes.get(name);
+    }
+
+    public Map<QName, Object> getExtensionAttributes() {
+        return extensionAttributes;
+    }
+    
+    public void addExtensionAttribute(QName name, Object attr) {
+        if (null == extensionAttributes) {
+            extensionAttributes = new HashMap<QName, Object>();
+        }
+        extensionAttributes.put(name, attr);
+    }
+   
+    public void setExtensionAttributes(Map<QName, Object> attrs) {
+        extensionAttributes = attrs;        
+    }
+
     /**
      * Lookup a configuration value. This may be found in the properties holder supplied
      * (i.e. an EndpointInfo or ServiceInfo), or it may be a property on the Bus itself.

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/Extensible.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/Extensible.java?view=diff&rev=515527&r1=515526&r2=515527
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/Extensible.java (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/Extensible.java Wed Mar  7 02:50:24 2007
@@ -20,6 +20,9 @@
 package org.apache.cxf.service.model;
 
 import java.util.List;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
 
 /**
  * 
@@ -29,5 +32,15 @@
     <T> T getExtensor(Class<T> cls);
     
     <T> List<T> getExtensors(Class<T> cls);
+    
+    void addExtensor(Object el);
+    
+    Object getExtensionAttribute(QName name);
+    
+    Map<QName, Object> getExtensionAttributes();
+    
+    void addExtensionAttribute(QName name, Object attr);
+    
+    void setExtensionAttributes(Map<QName, Object> attrs);
       
 }

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/ws/policy/PolicyConstants.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/ws/policy/PolicyConstants.java?view=diff&rev=515527&r1=515526&r2=515527
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/ws/policy/PolicyConstants.java (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/ws/policy/PolicyConstants.java Wed Mar  7 02:50:24 2007
@@ -76,6 +76,8 @@
     
     private static final String OPTIONAL_ATTR_NAME = "Optional"; 
     
+    private static final String POLICYURIS_ATTR_NAME = "PolicyURIs";
+    
     private static QName policyElemQName;
     
     private static QName allElemQName;
@@ -90,6 +92,8 @@
     
     private static QName optionalAttrQName;
     
+    private static QName policyURIsAttrQName;
+    
     private static final String WSU_NAMESPACE_URI = 
         "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
     
@@ -147,6 +151,10 @@
         return OPTIONAL_ATTR_NAME;
     }
     
+    public static String getPolicyURIsAttrName() {
+        return POLICYURIS_ATTR_NAME;
+    }
+    
     public static String getIdAttrName() {
         return WSU_ID_ATTR_NAME;
     }
@@ -179,6 +187,10 @@
         return optionalAttrQName;
     }
     
+    public static QName getPolicyURIsAttrQName() {
+        return policyURIsAttrQName;
+    }
+    
     public static QName getIdAttrQName() {
         return WSU_ID_ATTR_QNAME;
     } 
@@ -196,6 +208,7 @@
         policyAttachmentElemQName = new QName(namespaceURI, POLICYATTACHMENT_ELEM_NAME);
         appliesToElemQName = new QName(namespaceURI, APPLIESTO_ELEM_NAME);
         optionalAttrQName = new QName(namespaceURI, OPTIONAL_ATTR_NAME);
+        policyURIsAttrQName = new QName(namespaceURI, POLICYURIS_ATTR_NAME);
         
     }
 }

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java?view=diff&rev=515527&r1=515526&r2=515527
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java Wed Mar  7 02:50:24 2007
@@ -60,6 +60,7 @@
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.service.model.AbstractMessageContainer;
 import org.apache.cxf.service.model.AbstractPropertiesHolder;
+import org.apache.cxf.service.model.BindingFaultInfo;
 import org.apache.cxf.service.model.BindingInfo;
 import org.apache.cxf.service.model.BindingMessageInfo;
 import org.apache.cxf.service.model.BindingOperationInfo;
@@ -115,12 +116,22 @@
         }
     }
 
+    private void copyExtensionAttributes(AbstractPropertiesHolder info,
+        javax.wsdl.extensions.AttributeExtensible ae) {
+        Map<QName, Object> attrs = CastUtils.cast(ae.getExtensionAttributes());
+        if (!attrs.isEmpty()) {
+            info.setExtensionAttributes(attrs);
+        }
+    }
+
+
     public List<ServiceInfo> buildService(Definition d) {
         DescriptionInfo description = new DescriptionInfo();
         description.setProperty(WSDL_DEFINITION, d);
         description.setName(d.getQName());
         description.setBaseURI(d.getDocumentBaseURI());
         copyExtensors(description, d.getExtensibilityElements());
+        copyExtensionAttributes(description, d);
 
         List<ServiceInfo> serviceList = new ArrayList<ServiceInfo>();
         for (java.util.Iterator<QName> ite =
@@ -152,6 +163,7 @@
             description.setName(def.getQName());
             description.setBaseURI(def.getDocumentBaseURI());
             copyExtensors(description, def.getExtensibilityElements());
+            copyExtensionAttributes(description, def);
         }
         ServiceInfo service = new ServiceInfo();
         service.setDescription(description);
@@ -165,6 +177,7 @@
         service.setTargetNamespace(def.getTargetNamespace());
         service.setName(serv.getQName());
         copyExtensors(service, serv.getExtensibilityElements());
+        copyExtensionAttributes(service, serv);
 
         PortType portType = null;
         for (Port port : cast(serv.getPorts().values(), Port.class)) {
@@ -343,6 +356,7 @@
         ei.setName(new QName(service.getName().getNamespaceURI(), port.getName()));
         ei.setBinding(bi);
         copyExtensors(ei, port.getExtensibilityElements());
+        copyExtensionAttributes(ei, port);
 
         service.addEndpoint(ei);
         DescriptionInfo d = service.getDescription();
@@ -365,6 +379,7 @@
             bi = new BindingInfo(service, ns.toString());
             bi.setName(binding.getQName());
             copyExtensors(bi, binding.getExtensibilityElements());
+            copyExtensionAttributes(bi, binding);
 
             for (BindingOperation bop : cast(binding.getBindingOperations(), BindingOperation.class)) {
                 LOG.fine("binding operation name is " + bop.getName());
@@ -381,18 +396,23 @@
                 if (bop2 != null) {
 
                     copyExtensors(bop2, bop.getExtensibilityElements());
+                    copyExtensionAttributes(bop2, bop);
                     bi.addOperation(bop2);
                     if (bop.getBindingInput() != null) {
                         copyExtensors(bop2.getInput(), bop.getBindingInput().getExtensibilityElements());
+                        copyExtensionAttributes(bop2.getInput(), bop.getBindingInput());
                         handleHeader(bop2.getInput());
                     }
                     if (bop.getBindingOutput() != null) {
                         copyExtensors(bop2.getOutput(), bop.getBindingOutput().getExtensibilityElements());
+                        copyExtensionAttributes(bop2.getOutput(), bop.getBindingOutput());
                         handleHeader(bop2.getOutput());
                     }
                     for (BindingFault f : cast(bop.getBindingFaults().values(), BindingFault.class)) {
-                        copyExtensors(bop2.getFault(new QName(service.getTargetNamespace(), f.getName())),
-                                      bop.getBindingFault(f.getName()).getExtensibilityElements());
+                        BindingFaultInfo bif =
+                            bop2.getFault(new QName(service.getTargetNamespace(), f.getName()));
+                        copyExtensors(bif, bop.getBindingFault(f.getName()).getExtensibilityElements());
+                        copyExtensionAttributes(bif, bop.getBindingFault(f.getName()));
                     }
                 }
 
@@ -432,6 +452,7 @@
             d.getDescribed().add(inf);
         }
         this.copyExtensors(inf, p.getExtensibilityElements());
+        this.copyExtensionAttributes(inf, p);
         inf.setProperty(WSDL_PORTTYPE, p);
         for (Operation op : cast(p.getOperations(), Operation.class)) {
             buildInterfaceOperation(inf, op);
@@ -445,6 +466,7 @@
         List<String> porderList = CastUtils.cast((List)op.getParameterOrdering());
         opInfo.setParameterOrdering(porderList);
         this.copyExtensors(opInfo, op.getExtensibilityElements());
+        this.copyExtensionAttributes(opInfo, op);
         Input input = op.getInput();
         List paramOrder = op.getParameterOrdering();
         if (input != null) {
@@ -452,6 +474,7 @@
             opInfo.setInput(input.getName(), minfo);
             buildMessage(minfo, input.getMessage(), paramOrder);
             copyExtensors(minfo, input.getExtensibilityElements());
+            copyExtensionAttributes(minfo, input);
         }
         Output output = op.getOutput();
         if (output != null) {
@@ -459,6 +482,7 @@
             opInfo.setOutput(output.getName(), minfo);
             buildMessage(minfo, output.getMessage(), paramOrder);
             copyExtensors(minfo, output.getExtensibilityElements());
+            copyExtensionAttributes(minfo, output);
         }
         Map<?, ?> m = op.getFaults();
         for (Map.Entry<?, ?> rawentry : m.entrySet()) {
@@ -466,6 +490,8 @@
             FaultInfo finfo = opInfo.addFault(new QName(inf.getName().getNamespaceURI(), entry.getKey()),
                                               entry.getValue().getMessage().getQName());
             buildMessage(finfo, entry.getValue().getMessage(), paramOrder);
+            copyExtensors(finfo, entry.getValue().getExtensibilityElements());
+            copyExtensionAttributes(finfo, entry.getValue());
         }
         checkForWrapped(opInfo);
     }

Modified: incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/wsdl11/WSDLServiceBuilderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/wsdl11/WSDLServiceBuilderTest.java?view=diff&rev=515527&r1=515526&r2=515527
==============================================================================
--- incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/wsdl11/WSDLServiceBuilderTest.java (original)
+++ incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/wsdl11/WSDLServiceBuilderTest.java Wed Mar  7 02:50:24 2007
@@ -30,6 +30,7 @@
 
 import javax.wsdl.Definition;
 import javax.wsdl.Service;
+import javax.wsdl.extensions.UnknownExtensibilityElement;
 import javax.wsdl.factory.WSDLFactory;
 import javax.wsdl.xml.WSDLReader;
 import javax.xml.namespace.QName;
@@ -51,6 +52,9 @@
 import org.apache.cxf.service.model.BindingMessageInfo;
 import org.apache.cxf.service.model.BindingOperationInfo;
 import org.apache.cxf.service.model.EndpointInfo;
+import org.apache.cxf.service.model.FaultInfo;
+import org.apache.cxf.service.model.InterfaceInfo;
+import org.apache.cxf.service.model.MessageInfo;
 import org.apache.cxf.service.model.MessagePartInfo;
 import org.apache.cxf.service.model.OperationInfo;
 import org.apache.cxf.service.model.SchemaInfo;
@@ -66,12 +70,14 @@
 public class WSDLServiceBuilderTest extends TestCase {
     // TODO: reuse the wsdl in testutils and add the parameter order into one of the wsdl
     private static final Logger LOG = Logger.getLogger(WSDLServiceBuilderTest.class.getName());
-
     private static final String WSDL_PATH = "hello_world.wsdl";
-
     private static final String BARE_WSDL_PATH = "hello_world_bare.wsdl";
-
     private static final String IMPORT_WSDL_PATH = "hello_world_schema_import.wsdl";
+    
+    private static final String EXTENSION_NAMESPACE = "http://cxf.apache.org/extension/ns";
+    private static final QName EXTENSION_ATTR_BOOLEAN = new QName(EXTENSION_NAMESPACE, "booleanAttr");
+    private static final QName EXTENSION_ATTR_STRING = new QName(EXTENSION_NAMESPACE, "stringAttr");
+    private static final QName EXTENSION_ELEM = new QName(EXTENSION_NAMESPACE, "stringElem");
 
     private Definition def;
 
@@ -121,7 +127,8 @@
         destinationFactoryManager = control.createMock(DestinationFactoryManager.class);
         wsdlServiceBuilder = new WSDLServiceBuilder(bus);
 
-        EasyMock.expect(bus.getExtension(BindingFactoryManager.class)).andReturn(bindingFactoryManager);
+        EasyMock.expect(bus.getExtension(BindingFactoryManager.class))
+            .andReturn(bindingFactoryManager).anyTimes();
         EasyMock.expect(bus.getExtension(DestinationFactoryManager.class)).andReturn(
                 destinationFactoryManager);
 
@@ -475,4 +482,202 @@
         assertEquals("header_info", parts.get(0).getName().getLocalPart());
         assertEquals("the_request", parts.get(1).getName().getLocalPart());
     }
+
+    public void testExtensions() throws Exception {
+        setUpWSDL("hello_world_ext.wsdl", 0);
+
+        String ns = "http://apache.org/hello_world_soap_http";
+        QName pingMeOpName = new QName(ns, "pingMe");
+        QName greetMeOpName = new QName(ns, "greetMe");
+        QName faultName = new QName(ns, "pingMeFault");
+
+        // portType extensions
+
+        InterfaceInfo ii = serviceInfo.getInterface();
+        assertEquals(2, ii.getExtensionAttributes().size());
+        assertNotNull(ii.getExtensionAttribute(EXTENSION_ATTR_BOOLEAN));
+        assertNotNull(ii.getExtensionAttribute(EXTENSION_ATTR_STRING));
+        assertEquals(1, ii.getExtensors(UnknownExtensibilityElement.class).size());
+        assertEquals(EXTENSION_ELEM, ii.getExtensor(UnknownExtensibilityElement.class).getElementType());
+
+        // portType/operation extensions
+  
+        OperationInfo oi = ii.getOperation(pingMeOpName);
+        assertPortTypeOperationExtensions(oi, true);
+        assertPortTypeOperationExtensions(ii.getOperation(greetMeOpName), false);
+                
+        // portType/operation/[input|output|fault] extensions
+  
+        assertPortTypeOperationMessageExtensions(oi, true, true, faultName);
+        assertPortTypeOperationMessageExtensions(ii.getOperation(greetMeOpName), false, true, null);
+
+        // service extensions
+
+        assertEquals(1, serviceInfo.getExtensionAttributes().size());
+        assertNotNull(serviceInfo.getExtensionAttribute(EXTENSION_ATTR_STRING));
+        assertEquals(1, serviceInfo.getExtensors(UnknownExtensibilityElement.class).size());
+        assertEquals(EXTENSION_ELEM,
+            serviceInfo.getExtensor(UnknownExtensibilityElement.class).getElementType());
+       
+        // service/port extensions
+
+        EndpointInfo ei = serviceInfo.getEndpoints().iterator().next();
+        assertEquals(1, ei.getExtensionAttributes().size());
+        assertNotNull(ei.getExtensionAttribute(EXTENSION_ATTR_STRING));
+        assertEquals(1, ei.getExtensors(UnknownExtensibilityElement.class).size());
+        assertEquals(EXTENSION_ELEM, ei.getExtensor(UnknownExtensibilityElement.class).getElementType());
+
+        // binding extensions
+
+        BindingInfo bi = ei.getBinding();
+        // REVISIT: bug in wsdl4j?
+        // getExtensionAttributes on binding element returns an empty map
+        // assertEquals(1, bi.getExtensionAttributes().size());
+        // assertNotNull(bi.getExtensionAttribute(EXTENSION_ATTR_STRING));
+        assertEquals(1, bi.getExtensors(UnknownExtensibilityElement.class).size());
+        assertEquals(EXTENSION_ELEM, bi.getExtensor(UnknownExtensibilityElement.class).getElementType());
+
+        // binding/operation extensions
+       
+        BindingOperationInfo boi = bi.getOperation(pingMeOpName);
+        assertBindingOperationExtensions(boi, true);
+        assertBindingOperationExtensions(bi.getOperation(greetMeOpName), false);
+
+        // binding/operation/[input|output|fault] extensions
+  
+        assertBindingOperationMessageExtensions(boi, true, true, faultName);
+        assertBindingOperationMessageExtensions(bi.getOperation(greetMeOpName), false, true, null);
+    }
+
+    private void assertPortTypeOperationExtensions(OperationInfo oi, boolean expectExtensions) {
+        if (expectExtensions) {
+            assertEquals(1, oi.getExtensionAttributes().size());
+            assertNotNull(oi.getExtensionAttribute(EXTENSION_ATTR_STRING));
+            assertEquals(1, oi.getExtensors(UnknownExtensibilityElement.class).size());
+            assertEquals(EXTENSION_ELEM, oi.getExtensor(UnknownExtensibilityElement.class).getElementType());
+        } else {
+            assertNull(oi.getExtensionAttributes());
+            assertNull(oi.getExtensionAttribute(EXTENSION_ATTR_STRING));
+            assertNull(oi.getExtensors(UnknownExtensibilityElement.class));
+            assertNull(oi.getExtensor(UnknownExtensibilityElement.class));
+        }
+    }
+
+    private void assertBindingOperationExtensions(BindingOperationInfo boi, boolean expectExtensions) {
+        if (expectExtensions) {
+            assertEquals(1, boi.getExtensionAttributes().size());
+            assertNotNull(boi.getExtensionAttribute(EXTENSION_ATTR_STRING));
+            assertEquals(1, boi.getExtensors(UnknownExtensibilityElement.class).size());
+            assertEquals(EXTENSION_ELEM, boi.getExtensor(UnknownExtensibilityElement.class).getElementType());
+        } else {
+            assertNull(boi.getExtensionAttributes());
+            assertNull(boi.getExtensionAttribute(EXTENSION_ATTR_STRING));
+            assertEquals(0, boi.getExtensors(UnknownExtensibilityElement.class).size());
+            assertNull(boi.getExtensor(UnknownExtensibilityElement.class));
+        }
+    }
+
+    private void assertPortTypeOperationMessageExtensions(OperationInfo oi, boolean expectExtensions,
+        boolean hasOutput, QName fault) {
+
+        MessageInfo mi = oi.getInput();
+        if (expectExtensions) {
+            assertEquals(1, mi.getExtensionAttributes().size());
+            assertNotNull(mi.getExtensionAttribute(EXTENSION_ATTR_STRING));
+            assertEquals(1, mi.getExtensors(UnknownExtensibilityElement.class).size());
+            assertEquals(EXTENSION_ELEM, mi.getExtensor(UnknownExtensibilityElement.class).getElementType());
+        } else {
+            assertNull(mi.getExtensionAttributes());
+            assertNull(mi.getExtensionAttribute(EXTENSION_ATTR_STRING));
+            assertNull(mi.getExtensors(UnknownExtensibilityElement.class));
+            assertNull(mi.getExtensor(UnknownExtensibilityElement.class));
+        }
+       
+        if (hasOutput) {         
+            mi = oi.getOutput();
+            if (expectExtensions) {
+                assertEquals(1, mi.getExtensionAttributes().size());
+                assertNotNull(mi.getExtensionAttribute(EXTENSION_ATTR_STRING));
+                assertEquals(1, mi.getExtensors(UnknownExtensibilityElement.class).size());
+                assertEquals(EXTENSION_ELEM,
+                    mi.getExtensor(UnknownExtensibilityElement.class).getElementType());
+            } else {
+                assertNull(mi.getExtensionAttributes());
+                assertNull(mi.getExtensionAttribute(EXTENSION_ATTR_STRING));
+                assertNull(mi.getExtensors(UnknownExtensibilityElement.class));
+                assertNull(mi.getExtensor(UnknownExtensibilityElement.class));
+            }
+        }
+        
+        if (null != fault) { 
+            FaultInfo fi = oi.getFault(fault);
+            if (expectExtensions) {
+                assertEquals(1, fi.getExtensionAttributes().size());
+                assertNotNull(fi.getExtensionAttribute(EXTENSION_ATTR_STRING));
+                assertEquals(1, fi.getExtensors(UnknownExtensibilityElement.class).size());
+                assertEquals(EXTENSION_ELEM,
+                    fi.getExtensor(UnknownExtensibilityElement.class).getElementType());
+            } else {
+                assertNull(fi.getExtensionAttributes());
+                assertNull(fi.getExtensionAttribute(EXTENSION_ATTR_STRING));
+                assertNull(fi.getExtensors(UnknownExtensibilityElement.class));
+                assertNull(fi.getExtensor(UnknownExtensibilityElement.class));
+            }
+        } 
+    }
+
+    private void assertBindingOperationMessageExtensions(BindingOperationInfo boi, boolean expectExtensions,
+        boolean hasOutput, QName fault) {
+
+        BindingMessageInfo bmi = boi.getInput();
+        if (expectExtensions) {
+            // REVISIT: bug in wsdl4j?
+            // getExtensionAttributes on binding/operation/input element returns an empty map
+            // assertEquals(1, bmi.getExtensionAttributes().size());
+            // assertNotNull(bmi.getExtensionAttribute(EXTENSION_ATTR_STRING));
+            assertEquals(1, bmi.getExtensors(UnknownExtensibilityElement.class).size());
+            assertEquals(EXTENSION_ELEM, bmi.getExtensor(UnknownExtensibilityElement.class).getElementType());
+        } else {
+            assertNull(bmi.getExtensionAttributes());
+            assertNull(bmi.getExtensionAttribute(EXTENSION_ATTR_STRING));
+            assertEquals(0, bmi.getExtensors(UnknownExtensibilityElement.class).size());
+            assertNull(bmi.getExtensor(UnknownExtensibilityElement.class));
+        }
+       
+        if (hasOutput) {         
+            bmi = boi.getOutput();
+            if (expectExtensions) {
+                // REVISIT: bug in wsdl4j?
+                // getExtensionAttributes on binding/operation/output element returns an empty map
+                // assertEquals(1, bmi.getExtensionAttributes().size());
+                // assertNotNull(bmi.getExtensionAttribute(EXTENSION_ATTR_STRING));
+                assertEquals(1, bmi.getExtensors(UnknownExtensibilityElement.class).size());
+                assertEquals(EXTENSION_ELEM,
+                    bmi.getExtensor(UnknownExtensibilityElement.class).getElementType());
+            } else {
+                assertNull(bmi.getExtensionAttributes());
+                assertNull(bmi.getExtensionAttribute(EXTENSION_ATTR_STRING));
+                assertEquals(0, bmi.getExtensors(UnknownExtensibilityElement.class).size());
+                assertNull(bmi.getExtensor(UnknownExtensibilityElement.class));
+            }
+        }
+        
+        if (null != fault) { 
+            BindingFaultInfo bfi = boi.getFault(fault);
+            if (expectExtensions) {
+                assertEquals(1, bfi.getExtensionAttributes().size());
+                assertNotNull(bfi.getExtensionAttribute(EXTENSION_ATTR_STRING));
+                assertEquals(1, bfi.getExtensors(UnknownExtensibilityElement.class).size());
+                assertEquals(EXTENSION_ELEM,
+                    bfi.getExtensor(UnknownExtensibilityElement.class).getElementType());
+            } else {
+                assertNull(bfi.getExtensionAttributes());
+                assertNull(bfi.getExtensionAttribute(EXTENSION_ATTR_STRING));
+                assertNull(bfi.getExtensors(UnknownExtensibilityElement.class));
+                assertNull(bfi.getExtensor(UnknownExtensibilityElement.class));
+            }
+        } 
+    }
+
+
 }

Added: incubator/cxf/trunk/rt/core/src/test/resources/org/apache/cxf/wsdl11/hello_world_ext.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/test/resources/org/apache/cxf/wsdl11/hello_world_ext.wsdl?view=auto&rev=515527
==============================================================================
--- incubator/cxf/trunk/rt/core/src/test/resources/org/apache/cxf/wsdl11/hello_world_ext.wsdl (added)
+++ incubator/cxf/trunk/rt/core/src/test/resources/org/apache/cxf/wsdl11/hello_world_ext.wsdl Wed Mar  7 02:50:24 2007
@@ -0,0 +1,200 @@
+<?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.
+-->
+<wsdl:definitions name="HelloWorld" targetNamespace="http://apache.org/hello_world_soap_http" 
+    xmlns="http://schemas.xmlsoap.org/wsdl/" 
+    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
+    xmlns:tns="http://apache.org/hello_world_soap_http"
+    xmlns:x1="http://apache.org/hello_world_soap_http/types"
+    xmlns:ns="http://cxf.apache.org/extension/ns"
+    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+    <wsdl:types>
+        <schema targetNamespace="http://apache.org/hello_world_soap_http/types" 
+            xmlns="http://www.w3.org/2001/XMLSchema"
+	    xmlns:tns="http://apache.org/hello_world_soap_http/types"
+            elementFormDefault="qualified">/
+	    <simpleType name="MyStringType">
+		<restriction base="string">
+		    <maxLength value="30" />
+		</restriction>
+	    </simpleType>
+
+            <element name="sayHi">
+                <complexType/>
+            </element>
+            <element name="sayHiResponse">
+                <complexType>
+                    <sequence>
+                        <element name="responseType" type="string"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="greetMe">
+                <complexType>
+                    <sequence>
+                        <element name="requestType" type="tns:MyStringType"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="greetMeResponse">
+                <complexType>
+                    <sequence>
+                        <element name="responseType" type="string"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="greetMeOneWay">
+                <complexType>
+                    <sequence>
+                        <element name="requestType" type="string"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="pingMe">
+                <complexType/>
+            </element>
+            <element name="pingMeResponse">
+                <complexType/>
+            </element>
+            <element name="faultDetail">
+                <complexType>
+                    <sequence>
+                        <element name="minor" type="short"/>
+                        <element name="major" type="short"/>
+                    </sequence>
+                </complexType>
+            </element>
+        </schema>
+    </wsdl:types>
+    <wsdl:message name="sayHiRequest">
+        <wsdl:part element="x1:sayHi" name="in"/>
+    </wsdl:message>
+    <wsdl:message name="sayHiResponse">
+        <wsdl:part element="x1:sayHiResponse" name="out"/>
+    </wsdl:message>
+    <wsdl:message name="greetMeRequest">
+        <wsdl:part element="x1:greetMe" name="in"/>
+    </wsdl:message>
+    <wsdl:message name="greetMeResponse">
+        <wsdl:part element="x1:greetMeResponse" name="out"/>
+    </wsdl:message>
+    <wsdl:message name="greetMeOneWayRequest">
+        <wsdl:part element="x1:greetMeOneWay" name="in"/>
+    </wsdl:message>
+    <wsdl:message name="pingMeRequest">
+        <wsdl:part name="in" element="x1:pingMe"/>
+    </wsdl:message>
+    <wsdl:message name="pingMeResponse">
+        <wsdl:part name="out" element="x1:pingMeResponse"/>
+    </wsdl:message>		
+    <wsdl:message name="pingMeFault">
+        <wsdl:part name="faultDetail" element="x1:faultDetail"/>
+    </wsdl:message>
+
+    <wsdl:portType name="Greeter" ns:booleanAttr="true" ns:stringAttr="portType:Greeter">
+        <ns:stringElem>portType:Greeter</ns:stringElem>
+        <wsdl:operation name="sayHi">
+            <wsdl:input message="tns:sayHiRequest" name="sayHiRequest"/>
+            <wsdl:output message="tns:sayHiResponse" name="sayHiResponse"/>
+        </wsdl:operation>
+        
+        <wsdl:operation name="greetMe">
+            <wsdl:input message="tns:greetMeRequest" name="greetMeRequest"/>
+            <wsdl:output message="tns:greetMeResponse" name="greetMeResponse"/>
+        </wsdl:operation>
+        
+        <wsdl:operation name="greetMeOneWay">
+            <wsdl:input message="tns:greetMeOneWayRequest" name="greetMeOneWayRequest"/>
+        </wsdl:operation>
+
+        <wsdl:operation name="pingMe" ns:stringAttr="portType/operation:pingMe">
+            <ns:stringElem>portType/operation:pingMe</ns:stringElem>
+            <wsdl:input name="pingMeRequest" message="tns:pingMeRequest" ns:stringAttr="portType/operation/input:pingMeRequest">
+                <ns:stringElem>portType/operation/input:pingMeRequest</ns:stringElem>
+            </wsdl:input>
+            <wsdl:output name="pingMeResponse" message="tns:pingMeResponse" ns:stringAttr="portType/operation/input:pingMeResonse">
+                <ns:stringElem>portType/operation/output:pingMeResponse</ns:stringElem>
+            </wsdl:output>
+            <wsdl:fault name="pingMeFault" message="tns:pingMeFault" ns:stringAttr="portType/operation/fault:pingMeFault">
+                <ns:stringElem>portType/operation/fault:pingMeFault</ns:stringElem>
+            </wsdl:fault>
+        </wsdl:operation> 
+    </wsdl:portType>
+
+    <wsdl:binding name="Greeter_SOAPBinding" type="tns:Greeter" ns:stringAttr="binding:Greeter_SOAPBinding">
+        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+        <ns:stringElem>binding:Greeter_SOAPBinding</ns:stringElem>
+        
+        <wsdl:operation name="sayHi">
+            <soap:operation soapAction="" style="document"/>
+            <wsdl:input name="sayHiRequest">
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output name="sayHiResponse">
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        
+        <wsdl:operation name="greetMe">
+            <soap:operation soapAction="" style="document"/>
+            <wsdl:input name="greetMeRequest">
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output name="greetMeResponse">
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        
+        <wsdl:operation name="greetMeOneWay">
+            <soap:operation soapAction="" style="document"/>
+            <wsdl:input name="greetMeOneWayRequest">
+                <soap:body use="literal"/>
+            </wsdl:input>
+        </wsdl:operation>
+
+        <wsdl:operation name="pingMe" ns:stringAttr="binding/operation:pingMe">
+            <ns:stringElem>binding/operation:pingMe</ns:stringElem>
+            <soap:operation style="document"/>
+            <wsdl:input ns:stringAttr="binding/operation/input:pingMeRequest">
+                <soap:body use="literal"/>
+                <ns:stringElem>binding/operation/input:pingMeRequest</ns:stringElem>
+            </wsdl:input>
+            <wsdl:output ns:stringAttr="binding/operation/output:pingMeResponse">
+                <ns:stringElem>binding/operation/output:pingMeResponse</ns:stringElem>
+                <soap:body use="literal"/>
+            </wsdl:output>
+            <wsdl:fault name="pingMeFault" ns:stringAttr="binding/operation/fault:pingMeFault">
+                <ns:stringElem>binding/operation/fault:pingMeFault</ns:stringElem>
+                <soap:fault name="pingMeFault" use="literal"/>
+            </wsdl:fault>
+        </wsdl:operation>
+        
+    </wsdl:binding>
+
+    <wsdl:service name="SOAPService" ns:stringAttr="service:SOAPService">
+        <wsdl:port binding="tns:Greeter_SOAPBinding" name="SoapPort" ns:stringAttr="service/port:SoapPort">
+            <ns:stringElem>service/port:SoapPort</ns:stringElem>
+            <soap:address location="http://localhost:9000/SoapContext/SoapPort"/>
+        </wsdl:port>
+        <ns:stringElem>service:SOAPService</ns:stringElem>
+    </wsdl:service>
+
+</wsdl:definitions>
+

Propchange: incubator/cxf/trunk/rt/core/src/test/resources/org/apache/cxf/wsdl11/hello_world_ext.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/core/src/test/resources/org/apache/cxf/wsdl11/hello_world_ext.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/rt/core/src/test/resources/org/apache/cxf/wsdl11/hello_world_ext.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: incubator/cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/wsdl11/Wsdl11AttachmentPolicyProvider.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/wsdl11/Wsdl11AttachmentPolicyProvider.java?view=diff&rev=515527&r1=515526&r2=515527
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/wsdl11/Wsdl11AttachmentPolicyProvider.java (original)
+++ incubator/cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/wsdl11/Wsdl11AttachmentPolicyProvider.java Wed Mar  7 02:50:24 2007
@@ -21,6 +21,8 @@
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;
 
 import javax.wsdl.Definition;
 import javax.wsdl.extensions.ExtensibilityElement;
@@ -81,7 +83,7 @@
     public Policy getEffectivePolicy(EndpointInfo ei) {
         Policy p = getElementPolicy(ei);
         p = p.merge(getElementPolicy(ei.getBinding()));
-        p = p.merge(getElementPolicy(ei.getInterface()));
+        p = p.merge(getElementPolicy(ei.getInterface(), true));
         
         return p;
     }
@@ -97,8 +99,8 @@
      */
     public Policy getEffectivePolicy(BindingOperationInfo bi) {
         DescriptionInfo di = bi.getBinding().getDescription();
-        Policy p = getElementPolicy(bi, di);
-        p = p.merge(getElementPolicy(bi.getOperationInfo(), di));
+        Policy p = getElementPolicy(bi, false, di);
+        p = p.merge(getElementPolicy(bi.getOperationInfo(), false, di));
         return p;
     }
     
@@ -119,11 +121,11 @@
         ServiceInfo si = bmi.getBindingOperation().getBinding().getService();
         DescriptionInfo di = si.getDescription();
 
-        Policy p = getElementPolicy(bmi, di);
+        Policy p = getElementPolicy(bmi, false, di);
         MessageInfo mi = bmi.getMessageInfo();
-        p = p.merge(getElementPolicy(mi, di));
+        p = p.merge(getElementPolicy(mi, true, di));
         Extensible ex = getMessageTypeInfo(mi.getName(), di);
-        p = p.merge(getElementPolicy(ex, di));
+        p = p.merge(getElementPolicy(ex, false, di));
 
         return p;
     }
@@ -134,20 +136,24 @@
         ServiceInfo si = bfi.getBindingOperation().getBinding().getService();
         DescriptionInfo di = si.getDescription();
 
-        Policy p = getElementPolicy(bfi, di);
+        Policy p = getElementPolicy(bfi, false, di);
         FaultInfo fi = bfi.getFaultInfo();
-        p = p.merge(getElementPolicy(fi, di));
+        p = p.merge(getElementPolicy(fi, true, di));
         Extensible ex = getMessageTypeInfo(fi.getName(), di);
-        p = p.merge(getElementPolicy(ex, di));
+        p = p.merge(getElementPolicy(ex, false, di));
 
         return p;
     }
     
     Policy getElementPolicy(AbstractDescriptionElement adh) {
-        return getElementPolicy(adh, adh.getDescription());
+        return getElementPolicy(adh, false);
     }
-
-    Policy getElementPolicy(Extensible ex, DescriptionInfo di) {
+    
+    Policy getElementPolicy(AbstractDescriptionElement adh, boolean includeAttributes) {
+        return getElementPolicy(adh, includeAttributes, adh.getDescription());
+    }
+  
+    Policy getElementPolicy(Extensible ex, boolean includeAttributes, DescriptionInfo di) {
         
         Policy elementPolicy = new Policy();
         
@@ -157,23 +163,45 @@
         
         List<UnknownExtensibilityElement> extensions = 
             ex.getExtensors(UnknownExtensibilityElement.class);
-        if (null == extensions) {
-            return elementPolicy;
+        if (null != extensions) {
+
+            for (UnknownExtensibilityElement e : extensions) {
+                Policy p = null;
+                if (PolicyConstants.getPolicyElemQName().equals(e.getElementType())) {
+                    p = builder.getPolicy(e.getElement());
+
+                } else if (PolicyConstants.getPolicyReferenceElemQName().equals(e.getElementType())) {
+                    PolicyReference ref = builder.getPolicyReference(e.getElement());
+                    if (null != ref) {
+                        p = resolveReference(ref, di);
+                    }
+                }
+                if (null != p) {
+                    elementPolicy = elementPolicy.merge(p);
+                }
+            }
         }
         
-        for (UnknownExtensibilityElement e : extensions) {
-            Policy p = null;
-            if (PolicyConstants.getPolicyElemQName().equals(e.getElementType())) {
-                p = builder.getPolicy(e.getElement());
-
-            } else if (PolicyConstants.getPolicyReferenceElemQName().equals(e.getElementType())) {
-                PolicyReference ref = builder.getPolicyReference(e.getElement());
-                if (null != ref) {
-                    p = resolveReference(ref, di);
-                }
+        if (includeAttributes) {
+            Object attr = ex.getExtensionAttribute(PolicyConstants.getPolicyURIsAttrQName());
+            // can be of type a String, a QName, a list of Srings or a list of QNames
+            String uris = null;
+            if (attr instanceof QName) {
+                uris = ((QName)attr).getLocalPart();
+            } else if (attr instanceof String) {
+                uris = (String)attr;
             }
-            if (null != p) {
-                elementPolicy = elementPolicy.merge(p);
+            if (null != uris) {
+                StringTokenizer st = new StringTokenizer(uris);
+                while (st.hasMoreTokens()) {
+                    String uri = st.nextToken();
+                    PolicyReference ref = new PolicyReference();
+                    ref.setURI(uri);
+                    Policy p = resolveReference(ref, di);
+                    if (null != p) {
+                        elementPolicy = elementPolicy.merge(p);
+                    }
+                }
             }
         }
 
@@ -252,8 +280,27 @@
             }
             return list;
         }
+
+        public void addExtensionAttribute(QName arg0, Object arg1) {    
+        }
+
+        public void addExtensor(Object arg0) {   
+        }
+
+        public Object getExtensionAttribute(QName arg0) {
+            return null;
+        }
+
+        public Map<QName, Object> getExtensionAttributes() {
+            return null;
+        }
+
+        public void setExtensionAttributes(Map<QName, Object> arg0) {  
+        }
         
-    }
+        
+        
+    } 
    
 
 }

Modified: incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/attachment/wsdl11/Wsdl11AttachmentPolicyProviderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/attachment/wsdl11/Wsdl11AttachmentPolicyProviderTest.java?view=diff&rev=515527&r1=515526&r2=515527
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/attachment/wsdl11/Wsdl11AttachmentPolicyProviderTest.java (original)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/java/org/apache/cxf/ws/policy/attachment/wsdl11/Wsdl11AttachmentPolicyProviderTest.java Wed Mar  7 02:50:24 2007
@@ -103,7 +103,7 @@
         EasyMock.expect(bfm.getBindingFactory(EasyMock.isA(String.class))).andReturn(null).anyTimes();
         control.replay();
         
-        int n = 18;
+        int n = 19;
         services = new ServiceInfo[n];
         endpoints = new EndpointInfo[n];
         for (int i = 0; i < n; i++) {
@@ -271,7 +271,7 @@
         assertTrue(!ep.isEmpty());
         verifyAssertionsOnly(ep, 1);
         p = app.getElementPolicy(endpoints[7].getInterface());
-        assertTrue(PolicyComparator.compare(p, ep));
+        assertTrue(PolicyComparator.compare(p, ep));        
         
         // port has one extension of type Policy
         // porttype has one extension of type Policy
@@ -281,6 +281,15 @@
         assertTrue(!ep.isEmpty());
         verifyAssertionsOnly(ep, 3);
         
+        // port has no extensions
+        // binding has no extensions
+        // porttype has no extension elements but one extension attribute of type PolicyURIs
+        // consisting of two references (one local, one external)
+        
+        ep = app.getEffectivePolicy(endpoints[18]);
+        assertNotNull(ep);
+        assertTrue(!ep.isEmpty());
+        verifyAssertionsOnly(ep, 2);       
     }
     
     public void testEffectiveBindingOperationPolicies() {

Added: incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test18.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test18.wsdl?view=auto&rev=515527
==============================================================================
--- incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test18.wsdl (added)
+++ incubator/cxf/trunk/rt/ws/policy/src/test/resources/attachment/wsdl11/test18.wsdl Wed Mar  7 02:50:24 2007
@@ -0,0 +1,109 @@
+<?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">
+    
+    <wsp:Policy wsu:Id="PolicyA">
+        <ta:A>A</ta:A>
+    </wsp:Policy>
+    
+    <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:PolicyURIs="#PolicyA 
+        test17-ext.wsdl#PolicyC"
+    >
+	<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/test18.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

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

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



Mime
View raw message