cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r681771 - in /cxf/trunk: api/src/main/java/org/apache/cxf/wsdl/ api/src/test/java/org/apache/cxf/wsdl/ rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/ rt/bindings/corba/src/main/resources/META-INF/cxf/ rt/bindings/corba/src/te...
Date Fri, 01 Aug 2008 18:33:16 GMT
Author: dkulp
Date: Fri Aug  1 11:33:15 2008
New Revision: 681771

URL: http://svn.apache.org/viewvc?rev=681771&view=rev
Log:
Updates to be able to support wsdl's that use the older Yoko namespace by mapping them into
the new namespace at read time.

Added:
    cxf/trunk/rt/bindings/corba/src/test/java/org/apache/cxf/binding/corba/types/CorbaHandlerUtilsYokoNSTest.java
  (with props)
    cxf/trunk/rt/bindings/corba/src/test/resources/wsdl_corbabinding/ComplexTypesYoko.wsdl
  (with props)
Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java
    cxf/trunk/api/src/test/java/org/apache/cxf/wsdl/JAXBExtensionHelperTest.java
    cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaBindingFactory.java
    cxf/trunk/rt/bindings/corba/src/main/resources/META-INF/cxf/bus-extensions.xml
    cxf/trunk/rt/bindings/corba/src/main/resources/META-INF/cxf/cxf-extension-corba.xml
    cxf/trunk/rt/bindings/corba/src/test/java/org/apache/cxf/binding/corba/TestUtils.java
    cxf/trunk/rt/bindings/corba/src/test/java/org/apache/cxf/binding/corba/types/CorbaHandlerUtilsTest.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java?rev=681771&r1=681770&r2=681771&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java Fri Aug  1 11:33:15
2008
@@ -40,14 +40,18 @@
 import javax.xml.bind.annotation.XmlElementDecl;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlSchema;
+import javax.xml.namespace.NamespaceContext;
 import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
+import javax.xml.stream.util.StreamReaderDelegate;
 
 import org.w3c.dom.Element;
 
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.PackageUtils;
 import org.apache.cxf.common.util.StringUtils;
