You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yoko-commits@incubator.apache.org by mv...@apache.org on 2007/03/09 18:07:06 UTC

svn commit: r516486 - in /incubator/yoko/trunk/tools/src: main/java/org/apache/yoko/tools/ main/java/org/apache/yoko/tools/common/ main/java/org/apache/yoko/tools/processors/idl/ test/java/org/apache/yoko/tools/ test/java/org/apache/yoko/tools/common/ ...

Author: mvescovi
Date: Fri Mar  9 10:07:03 2007
New Revision: 516486

URL: http://svn.apache.org/viewvc?view=rev&rev=516486
Log:
[YOKO-299] Added support for -s idltowsdl option and added tests

Added:
    incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/utils/WSDLGenerationTester.java   (with props)
    incubator/yoko/trunk/tools/src/test/resources/idl/expected_base64Binary_sequence_octet.wsdl   (with props)
    incubator/yoko/trunk/tools/src/test/resources/idl/expected_hexBinary_sequence_octet.wsdl   (with props)
    incubator/yoko/trunk/tools/src/test/resources/idl/sequence_octet.idl
Modified:
    incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/IDLToWSDL.java
    incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/common/ToolCorbaConstants.java
    incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/IDLToWSDLProcessor.java
    incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/WSDLASTVisitor.java
    incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/IDLToWSDLTest.java
    incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/common/ToolTestBase.java
    incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/IDLToWSDLGenerationTest.java
    incubator/yoko/trunk/tools/src/test/resources/idl/Sequence.idl

Modified: incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/IDLToWSDL.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/IDLToWSDL.java?view=diff&rev=516486&r1=516485&r2=516486
==============================================================================
--- incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/IDLToWSDL.java (original)
+++ incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/IDLToWSDL.java Fri Mar  9 10:07:03 2007
@@ -112,6 +112,10 @@
             env.put(ToolCorbaConstants.CFG_SEQUENCE_OCTET_TYPE,
                     doc.getParameter(ToolCorbaConstants.CFG_SEQUENCE_OCTET_TYPE));
         }
+        if (env.optionSet(ToolCorbaConstants.CFG_SCHEMA_NAMESPACE)) {
+            env.put(ToolCorbaConstants.CFG_SCHEMA_NAMESPACE,
+                    doc.getParameter(ToolCorbaConstants.CFG_SCHEMA_NAMESPACE));
+        }
         
         //need to add all the other options
     }
@@ -159,8 +163,8 @@
         if (doc.hasParameter(ToolCorbaConstants.CFG_SEQUENCE_OCTET_TYPE)) {
             String sequenceOctetType = doc.getParameter(ToolCorbaConstants.CFG_SEQUENCE_OCTET_TYPE);
             if (sequenceOctetType != null) {
-                if (!(sequenceOctetType == ToolCorbaConstants.CFG_SEQUENCE_OCTET_TYPE_BASE64BINARY
-                    || sequenceOctetType == ToolCorbaConstants.CFG_SEQUENCE_OCTET_TYPE_HEXBINARY)) {
+                if (!(sequenceOctetType.equals(ToolCorbaConstants.CFG_SEQUENCE_OCTET_TYPE_BASE64BINARY)
+                    || sequenceOctetType.equals(ToolCorbaConstants.CFG_SEQUENCE_OCTET_TYPE_HEXBINARY))) {
                     errors.add(new ErrorVisitor.UserError("Invalid value specified for -s option"));
                 }
             }

Modified: incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/common/ToolCorbaConstants.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/common/ToolCorbaConstants.java?view=diff&rev=516486&r1=516485&r2=516486
==============================================================================
--- incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/common/ToolCorbaConstants.java (original)
+++ incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/common/ToolCorbaConstants.java Fri Mar  9 10:07:03 2007
@@ -35,4 +35,5 @@
     public static final String CFG_SEQUENCE_OCTET_TYPE = "sequencetype";
     public static final String CFG_SEQUENCE_OCTET_TYPE_BASE64BINARY = "base64Binary";
     public static final String CFG_SEQUENCE_OCTET_TYPE_HEXBINARY = "hexBinary";
+    public static final String CFG_SCHEMA_NAMESPACE = "schemans";
 }

Modified: incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/IDLToWSDLProcessor.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/IDLToWSDLProcessor.java?view=diff&rev=516486&r1=516485&r2=516486
==============================================================================
--- incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/IDLToWSDLProcessor.java (original)
+++ incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/IDLToWSDLProcessor.java Fri Mar  9 10:07:03 2007
@@ -84,13 +84,20 @@
             outputDir = obj.toString();
         }
 