+import org.apache.cxf.staxutils.StaxUtils;
 
 
 /**
@@ -60,9 +64,17 @@
 
     JAXBContext context;
     final Class<? extends TExtensibilityElementImpl> typeClass;
+    final String namespace;
+    String jaxbNamespace;
       
-    public JAXBExtensionHelper(Class<? extends TExtensibilityElementImpl> cls) {
+    public JAXBExtensionHelper(Class<? extends TExtensibilityElementImpl> cls,
+                               String ns) {
         typeClass = cls;
+        namespace = ns;
+    }
+    
+    void setJaxbNamespace(String ns) {
+        jaxbNamespace = ns;
     }
     
     public static void addExtensions(ExtensionRegistry registry, String parentType, String
elementType,
@@ -71,14 +83,21 @@
 
         Class<? extends TExtensibilityElementImpl> elementTypeClass = Class.forName(elementType,
true, cl)
             .asSubclass(TExtensibilityElementImpl.class);
-        addExtensions(registry, parentTypeClass, elementTypeClass);
+        addExtensions(registry, parentTypeClass, elementTypeClass, null);
     }
     
     public static void addExtensions(ExtensionRegistry registry,
                                      Class<?> parentType,
-                                     Class<? extends TExtensibilityElementImpl> cls)
throws JAXBException {
+                                     Class<? extends TExtensibilityElementImpl> cls)
+        throws JAXBException {
+        addExtensions(registry, parentType, cls, null);
+    }
+    public static void addExtensions(ExtensionRegistry registry,
+                                     Class<?> parentType,
+                                     Class<? extends TExtensibilityElementImpl> cls,
+                                     String namespace) throws JAXBException {
         
-        JAXBExtensionHelper helper = new JAXBExtensionHelper(cls);
+        JAXBExtensionHelper helper = new JAXBExtensionHelper(cls, namespace);
         boolean found = false;
         try {
             Class<?> objectFactory = Class.forName(PackageUtils.getPackageName(cls)
+ ".ObjectFactory",
@@ -90,7 +109,12 @@
                     
                     XmlElementDecl elementDecl = method.getAnnotation(XmlElementDecl.class);
                     if (null != elementDecl) {
-                        QName elementType = new QName(elementDecl.namespace(), elementDecl.name());
+                        String name = elementDecl.name();
+                        String ns = namespace != null ? namespace : elementDecl.namespace();
+                        if (namespace != null) {
+                            helper.setJaxbNamespace(elementDecl.namespace());
+                        }
+                        QName elementType = new QName(ns, name);
                         registry.registerDeserializer(parentType, elementType, helper); 
                         registry.registerSerializer(parentType, elementType, helper);   
                     
                         registry.mapExtensionTypes(parentType, elementType, cls);
@@ -119,6 +143,10 @@
                     }
                 }
                 if (!StringUtils.isEmpty(ns) && !StringUtils.isEmpty(name)) {
+                    if (namespace != null) {
+                        helper.setJaxbNamespace(ns);
+                        ns = namespace;
+                    }
                     QName elementType = new QName(ns, name);
                     registry.registerDeserializer(parentType, elementType, helper); 
                     registry.registerSerializer(parentType, elementType, helper);       
                 
@@ -229,7 +257,14 @@
         try {
             Unmarshaller u = getJAXBContext().createUnmarshaller();
         
-            Object o = u.unmarshal(element);
+            Object o = null;
+            if (namespace == null) {
+                o = u.unmarshal(element);
+            } else {
+                XMLStreamReader reader = StaxUtils.createXMLStreamReader(element);
+                reader = new MappingReaderDelegate(reader);
+                o = u.unmarshal(reader);
+            }
             if (o instanceof JAXBElement<?>) {
                 JAXBElement<?> el = (JAXBElement<?>)o;
                 o = el.getValue();
@@ -250,7 +285,76 @@
     
 
 
-    
+    class MappingReaderDelegate extends StreamReaderDelegate {
+        MappingReaderDelegate(XMLStreamReader reader) {
+            super(reader);
+        }
+        
+        @Override
+        public NamespaceContext getNamespaceContext() {
+            final NamespaceContext ctx = super.getNamespaceContext();
+            return new NamespaceContext() {
+                public String getNamespaceURI(String prefix) {
+                    String ns = ctx.getNamespaceURI(prefix);
+                    if (namespace.equals(ns)) {
+                        ns = jaxbNamespace;
+                    }                        
+                    return ns;
+                }
+
+                public String getPrefix(String namespaceURI) {
+                    if (jaxbNamespace.equals(namespaceURI)) {
+                        return ctx.getPrefix(namespace);
+                    }
+                    return ctx.getPrefix(namespaceURI);
+                }
+
+                public Iterator getPrefixes(String namespaceURI) {
+                    if (jaxbNamespace.equals(namespaceURI)) {
+                        return ctx.getPrefixes(namespace);
+                    }
+                    return ctx.getPrefixes(namespaceURI);
+                }
+            };
+        }
+
+        @Override
+        public String getNamespaceURI(int index) {
+            String ns = super.getNamespaceURI(index);
+            if (namespace.equals(ns)) {
+                ns = jaxbNamespace;
+            }                        
+            return ns;                     
+        }
+
+        @Override
+        public String getNamespaceURI(String prefix) {
+            String ns = super.getNamespaceURI(prefix);
+            if (namespace.equals(ns)) {
+                ns = jaxbNamespace;
+            }                        
+            return ns;
+        }
+
+        @Override
+        public QName getName() {
+            QName qn = super.getName();
+            if (namespace.equals(qn.getNamespaceURI())) {
+                qn = new QName(jaxbNamespace, qn.getLocalPart());
+            }
+            return qn;
+        }
+
+        @Override
+        public String getNamespaceURI() {
+            String ns = super.getNamespaceURI();
+            if (namespace.equals(ns)) {
+                ns = jaxbNamespace;
+            }                        
+            return ns; 
+        }
+        
+    };
     
 
 }

Modified: cxf/trunk/api/src/test/java/org/apache/cxf/wsdl/JAXBExtensionHelperTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/test/java/org/apache/cxf/wsdl/JAXBExtensionHelperTest.java?rev=681771&r1=681770&r2=681771&view=diff
==============================================================================
--- cxf/trunk/api/src/test/java/org/apache/cxf/wsdl/JAXBExtensionHelperTest.java (original)
+++ cxf/trunk/api/src/test/java/org/apache/cxf/wsdl/JAXBExtensionHelperTest.java Fri Aug 
1 11:33:15 2008
@@ -131,7 +131,7 @@
 
         ByteArrayOutputStream stream = new ByteArrayOutputStream();
 
-        JAXBExtensionHelper helper = new JAXBExtensionHelper(NewServiceType.class);
+        JAXBExtensionHelper helper = new JAXBExtensionHelper(NewServiceType.class, null);
         helper.marshall(javax.wsdl.Definition.class,
                         new QName("http://cxf.apache.org/test/hello_world", "newService"),
                         newService,

Modified: cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaBindingFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaBindingFactory.java?rev=681771&r1=681770&r2=681771&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaBindingFactory.java
(original)
+++ cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaBindingFactory.java
Fri Aug  1 11:33:15 2008
@@ -23,7 +23,9 @@
 import java.util.List;
 import java.util.Set;
 
+import javax.annotation.PostConstruct;
 import javax.annotation.Resource;
+import javax.xml.bind.JAXBException;
 
 import org.apache.cxf.binding.AbstractBindingFactory;
 import org.apache.cxf.binding.Binding;
@@ -41,9 +43,14 @@
 import org.apache.cxf.transport.Destination;
 import org.apache.cxf.transport.DestinationFactory;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
+import org.apache.cxf.wsdl.JAXBExtensionHelper;
+import org.apache.cxf.wsdl.TExtensibilityElementImpl;
+import org.apache.cxf.wsdl.WSDLManager;
 
 public class CorbaBindingFactory extends AbstractBindingFactory
     implements ConduitInitiator, DestinationFactory {
+    
+    private static final String YOKO_NAMESPACE = "http://schemas.apache.org/yoko/bindings/corba";
 
     private List<String> transportIds;
     private OrbConfig orbConfig = new OrbConfig();
@@ -57,6 +64,35 @@
     public void setOrbSingletonClass(String cls) {
         orbConfig.setOrbSingletonClass(cls);
     }
+    
+    @PostConstruct
+    void registerYokoCompatibleExtensors() {
+        WSDLManager manager = this.getBus().getExtension(WSDLManager.class);
+        createCompatExtensor(manager, javax.wsdl.Binding.class,
+                             org.apache.cxf.binding.corba.wsdl.BindingType.class);
+        createCompatExtensor(manager, javax.wsdl.BindingOperation.class,
+                             org.apache.cxf.binding.corba.wsdl.OperationType.class);
+        createCompatExtensor(manager, javax.wsdl.Definition.class,
+                             org.apache.cxf.binding.corba.wsdl.TypeMappingType.class);
+        createCompatExtensor(manager, javax.wsdl.Port.class,
+                             org.apache.cxf.binding.corba.wsdl.AddressType.class);
+        createCompatExtensor(manager, javax.wsdl.Port.class,
+                             org.apache.cxf.binding.corba.wsdl.PolicyType.class);
+    }
+
+    private void createCompatExtensor(WSDLManager manager,
+                                      Class<?> parentType,
+                                      Class<? extends TExtensibilityElementImpl> elementType)
{
+        try {
+            JAXBExtensionHelper.addExtensions(manager.getExtensionRegistry(),
+                                              parentType, 
+                                              elementType,
+                                              YOKO_NAMESPACE);
+        } catch (JAXBException e) {
+            //ignore, just won't support the yoko extensors
+        }
+        
+    }
 
     public Binding createBinding(BindingInfo bindingInfo) {
         CorbaBinding binding = new CorbaBinding();

Modified: cxf/trunk/rt/bindings/corba/src/main/resources/META-INF/cxf/bus-extensions.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/corba/src/main/resources/META-INF/cxf/bus-extensions.xml?rev=681771&r1=681770&r2=681771&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/corba/src/main/resources/META-INF/cxf/bus-extensions.xml (original)
+++ cxf/trunk/rt/bindings/corba/src/main/resources/META-INF/cxf/bus-extensions.xml Fri Aug
 1 11:33:15 2008
@@ -21,6 +21,7 @@
 
     <extension class="org.apache.cxf.binding.corba.CorbaBindingFactory" deferred="true">
         <namespace>http://cxf.apache.org/bindings/corba</namespace>
+        <namespace>http://schemas.apache.org/yoko/bindings/corba</namespace>
     </extension>
 
 </extensions>

Modified: cxf/trunk/rt/bindings/corba/src/main/resources/META-INF/cxf/cxf-extension-corba.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/corba/src/main/resources/META-INF/cxf/cxf-extension-corba.xml?rev=681771&r1=681770&r2=681771&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/corba/src/main/resources/META-INF/cxf/cxf-extension-corba.xml (original)
+++ cxf/trunk/rt/bindings/corba/src/main/resources/META-INF/cxf/cxf-extension-corba.xml Fri
Aug  1 11:33:15 2008
@@ -30,11 +30,13 @@
         <property name="activationNamespaces">
             <set>
                 <value>http://cxf.apache.org/bindings/corba</value>
+                <value>http://schemas.apache.org/yoko/bindings/corba</value>
             </set>
         </property>
         <property name="transportIds">
             <list>
-	        <value>http://cxf.apache.org/bindings/corba</value>
+		        <value>http://cxf.apache.org/bindings/corba</value>
+	            <value>http://schemas.apache.org/yoko/bindings/corba</value>
             </list>
         </property>
     </bean>

Modified: cxf/trunk/rt/bindings/corba/src/test/java/org/apache/cxf/binding/corba/TestUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/cxf/binding/corba/TestUtils.java?rev=681771&r1=681770&r2=681771&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/corba/src/test/java/org/apache/cxf/binding/corba/TestUtils.java
(original)
+++ cxf/trunk/rt/bindings/corba/src/test/java/org/apache/cxf/binding/corba/TestUtils.java
Fri Aug  1 11:33:15 2008
@@ -73,6 +73,14 @@
                                                      "ComplexTypesCORBAPort");
         CorbaBindingFactory corbaBF = (CorbaBindingFactory)factory;        
         return (CorbaDestination)corbaBF.getDestination(endpointInfo);
-    }        
+    }
+    public CorbaDestination getComplexTypesTestDestinationYoko() throws Exception {
+        endpointInfo = setupServiceInfo("http://cxf.apache.org/bindings/corba/ComplexTypes",
+                                                     "/wsdl_corbabinding/ComplexTypesYoko.wsdl",
+                                                     "ComplexTypesCORBAService",
+                                                     "ComplexTypesCORBAPort");
+        CorbaBindingFactory corbaBF = (CorbaBindingFactory)factory;        
+        return (CorbaDestination)corbaBF.getDestination(endpointInfo);
+    }
 
 }

Modified: cxf/trunk/rt/bindings/corba/src/test/java/org/apache/cxf/binding/corba/types/CorbaHandlerUtilsTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/cxf/binding/corba/types/CorbaHandlerUtilsTest.java?rev=681771&r1=681770&r2=681771&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/corba/src/test/java/org/apache/cxf/binding/corba/types/CorbaHandlerUtilsTest.java
(original)
+++ cxf/trunk/rt/bindings/corba/src/test/java/org/apache/cxf/binding/corba/types/CorbaHandlerUtilsTest.java
Fri Aug  1 11:33:15 2008
@@ -70,15 +70,18 @@
         props.put("yoko.orb.id", "CXF-CORBA-Server-Binding");
         orb = ORB.init(new String[0], props);
         
-        TestUtils testUtils = new TestUtils();
-        //CorbaDestination destination = (CorbaDestination)getDestination();
-        CorbaDestination destination = testUtils.getComplexTypesTestDestination();
+        CorbaDestination destination = getDestination();
         service = destination.getBindingInfo().getService();
         List<TypeMappingType> corbaTypes 
             = service.getDescription().getExtensors(TypeMappingType.class);        
         typeMap = CorbaUtils.createCorbaTypeMap(corbaTypes);
     }
     
+    protected CorbaDestination getDestination() throws Exception {
+        TestUtils testUtils = new TestUtils();
+        return testUtils.getComplexTypesTestDestination();
+    }
+    
     @After
     public void tearDown() throws Exception {
         bus.shutdown(true); 
@@ -90,27 +93,7 @@
             }
         } 
     }
-            
-    /*protected void setupServiceInfo(String ns, String wsdl, String serviceName, String
portName) {        
-        URL wsdlUrl = getClass().getResource(wsdl);
-        assertNotNull(wsdlUrl);
-        WSDLServiceFactory factory = new WSDLServiceFactory(bus, wsdlUrl, new QName(ns, serviceName));
-
-        Service service = factory.create();        
-        endpointInfo = service.getEndpointInfo(new QName(ns, portName));
-   
-    }
-    
-    public Destination getDestination() throws Exception {    
-        setupServiceInfo("http://cxf.apache.org/bindings/corba/ComplexTypes", 
-                         "/wsdl/ComplexTypes.wsdl", 
-                         "ComplexTypesCORBAService", 
-                         "ComplexTypesCORBAPort");
-        CorbaBindingFactory corbaBF = (CorbaBindingFactory)factory;
-        Destination destination = corbaBF.getDestination(endpointInfo);
-        assertNotNull(destination);
-        return destination;
-    }*/
+
     
     @Test
     public void testCreateTypeHandler() {

Added: cxf/trunk/rt/bindings/corba/src/test/java/org/apache/cxf/binding/corba/types/CorbaHandlerUtilsYokoNSTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/corba/src/test/java/org/apache/cxf/binding/corba/types/CorbaHandlerUtilsYokoNSTest.java?rev=681771&view=auto
==============================================================================
--- cxf/trunk/rt/bindings/corba/src/test/java/org/apache/cxf/binding/corba/types/CorbaHandlerUtilsYokoNSTest.java
(added)
+++ cxf/trunk/rt/bindings/corba/src/test/java/org/apache/cxf/binding/corba/types/CorbaHandlerUtilsYokoNSTest.java
Fri Aug  1 11:33:15 2008
@@ -0,0 +1,35 @@
+/**
+ * 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.binding.corba.types;
+
+
+import org.apache.cxf.binding.corba.CorbaDestination;
+import org.apache.cxf.binding.corba.TestUtils;
+
+
+
+public class CorbaHandlerUtilsYokoNSTest extends CorbaHandlerUtilsTest {
+
+    
+    protected CorbaDestination getDestination() throws Exception {
+        TestUtils testUtils = new TestUtils();
+        return testUtils.getComplexTypesTestDestinationYoko();
+    }
+    
+}

Propchange: cxf/trunk/rt/bindings/corba/src/test/java/org/apache/cxf/binding/corba/types/CorbaHandlerUtilsYokoNSTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/bindings/corba/src/test/java/org/apache/cxf/binding/corba/types/CorbaHandlerUtilsYokoNSTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/rt/bindings/corba/src/test/resources/wsdl_corbabinding/ComplexTypesYoko.wsdl
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/corba/src/test/resources/wsdl_corbabinding/ComplexTypesYoko.wsdl?rev=681771&view=auto
==============================================================================
--- cxf/trunk/rt/bindings/corba/src/test/resources/wsdl_corbabinding/ComplexTypesYoko.wsdl
(added)
+++ cxf/trunk/rt/bindings/corba/src/test/resources/wsdl_corbabinding/ComplexTypesYoko.wsdl
Fri Aug  1 11:33:15 2008
@@ -0,0 +1,145 @@
+<?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.
+-->
+
+<!-- To be replace by a Yoko generated IDLtoWSDL once types supported -->
+<definitions
+ targetNamespace="http://cxf.apache.org/bindings/corba/ComplexTypes"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://cxf.apache.org/bindings/corba/ComplexTypes"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsd1="http://cxf.apache.org/bindings/corba/ComplexTypes/types"
+ xmlns:corba="http://schemas.apache.org/yoko/bindings/corba"
+ xmlns:corbatm="http://cxf.apache.org/bindings/corba/ComplexTypes/idl_types">
+  <types>
+    <schema targetNamespace="http://cxf.apache.org/bindings/corba/ComplexTypes/types"
+     xmlns="http://www.w3.org/2001/XMLSchema"
+     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+      <xsd:complexType name="TestArray">
+        <xsd:sequence>
+          <xsd:element name="item" type="xsd:int" minOccurs="5" maxOccurs="5"/>
+        </xsd:sequence>
+      </xsd:complexType>
+      <xsd:complexType name="TestSequence">
+        <xsd:sequence>
+          <xsd:element name="item" type="xsd:short" minOccurs="0" maxOccurs="unbounded"/>
+        </xsd:sequence>
+      </xsd:complexType>
+      <xsd:complexType name="TestBoundedSequence">
+        <xsd:sequence>
+          <xsd:element name="item" type="xsd:short" minOccurs="0" maxOccurs="5"/>
+        </xsd:sequence>
+      </xsd:complexType>
+      <xsd:simpleType name="TestEnum">
+        <xsd:restriction base="xsd:string">
+          <xsd:enumeration value="RED"/>
+          <xsd:enumeration value="GREEN"/>
+          <xsd:enumeration value="BLUE"/>
+        </xsd:restriction>
+      </xsd:simpleType>
+      <xsd:complexType name="TestStruct">
+        <xsd:sequence>
+          <xsd:element name="boolMember" type="xsd:boolean"/>
+          <xsd:element name="stringMember" type="xsd:string"/>
+          <xsd:element name="floatMember" type="xsd:float"/>
+        </xsd:sequence>
+      </xsd:complexType>
+      <xsd:complexType name="TestUnion">
+        <xsd:choice>
+          <xsd:element name="case0" type="xsd:unsignedByte"/>
+          <xsd:element name="case12" type="xsd:string"/>
+          <xsd:element name="caseDef" type="xsd:long"/>
+        </xsd:choice>
+      </xsd:complexType>
+      <xsd:complexType name="_omg_TestUnion">
+        <xsd:sequence>
+          <xsd:element minOccurs="1" maxOccurs="1" name="discriminator" type="xsd:short"/>
+          <xsd:choice minOccurs="0" maxOccurs="1">
+            <xsd:element name="case0" type="xsd:unsignedByte"/>
+            <xsd:element name="case12" type="xsd:string"/>
+            <xsd:element name="caseDef" type="xsd:long"/>
+          </xsd:choice>
+        </xsd:sequence>
+      </xsd:complexType>
+      <xsd:element name="testOp">
+        <xsd:complexType>
+          <xsd:sequence>
+          </xsd:sequence>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="testOpResult">
+        <xsd:complexType>
+          <xsd:sequence>
+          </xsd:sequence>
+        </xsd:complexType>
+      </xsd:element>
+    </schema>
+  </types>
+  <message name="testOp">
+    <part name="parameters" element="xsd1:testOp"/>
+  </message>
+  <message name="testOpResponse">
+    <part name="parameters" element="xsd1:testOpResult"/>
+  </message>
+  <portType name="ComplexTypes">
+    <operation name="testOp">
+      <input message="tns:testOp" name="testOp"/>
+      <output message="tns:testOpResponse" name="testOpResponse"/>
+    </operation>
+  </portType>
+  <binding name="ComplexTypesCORBABinding" type="tns:ComplexTypes">
+    <corba:binding repositoryID="IDL:ComplexTypes:1.0"/>
+    <operation name="testOp">
+      <corba:operation name="testOp"/>
+      <input/>
+      <output/>
+    </operation>
+  </binding>
+  <service name="ComplexTypesCORBAService">
+    <port name="ComplexTypesCORBAPort" binding="tns:ComplexTypesCORBABinding">
+      <corba:address location="corbaloc::localhost:50000/ComplexTypes"/>
+    </port>
+  </service>
+  <corba:typeMapping targetNamespace="http://cxf.apache.org/bindings/corba/ComplexTypes/idl_types">
+    <corba:array name="TestArray" repositoryID="IDL:TestArray:1.0" type="xsd1:TestArray"
elemtype="corba:long" bound="5"/>
+    <corba:sequence name="TestSequence" repositoryID="IDL:TestSequence:1.0" type="xsd1:TestSequence"
elemtype="corba:short" bound="0"/>
+    <corba:sequence name="TestBoundedSequence" repositoryID="IDL:TestBoundedSequence:1.0"
type="xsd1:TestBoundedSequence" elemtype="corba:short" bound="5"/>
+    <corba:fixed name="TestFixed" repositoryID="IDL:TestFixed:1.0" type="xsd:decimal"
digits="5" scale="2"/>
+    <corba:enum name="TestEnum" type="xsd1:TestEnum" repositoryID="IDL:TestEnum:1.0">
+      <corba:enumerator value="RED"/>
+      <corba:enumerator value="GREEN"/>
+      <corba:enumerator value="BLUE"/>
+    </corba:enum>
+    <corba:struct name="TestStruct" type="xsd1:TestStruct" repositoryID="IDL:TestStruct:1.0">
+      <corba:member name="boolMember" idltype="corba:boolean"/>
+      <corba:member name="stringMember" idltype="corba:string"/>
+      <corba:member name="floatMember" idltype="corba:float"/>
+    </corba:struct>
+    <corba:union name="TestUnion" type="xsd1:TestUnion" discriminator="corba:short" repositoryID="IDL:TestUnion:1.0">
+      <corba:unionbranch name="case0" idltype="corba:octet">
+        <corba:case label="0"/>
+      </corba:unionbranch>
+      <corba:unionbranch name="case12" idltype="corba:wchar">
+        <corba:case label="1"/>
+        <corba:case label="2"/>
+      </corba:unionbranch>
+      <corba:unionbranch name="caseDef" idltype="corba:longlong" default="true"/>
+    </corba:union>
+  </corba:typeMapping>
+</definitions>

Propchange: cxf/trunk/rt/bindings/corba/src/test/resources/wsdl_corbabinding/ComplexTypesYoko.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/bindings/corba/src/test/resources/wsdl_corbabinding/ComplexTypesYoko.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/rt/bindings/corba/src/test/resources/wsdl_corbabinding/ComplexTypesYoko.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message