+        // target namespace
         String tns = (String) env.get(ToolCorbaConstants.CFG_TNS);
         if (tns == null) {
             tns = CorbaConstants.WSDL_NS_URI + idl;
         }
+        // XmlSchema namespace
+        String schemans = (String) env.get(ToolCorbaConstants.CFG_SCHEMA_NAMESPACE);
+        if (schemans == null) {
+            schemans = tns;
+        }
 
+        
         try {
-            WSDLASTVisitor visitor = new WSDLASTVisitor(tns);
+            WSDLASTVisitor visitor = new WSDLASTVisitor(tns, schemans);
             if (env.optionSet(ToolCorbaConstants.CFG_SEQUENCE_OCTET_TYPE)) {
                 visitor.setSequenceOctetType((String) env.get(ToolCorbaConstants.CFG_SEQUENCE_OCTET_TYPE));
             }

Modified: incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/WSDLASTVisitor.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/WSDLASTVisitor.java?view=diff&rev=516486&r1=516485&r2=516486
==============================================================================
--- incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/WSDLASTVisitor.java (original)
+++ incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/WSDLASTVisitor.java Fri Mar  9 10:07:03 2007
@@ -65,7 +65,6 @@
 public class WSDLASTVisitor implements ASTVisitor {
     
     Definition definition;
-    WSDLFactory wsdlFactory;
 
     XmlSchema schema;
     XmlSchemaCollection schemas;
@@ -74,13 +73,13 @@
 
     XmlSchemaType sequenceOctetType;
     
-    public WSDLASTVisitor(String tns)
+    public WSDLASTVisitor(String tns, String schemans)
         throws WSDLException, JAXBException {
         
-        createWsdlDefinition(tns);
+        definition = createWsdlDefinition(tns);
         
         schemas = new XmlSchemaCollection();
-        schema = new XmlSchema(definition.getTargetNamespace(), schemas);
+        schema = createSchema(schemans);
         
         addAnyType();
         
@@ -112,9 +111,9 @@
         return definition;
     }
 
-    public WSDLFactory getFactory() {
-        return wsdlFactory;
-    }
+//    public WSDLFactory getFactory() {
+//        return wsdlFactory;
+//    }
     
     public XmlSchema getSchema() {
         return schema;
@@ -168,16 +167,22 @@
         return true;
     }
 
-    private void createWsdlDefinition(String tns) throws WSDLException, JAXBException {
-        wsdlFactory = WSDLFactory.newInstance();
-        definition = wsdlFactory.newDefinition();
-        definition.setTargetNamespace(tns);
-        definition.addNamespace(WSDLConstants.WSDL_PREFIX, WSDLConstants.NS_WSDL);
-        definition.addNamespace(WSDLConstants.XSD_PREFIX, WSDLConstants.XSD_NAMESPACE);
-        definition.addNamespace(WSDLConstants.SOAP_PREFIX, WSDLConstants.SOAP11_NAMESPACE);
-        definition.addNamespace(WSDLConstants.TNS_PREFIX, tns);
-        definition.addNamespace(CorbaConstants.NP_WSDL_CORBA, CorbaConstants.NU_WSDL_CORBA);
-        addCorbaExtensions(definition.getExtensionRegistry());
+    private Definition createWsdlDefinition(String tns) throws WSDLException, JAXBException {
+        WSDLFactory wsdlFactory = WSDLFactory.newInstance();
+        Definition wsdlDefinition = wsdlFactory.newDefinition();
+        wsdlDefinition.setTargetNamespace(tns);
+        wsdlDefinition.addNamespace(WSDLConstants.WSDL_PREFIX, WSDLConstants.NS_WSDL);
+        wsdlDefinition.addNamespace(WSDLConstants.XSD_PREFIX, WSDLConstants.XSD_NAMESPACE);
+        wsdlDefinition.addNamespace(WSDLConstants.SOAP_PREFIX, WSDLConstants.SOAP11_NAMESPACE);
+        wsdlDefinition.addNamespace(WSDLConstants.TNS_PREFIX, tns);
+        wsdlDefinition.addNamespace(CorbaConstants.NP_WSDL_CORBA, CorbaConstants.NU_WSDL_CORBA);
+        addCorbaExtensions(wsdlDefinition.getExtensionRegistry());
+        return wsdlDefinition;
+    }
+    
+    private XmlSchema createSchema(String schemans) {
+        XmlSchema xmlSchema = new XmlSchema(schemans, schemas);
+        return xmlSchema;
     }
     
     private void createCorbaTypeMap() throws WSDLException { 

Modified: incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/IDLToWSDLTest.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/IDLToWSDLTest.java?view=diff&rev=516486&r1=516485&r2=516486
==============================================================================
--- incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/IDLToWSDLTest.java (original)
+++ incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/IDLToWSDLTest.java Fri Mar  9 10:07:03 2007
@@ -23,13 +23,22 @@
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.PrintStream;
 import java.net.URL;
 import java.security.Permission;
 
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.yoko.tools.common.ToolCorbaConstants;
 import org.apache.yoko.tools.common.ToolTestBase;
 import org.apache.yoko.tools.utils.TestUtils;
+import org.apache.yoko.tools.utils.WSDLGenerationTester;
 
 public class IDLToWSDLTest extends ToolTestBase {
    
@@ -39,7 +48,12 @@
     ByteArrayOutputStream bout;
     PrintStream newOut;
     private File output;
-
+    private WSDLGenerationTester wsdlGenTester;
+    
+    public IDLToWSDLTest() {
+        wsdlGenTester = new WSDLGenerationTester();
+    }
+    
     public void setUp() {
         super.setUp();
         try {
@@ -151,4 +165,34 @@
         assertNotNull(getStdOut());
     }
     
+    public void testSequenceOctetMappingOption() throws Exception {
+        testSequenceOctetMappingOption(ToolCorbaConstants.CFG_SEQUENCE_OCTET_TYPE_BASE64BINARY);
+        testSequenceOctetMappingOption(ToolCorbaConstants.CFG_SEQUENCE_OCTET_TYPE_HEXBINARY);
+    }
+    
+    // test "-s base64Binary" and "-s hexBinary" options
+    public void testSequenceOctetMappingOption(String encoding) throws Exception {
+        File input = new File(getClass().getResource("/idl/sequence_octet.idl").getFile());
+        File actual = new File(output, "sequence_octet.wsdl");
+        File expected = new File(getClass().getResource("/idl/expected_" + encoding + "_sequence_octet.wsdl").getFile());
+        
+        String[] args = new String[] {"-s", encoding,
+                                      "-o", output.toString(),
+                                      input.toString()
+                                      };
+        IDLToWSDL.main(args);
+        testGeneratedWsdl(expected, actual);
+    }
+    
+    private void testGeneratedWsdl(File expected, File actual) throws FileNotFoundException, XMLStreamException, Exception {
+        InputStream actualFileStream = new FileInputStream(actual);
+        InputStream expectedFileStream = new FileInputStream(expected);
+        
+        XMLInputFactory factory = XMLInputFactory.newInstance();
+        
+        XMLStreamReader actualStream = factory.createXMLStreamReader(actualFileStream);
+        XMLStreamReader expectedStream = factory.createXMLStreamReader(expectedFileStream);
+        
+        wsdlGenTester.compare(expectedStream, actualStream);
+    }
 }

Modified: incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/common/ToolTestBase.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/common/ToolTestBase.java?view=diff&rev=516486&r1=516485&r2=516486
==============================================================================
--- incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/common/ToolTestBase.java (original)
+++ incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/common/ToolTestBase.java Fri Mar  9 10:07:03 2007
@@ -30,6 +30,7 @@
     protected PrintStream oldStdErr; 
     protected PrintStream oldStdOut; 
     protected URL wsdlLocation; 
+    protected URL idlLocation;
     
     protected ByteArrayOutputStream errOut = new ByteArrayOutputStream(); 
     protected ByteArrayOutputStream stdOut = new ByteArrayOutputStream(); 
@@ -43,6 +44,7 @@
         System.setOut(new PrintStream(stdOut));
         
         wsdlLocation = ToolTestBase.class.getResource("/wsdl/hello_world.wsdl");
+        idlLocation = ToolTestBase.class.getResource("/idl/HelloWorld.idl");
     }
     
     public void tearDown() { 

Modified: incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/IDLToWSDLGenerationTest.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/IDLToWSDLGenerationTest.java?view=diff&rev=516486&r1=516485&r2=516486
==============================================================================
--- incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/IDLToWSDLGenerationTest.java (original)
+++ incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/IDLToWSDLGenerationTest.java Fri Mar  9 10:07:03 2007
@@ -36,13 +36,16 @@
 import org.apache.yoko.tools.common.ProcessorEnvironment;
 import org.apache.yoko.tools.common.ToolCorbaConstants;
 import org.apache.yoko.tools.processors.idl.IDLToWSDLProcessor;
+import org.apache.yoko.tools.utils.WSDLGenerationTester;
 
 public class IDLToWSDLGenerationTest extends TestCase {
 
     public XMLInputFactory factory;
+    private WSDLGenerationTester wsdlGenTester;
 
     public IDLToWSDLGenerationTest(String name) {
         super(name);
+        wsdlGenTester = new WSDLGenerationTester();
     }
     
     protected void setUp() {
@@ -76,73 +79,9 @@
         XMLStreamReader orig = factory.createXMLStreamReader(origStream);
         XMLStreamReader actual = factory.createXMLStreamReader(actualStream);
 
-        compare(orig, actual);
+        wsdlGenTester.compare(orig, actual);
 
     }
-
-    private void compare(XMLStreamReader orig, XMLStreamReader actual)
-        throws Exception {
-
-        boolean origEnd = false;
-        boolean actualEnd = false;
-        while (orig.hasNext() || actual.hasNext()) {
-            int origTag = orig.next();
-            while (!orig.isStartElement() && !orig.isEndElement() && !orig.isCharacters()) {
-                if (orig.hasNext()) {
-                    origTag = orig.next();
-                } else {
-                    origEnd = true;
-                    break;
-                }
-            }
-            int actualTag = actual.next();
-            while (!actual.isStartElement() && !actual.isEndElement() && !actual.isCharacters()) {
-                if (actual.hasNext()) {
-                    actualTag = actual.next();
-                } else {
-                    actualEnd = true;
-                    break;
-                }
-            }
-            if (!origEnd && !actualEnd) {
-                assertEquals("XML mismatch", origTag, actualTag);
-                if (orig.isStartElement()) {
-                    compareStartElement(orig, actual);
-                } else if (orig.isEndElement()) {
-                    compareEndElement(orig, actual);
-                } else if (orig.isCharacters()) {
-                    compareCharacters(orig, actual);
-                }
-            } else {
-                break;
-            }
-        }
-    }
-
-    private void compareStartElement(XMLStreamReader orig, XMLStreamReader actual)
-        throws Exception {
-        assertEquals("Start element is not matched", orig.getName(), actual.getName());
-        assertEquals("Attribute count is not matched for element " + orig.getName(),
-                     orig.getAttributeCount(),
-                     actual.getAttributeCount());
-        int count = orig.getAttributeCount();
-        for (int i = 0; i < count; i++) {
-            QName attrName = orig.getAttributeName(i);
-            assertEquals("Attribute " + attrName + " not found or value not matching",
-                         orig.getAttributeValue(attrName.getNamespaceURI(), attrName.getLocalPart()),
-                         actual.getAttributeValue(attrName.getNamespaceURI(), attrName.getLocalPart()));
-        }
-    }
-    
-   private void compareEndElement(XMLStreamReader orig, XMLStreamReader actual)
-       throws Exception {
-        assertEquals("End element is not matched", orig.getName(), actual.getName());
-   }
-                                 
-    private void compareCharacters(XMLStreamReader orig, XMLStreamReader actual)
-        throws Exception {
-        assertEquals("Element Characters not matched", orig.getText(), actual.getText());
-    }                                                                       
 
     public void testHelloWorldWSDLGeneration() throws Exception {
         testWSDLGeneration("/idl/HelloWorld.idl", "/idl/expected_HelloWorld.wsdl");

Added: incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/utils/WSDLGenerationTester.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/utils/WSDLGenerationTester.java?view=auto&rev=516486
==============================================================================
--- incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/utils/WSDLGenerationTester.java (added)
+++ incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/utils/WSDLGenerationTester.java Fri Mar  9 10:07:03 2007
@@ -0,0 +1,90 @@
+package org.apache.yoko.tools.utils;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamReader;
+
+import org.apache.yoko.tools.common.ProcessorEnvironment;
+import org.apache.yoko.tools.common.ToolCorbaConstants;
+import org.apache.yoko.tools.processors.idl.IDLToWSDLProcessor;
+
+import junit.framework.Assert;
+
+public class WSDLGenerationTester {
+    
+    XMLInputFactory factory;
+    
+    public WSDLGenerationTester() {
+        factory = XMLInputFactory.newInstance();
+    }
+    
+    public void compare(XMLStreamReader orig, XMLStreamReader actual)
+        throws Exception {
+
+        boolean origEnd = false;
+        boolean actualEnd = false;
+        while (orig.hasNext() || actual.hasNext()) {
+            int origTag = orig.next();
+            while (!orig.isStartElement() && !orig.isEndElement() && !orig.isCharacters()) {
+                if (orig.hasNext()) {
+                    origTag = orig.next();
+                } else {
+                    origEnd = true;
+                    break;
+                }
+            }
+            int actualTag = actual.next();
+            while (!actual.isStartElement() && !actual.isEndElement() && !actual.isCharacters()) {
+                if (actual.hasNext()) {
+                    actualTag = actual.next();
+                } else {
+                    actualEnd = true;
+                    break;
+                }
+            }
+            if (!origEnd && !actualEnd) {
+                Assert.assertEquals("XML mismatch", origTag, actualTag);
+                if (orig.isStartElement()) {
+                    compareStartElement(orig, actual);
+                } else if (orig.isEndElement()) {
+                    compareEndElement(orig, actual);
+                } else if (orig.isCharacters()) {
+                    compareCharacters(orig, actual);
+                }
+            } else {
+                break;
+            }
+        }
+    }
+
+    private void compareStartElement(XMLStreamReader orig, XMLStreamReader actual)
+        throws Exception {
+        Assert.assertEquals("Start element is not matched", orig.getName(), actual.getName());
+        Assert.assertEquals("Attribute count is not matched for element " + orig.getName(),
+                     orig.getAttributeCount(),
+                     actual.getAttributeCount());
+        int count = orig.getAttributeCount();
+        for (int i = 0; i < count; i++) {
+            QName attrName = orig.getAttributeName(i);
+            Assert.assertEquals("Attribute " + attrName + " not found or value not matching",
+                         orig.getAttributeValue(attrName.getNamespaceURI(), attrName.getLocalPart()),
+                         actual.getAttributeValue(attrName.getNamespaceURI(), attrName.getLocalPart()));
+        }
+    }
+    
+   private void compareEndElement(XMLStreamReader orig, XMLStreamReader actual)
+       throws Exception {
+       Assert.assertEquals("End element is not matched", orig.getName(), actual.getName());
+   }
+                                 
+    private void compareCharacters(XMLStreamReader orig, XMLStreamReader actual)
+        throws Exception {
+        Assert.assertEquals("Element Characters not matched", orig.getText(), actual.getText());
+    }                                                                       
+}

Propchange: incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/utils/WSDLGenerationTester.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/utils/WSDLGenerationTester.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/yoko/trunk/tools/src/test/resources/idl/Sequence.idl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/idl/Sequence.idl?view=diff&rev=516486&r1=516485&r2=516486
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/idl/Sequence.idl (original)
+++ incubator/yoko/trunk/tools/src/test/resources/idl/Sequence.idl Fri Mar  9 10:07:03 2007
@@ -15,7 +15,7 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/ 
+ */ 
 
 typedef sequence<long> longSequence;
 typedef sequence<string> stringSequence;

Added: incubator/yoko/trunk/tools/src/test/resources/idl/expected_base64Binary_sequence_octet.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/idl/expected_base64Binary_sequence_octet.wsdl?view=auto&rev=516486
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/idl/expected_base64Binary_sequence_octet.wsdl (added)
+++ incubator/yoko/trunk/tools/src/test/resources/idl/expected_base64Binary_sequence_octet.wsdl Fri Mar  9 10:07:03 2007
@@ -0,0 +1,36 @@
+<?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 targetNamespace="http://schemas.apache.org/yoko/idl/sequence_octet" xmlns:tns="http://schemas.apache.org/yoko/idl/sequence_octet" xmlns:corba="http://schemas.apache.org/yoko/bindings/corba" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+  <corba:typeMapping targetNamespace="http://schemas.apache.org/yoko/idl/sequence_octet/typemap">
+    <corba:sequence xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.apache.org/yoko/idl/sequence_octet/typemap" elemtype="corba:octet" bound="0" repositoryID="IDL:mySequenceOctet:1.0" name="mySequenceOctet" type="xs:base64Binary" />
+    <corba:anonsequence xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.apache.org/yoko/idl/sequence_octet/typemap" elemtype="corba:octet" bound="0" name="_1_mySequenceSequenceOctet" type="xs:base64Binary" />
+    <corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/sequence_octet" xmlns="http://schemas.apache.org/yoko/idl/sequence_octet/typemap" elemtype="_1_mySequenceSequenceOctet" bound="0" repositoryID="IDL:mySequenceSequenceOctet:1.0" name="mySequenceSequenceOctet" type="ns4:mySequenceSequenceOctet" />
+  </corba:typeMapping>
+  <wsdl:types>
+    <xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://schemas.apache.org/yoko/idl/sequence_octet" xmlns="http://schemas.apache.org/yoko/idl/sequence_octet" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+      <xs:complexType name="mySequenceSequenceOctet">
+        <xs:sequence>
+          <xs:element maxOccurs="unbounded" minOccurs="0" name="item" type="xs:base64Binary">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+    </xs:schema>
+  </wsdl:types>
+</wsdl:definitions>

Propchange: incubator/yoko/trunk/tools/src/test/resources/idl/expected_base64Binary_sequence_octet.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/tools/src/test/resources/idl/expected_base64Binary_sequence_octet.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/yoko/trunk/tools/src/test/resources/idl/expected_base64Binary_sequence_octet.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/yoko/trunk/tools/src/test/resources/idl/expected_hexBinary_sequence_octet.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/idl/expected_hexBinary_sequence_octet.wsdl?view=auto&rev=516486
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/idl/expected_hexBinary_sequence_octet.wsdl (added)
+++ incubator/yoko/trunk/tools/src/test/resources/idl/expected_hexBinary_sequence_octet.wsdl Fri Mar  9 10:07:03 2007
@@ -0,0 +1,36 @@
+<?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 targetNamespace="http://schemas.apache.org/yoko/idl/sequence_octet" xmlns:tns="http://schemas.apache.org/yoko/idl/sequence_octet" xmlns:corba="http://schemas.apache.org/yoko/bindings/corba" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+  <corba:typeMapping targetNamespace="http://schemas.apache.org/yoko/idl/sequence_octet/typemap">
+    <corba:sequence xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.apache.org/yoko/idl/sequence_octet/typemap" elemtype="corba:octet" bound="0" repositoryID="IDL:mySequenceOctet:1.0" name="mySequenceOctet" type="xs:hexBinary" />
+    <corba:anonsequence xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.apache.org/yoko/idl/sequence_octet/typemap" elemtype="corba:octet" bound="0" name="_1_mySequenceSequenceOctet" type="xs:hexBinary" />
+    <corba:sequence xmlns:ns4="http://schemas.apache.org/yoko/idl/sequence_octet" xmlns="http://schemas.apache.org/yoko/idl/sequence_octet/typemap" elemtype="_1_mySequenceSequenceOctet" bound="0" repositoryID="IDL:mySequenceSequenceOctet:1.0" name="mySequenceSequenceOctet" type="ns4:mySequenceSequenceOctet" />
+  </corba:typeMapping>
+  <wsdl:types>
+    <xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://schemas.apache.org/yoko/idl/sequence_octet" xmlns="http://schemas.apache.org/yoko/idl/sequence_octet" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+      <xs:complexType name="mySequenceSequenceOctet">
+        <xs:sequence>
+          <xs:element maxOccurs="unbounded" minOccurs="0" name="item" type="xs:hexBinary">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+    </xs:schema>
+  </wsdl:types>
+</wsdl:definitions>

Propchange: incubator/yoko/trunk/tools/src/test/resources/idl/expected_hexBinary_sequence_octet.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/tools/src/test/resources/idl/expected_hexBinary_sequence_octet.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/yoko/trunk/tools/src/test/resources/idl/expected_hexBinary_sequence_octet.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/yoko/trunk/tools/src/test/resources/idl/sequence_octet.idl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/idl/sequence_octet.idl?view=auto&rev=516486
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/idl/sequence_octet.idl (added)
+++ incubator/yoko/trunk/tools/src/test/resources/idl/sequence_octet.idl Fri Mar  9 10:07:03 2007
@@ -0,0 +1,21 @@
+/* 
+ * 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.
+ */ 
+
+typedef sequence< octet > mySequenceOctet;
+typedef sequence< sequence< octet > > mySequenceSequenceOctet;