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 en...@apache.org on 2007/05/17 11:35:11 UTC

svn commit: r538875 - 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/common/toolspec/toolspecs/ main/java/org/apache/yoko/tools/processors/wsdl/ test/java/org...

Author: enolan
Date: Thu May 17 04:35:09 2007
New Revision: 538875

URL: http://svn.apache.org/viewvc?view=rev&rev=538875
Log:
Yoko-110 :- Support for multiple idl files to be generated for multiple bindings. This is an all or nothing appoach - in that if you specify a binding - then it just generates the idl for that binding - if you specify the idl flag - it doesn't require you to name every binding in the wsdl - but you can specify the list of idl files to be generated by the -o option with filename.idl,filename2.idl etc. otherwise it does as it does for the single case and gives the idl a default name based on the binding name. 

Also the -w option has been added if you want to name the wsdl file generated when generating a binding for the specifed portType. If a -corba is specified and you don't specify a portType then it will generate bindings for all portTypes within the wsdl file. 

If -w is not specified it generates a default named wsdl file. 



Added:
    incubator/yoko/trunk/tools/src/test/resources/idlgen/expected_test1.idl
    incubator/yoko/trunk/tools/src/test/resources/idlgen/expected_test2.idl
    incubator/yoko/trunk/tools/src/test/resources/idlgen/multiplebinding.wsdl   (with props)
    incubator/yoko/trunk/tools/src/test/resources/wsdl/multiplePortTypes.wsdl   (with props)
    incubator/yoko/trunk/tools/src/test/resources/wsdl/multiplebinding.wsdl   (with props)
Modified:
    incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/WSDLToIDL.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/common/toolspec/toolspecs/wsdl2idl.xml
    incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaBinding.java
    incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaProcessor.java
    incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToIDLAction.java
    incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/WSDLToIDLTest.java
    incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToCorbaBindingTypeTest.java
    incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToIDLGenerationTest.java

Modified: incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/WSDLToIDL.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/WSDLToIDL.java?view=diff&rev=538875&r1=538874&r2=538875
==============================================================================
--- incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/WSDLToIDL.java (original)
+++ incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/WSDLToIDL.java Thu May 17 04:35:09 2007
@@ -119,15 +119,16 @@
         if (env.optionSet(ToolConstants.CFG_NAMESPACE)) {
             env.put(ToolConstants.CFG_NAMESPACE, doc.getParameter("namespace"));
         }
+        if (env.optionSet(ToolCorbaConstants.CFG_WSDLOUTPUTFILE)) {
+            env.put(ToolCorbaConstants.CFG_WSDLOUTPUT, doc.getParameter("wsdloutputfile"));
+        }        
         if (env.optionSet(ToolConstants.CFG_OUTPUTFILE)) {
             String[] outputs = doc.getParameters("outputfile");
+            String filelist = null;
             for (int i = 0; i < outputs.length; i++) {
-                if (outputs[i].endsWith(".wsdl")) {
-                    env.put(ToolCorbaConstants.CFG_WSDLOUTPUT, outputs[i]);
-                } else if (outputs[i].endsWith(".idl")) {
-                    env.put(ToolCorbaConstants.CFG_IDLOUTPUT, outputs[i]);
-                }
+                filelist = outputs[i] + ", ";                
             }
+            env.put(ToolCorbaConstants.CFG_IDLOUTPUT, filelist);
         }
         
         if (env.optionSet(ToolConstants.CFG_OUTPUTDIR)) {

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=538875&r1=538874&r2=538875
==============================================================================
--- 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 Thu May 17 04:35:09 2007
@@ -24,8 +24,9 @@
     public static final String TOOLSPECS_BASE = "/org/apache/yoko/tools/common/toolspec/toolspecs/";
     public static final String CFG_CORBA = "corba";
     public static final String CFG_IDL = "idl";
+    public static final String CFG_WSDLOUTPUTFILE = "wsdloutputfile";
     public static final String CFG_WSDLOUTPUT = "wsdlOutput";
-    public static final String CFG_IDLOUTPUT = "idlOutput";
+    public static final String CFG_IDLOUTPUT = "idlOutput";   
 
     public static final String CFG_IDLFILE = "idl";
     public static final String CFG_TNS = "tns";

Modified: incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/common/toolspec/toolspecs/wsdl2idl.xml
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/common/toolspec/toolspecs/wsdl2idl.xml?view=diff&rev=538875&r1=538874&r2=538875
==============================================================================
--- incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/common/toolspec/toolspecs/wsdl2idl.xml (original)
+++ incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/common/toolspec/toolspecs/wsdl2idl.xml Thu May 17 04:35:09 2007
@@ -70,14 +70,22 @@
         </associatedArgument>
       </option>
       
-           <option id="outputfile" maxOccurs="2">
-        <annotation>The wsdl/idl output file name.(can be specified twice)</annotation>
+      <option id="wsdloutputfile" maxOccurs="1">
+        <annotation>The wsdl output file name.</annotation>
+        <switch>w</switch>
+        <associatedArgument placement="afterSpace">
+          <annotation>wsdloutput-file</annotation>
+        </associatedArgument>
+      </option>
+
+      <option id="outputfile" maxOccurs="unbounded">
+        <annotation>The idl output file name(s). Comma separated</annotation>
         <switch>o</switch>
         <associatedArgument placement="afterSpace">
           <annotation>output-file</annotation>
         </associatedArgument>
       </option>
-
+      
       <option id="namespace" maxOccurs="1">
         <annotation>The corba type-map namespace.</annotation>
         <switch>props</switch>

Modified: incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaBinding.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaBinding.java?view=diff&rev=538875&r1=538874&r2=538875
==============================================================================
--- incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaBinding.java (original)
+++ incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaBinding.java Thu May 17 04:35:09 2007
@@ -80,21 +80,20 @@
     static String namespace;
     static boolean verboseOn;    
     protected Definition def;
-    protected String idlNamespace;
+    protected String idlNamespace;    
 
     WSDLToCorbaHelper helper = new WSDLToCorbaHelper();
-        
-    TypeMappingType typeMappingType;    
-    ExtensionRegistry extReg;   
-    
+    TypeMappingType typeMappingType;
+    ExtensionRegistry extReg;
+
     List<Object> interfaceNames = new ArrayList<Object>();
     Map<Object, Object> bindingNameMap = new HashMap<Object, Object>();
-    String bindingName;    
+    String bindingName;
     WSDLParameter wsdlParameter;
-    List<Object> bindingNames;    
-    List<XmlSchema> xmlSchemaList; 
-
+    List<Object> bindingNames;
+    List<XmlSchema> xmlSchemaList;
     WSDLToTypeProcessor typeProcessor = new WSDLToTypeProcessor();
+    private boolean allbindings;
         
     public WSDLToCorbaBinding() {            
     }
@@ -120,7 +119,7 @@
             typeProcessor.setExtensionRegistry(extReg);            
             typeProcessor.parseWSDL(getWsdlFileName());           
             def = typeProcessor.getWSDLDefinition();
-            generateCORBABinding(def);
+            generateCORBABinding(def);            
         } catch (Exception ex) {
             throw ex;
         }
@@ -177,23 +176,8 @@
                 intfs.add(portType);
             }
         } else {
-            Map portTypes = def.getPortTypes();
-
-            if (portTypes == null) {
-                org.apache.cxf.common.i18n.Message msg = new org.apache.cxf.common.i18n.Message(
-                    "No PortTypes defined in wsdl", LOG);
-                throw new Exception(msg.toString());
-            } else {
-                PortType portType = null;
-                if (portTypes.size() > 1) {
-                    throwMultiplePortTypeException(portTypes);
-                } else {
-                    portType = (PortType) portTypes.values().iterator().next();
-                    interfaceNames.add(portType.getQName().getLocalPart());
-                }
-                intfs = new ArrayList<PortType>();
-                intfs.add(portType);
-            }
+            // gets default portType or all portTypes.
+            intfs = getPortTypeList();
         }
 
         Binding[] bindings = new Binding[intfs.size()];
@@ -204,12 +188,42 @@
         return bindings;
     }
 
-    private void throwMultiplePortTypeException(Map portTypes) throws Exception {
+    private List<PortType> getPortTypeList() throws Exception {
+        Map portTypes = def .getPortTypes();
+        List<PortType> intfs = null;
+
+        if (portTypes == null) {
+            org.apache.cxf.common.i18n.Message msg = new org.apache.cxf.common.i18n.Message(
+                "No PortTypes defined in wsdl", LOG);
+            throw new Exception(msg.toString());
+        } else {
+            PortType portType = null;
+            intfs = new ArrayList<PortType>();
+            if (portTypes.size() == 1) {
+                portType = (PortType) portTypes.values().iterator().next();
+                interfaceNames.add(portType.getQName().getLocalPart());                    
+                intfs.add(portType);
+            } else if (portTypes.size() > 1) {
+                if (def.getAllBindings().size() > 0) {
+                    throwMultipleMultipleTypeException(def.getAllBindings());
+                }
+                Iterator iter = portTypes.values().iterator();
+                while (iter.hasNext()) {                    
+                    PortType port = (PortType)iter.next();
+                    interfaceNames.add(port.getQName().getLocalPart());                        
+                    intfs.add(port);
+                }                    
+            }
+        }
+        return intfs;
+    }
+    
+    private void throwMultipleMultipleTypeException(Map binds) throws Exception {
         StringBuffer sb = new StringBuffer();
         org.apache.cxf.common.i18n.Message msgDef = 
-            new org.apache.cxf.common.i18n.Message("Multiple PortTypes defined in wsdl", LOG);
+            new org.apache.cxf.common.i18n.Message("Multiple Bindings already defined in the wsdl", LOG);
         sb.append(msgDef.toString());
-        Iterator it2 = portTypes.keySet().iterator();
+        Iterator it2 = binds.keySet().iterator();
         int cnt = 0;
         while (it2.hasNext()) {
             cnt++;
@@ -234,7 +248,7 @@
         if (prefix == null) {
             prefix = "";
         }
-        if (bname == null) {
+        if (bname == null && !allbindings) {
             bname = bindingName;
         }
         if (bname == null) {
@@ -832,6 +846,14 @@
     
     public void setVerboseOn(boolean verbose) {
         verboseOn = verbose;
+    }
+    
+    public void setAllBindings(boolean all) {
+        allbindings = all;
+    }
+    
+    public boolean isGenerateAllBindings() {
+        return allbindings;
     }
 
     public void main(String args[]) {

Modified: incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaProcessor.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaProcessor.java?view=diff&rev=538875&r1=538874&r2=538875
==============================================================================
--- incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaProcessor.java (original)
+++ incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaProcessor.java Thu May 17 04:35:09 2007
@@ -46,7 +46,7 @@
     String outputfile;
     String outputdir = ".";
     String wsdlOutput;
-    String idlOutput;
+    String idlOutput;    
     ProcessorEnvironment env;
 
     public void process() throws ToolException {
@@ -123,7 +123,11 @@
             && env.optionSet(ToolConstants.CFG_BINDING)) {
             wsdlToCorbaBinding.mapBindingToInterface(env.get("porttype").toString(), env.get("binding")
                 .toString());
-        }
+        }            
+        if ((!env.optionSet(ToolConstants.CFG_PORTTYPE)) 
+            && !env.optionSet(ToolConstants.CFG_BINDING)) {
+            wsdlToCorbaBinding.setAllBindings(true);            
+        }  
         if (env.optionSet(ToolConstants.CFG_WSDLURL)) {
             wsdlToCorbaBinding.setWsdlFile(env.get("wsdlurl").toString());
         }
@@ -144,15 +148,19 @@
                 String portType = null;
                 if (env.optionSet(ToolConstants.CFG_PORTTYPE)) {
                     portType = env.get("porttype").toString();
-                } else {
-                    portType = wsdlToCorbaBinding.getInterfaceNames().get(0).toString();
-                }
-                if (portType != null) {
-                    String bindingName = wsdlToCorbaBinding.getMappedBindingName(portType);
-                    if (bindingName != null) {
-                        idlAction.setBindingName(bindingName);
+                    if (portType != null) {
+                        String bindingName = wsdlToCorbaBinding.getMappedBindingName(portType);
+                        if (bindingName != null) {
+                            idlAction.setBindingName(bindingName);
+                        }
                     }
+                } else {
+                    // generate idl for all bindings.                    
+                    idlAction.setGenerateAllBindings(true);                    
                 }
+                
+            } else {
+                idlAction.setGenerateAllBindings(true);
             }
         }
         if (env.optionSet(ToolConstants.CFG_WSDLURL)) {
@@ -180,9 +188,9 @@
     private void setOutputFile() {
         wsdlOutput = (String)env.get(ToolCorbaConstants.CFG_WSDLOUTPUT);
         idlOutput = (String)env.get(ToolCorbaConstants.CFG_IDLOUTPUT);
-        if ((wsdlOutput == null) && (idlOutput == null)) {
+        if ((wsdlOutput == null) && (idlOutput == null)) {        
             LOG.log(Level.WARNING,
-                    "Incorrect Output file name(s) specified. Using default wsdl/idl filenames...");
+                    "Using default wsdl/idl filenames...");
         }
     }
 

Modified: incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToIDLAction.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToIDLAction.java?view=diff&rev=538875&r1=538874&r2=538875
==============================================================================
--- incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToIDLAction.java (original)
+++ incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToIDLAction.java Thu May 17 04:35:09 2007
@@ -99,6 +99,7 @@
     private static String wsdlFileName;
     private static String namespace;
     private static boolean verboseOn;
+    private String[] outputFiles;
     private String outputFile;
     private PrintWriter printWriter;
     private OutputStreamFactory factory = new FileOutputStreamFactory();
@@ -107,6 +108,7 @@
     private IdlInterface intf;
     private ExtensionRegistry extReg;
     private WSDLToTypeProcessor typeProcessor = new WSDLToTypeProcessor(); 
+    private boolean generateAllBindings;    
 
     public WSDLToIDLAction() {
     }
@@ -125,14 +127,36 @@
             typeProcessor.setExtensionRegistry(extReg);
         }       
         
-        Binding binding = findBinding(def);
-        if (binding == null) {
-            String msgStr = "Binding " + bindingName + " doesn't exists in WSDL.";
-            org.apache.cxf.common.i18n.Message msg = 
-                new org.apache.cxf.common.i18n.Message(msgStr, LOG);
-            throw new Exception(msg.toString());
+        if (!isGenerateAllBindings()) {
+            Binding binding = findBinding(def);
+            if (binding == null) {
+                String msgStr = "Binding " + bindingName + " doesn't exists in WSDL.";
+                org.apache.cxf.common.i18n.Message msg = new org.apache.cxf.common.i18n.Message(msgStr, LOG);
+                throw new Exception(msg.toString());
+            }
+            generateIDL(def, binding);
+        } else {
+            // generate idl for all bindings in the file.
+            // each idl file will have the name of the binding.
+            Map bindingList = def.getAllBindings();
+            if (bindingList.size() == 0) {
+                String msgStr = "No bindings exists within this WSDL.";
+                org.apache.cxf.common.i18n.Message msg = new org.apache.cxf.common.i18n.Message(msgStr, LOG);
+                throw new Exception(msg.toString());
+            } else {
+                Iterator iter = bindingList.values().iterator();
+                int i = 0;
+                while (iter.hasNext()) {
+                    Binding binding = (Binding)iter.next();
+                    PrintWriter writer  = createPrintWriter(binding.getQName().getLocalPart(),
+                                                    outputFiles[i]);
+                    i++;
+                    setPrintWriter(writer);
+                    generateIDL(def, binding);
+                    root = IdlRoot.create();
+                }
+            }
         }
-        generateIDL(def, binding);
         
     }
 
@@ -170,7 +194,8 @@
 
         if (printWriter == null) {
             try {
-                printWriter = createPrintWriter(binding.getQName().getLocalPart());
+                printWriter = createPrintWriter(binding.getQName().getLocalPart(),
+                                                outputFile);
             } catch (Exception ex) {
                 ex.printStackTrace();
             }
@@ -798,8 +823,8 @@
         return enum1;
     }
 
-    private PrintWriter createPrintWriter(String bindName) throws Exception {
-        if (outputFile == null) {
+    private PrintWriter createPrintWriter(String bindName, String filename) throws Exception {        
+        if (filename == null || filename.length() <= 1) {            
             String nm[] = unscopeName(bindName);
             int pos = nm[nm.length - 1].lastIndexOf("Binding");
 
@@ -807,13 +832,16 @@
                 nm[nm.length - 1] = nm[nm.length - 1].substring(0, pos);
             }
 
-            outputFile = new String(nm[nm.length - 1] + ".idl");
+            filename = new String(nm[nm.length - 1] + ".idl");
+            LOG.log(Level.WARNING,
+                    "No file name specified for " + bindName + ". Using default " 
+                    + filename + " file...");
         }
 
-        OutputStream out = factory.createOutputStream(outputFile);
+        OutputStream out = factory.createOutputStream(filename);
 
         return new PrintWriter(out);
-    }
+    }            
 
     public void setOutputDirectory(String dir) {
         // Force directory creation
@@ -861,11 +889,21 @@
         return result;
     }
         
-    public void setOutputFile(String file) {
-        outputFile = new String(file);
+    public void setOutputFile(String file) {                
+        StringTokenizer tok = new StringTokenizer(file, ",");
+        String filenames[] = new String[tok.countTokens()];
+
+        int i = 0;
+        while (tok.hasMoreTokens()) {            
+            filenames[i] = tok.nextToken();
+            i++;
+        }
+        
+        outputFiles = filenames;
+        outputFile = new String(filenames[0]);
     }
     
-    public void setOutput(PrintWriter pw) {
+    public void setPrintWriter(PrintWriter pw) {
         printWriter = pw;
     }
  
@@ -892,5 +930,13 @@
     public String getNamespace() {
         return namespace;
     }
+    
+    public void setGenerateAllBindings(boolean all) {
+        generateAllBindings = all;
+    }
+    
+    public boolean isGenerateAllBindings() {
+        return generateAllBindings;
+    }        
 
 }

Modified: incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/WSDLToIDLTest.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/WSDLToIDLTest.java?view=diff&rev=538875&r1=538874&r2=538875
==============================================================================
--- incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/WSDLToIDLTest.java (original)
+++ incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/WSDLToIDLTest.java Thu May 17 04:35:09 2007
@@ -166,7 +166,7 @@
     public void testBindingGenSpecifiedFile() throws Exception {
 
         String[] cmdArgs = {"-corba", "-i", "BasePortType",
-                            "-o", "simpleList-corba_gen.wsdl",
+                            "-w", "simpleList-corba_gen.wsdl",
                             "-d", output.getCanonicalPath(),
                             getClass().getResource("/wsdl/simpleList.wsdl").toString()};
         int exc = execute(cmdArgs);

Modified: incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToCorbaBindingTypeTest.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToCorbaBindingTypeTest.java?view=diff&rev=538875&r1=538874&r2=538875
==============================================================================
--- incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToCorbaBindingTypeTest.java (original)
+++ incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToCorbaBindingTypeTest.java Thu May 17 04:35:09 2007
@@ -584,6 +584,14 @@
         }
     }
     
+    public void testMultipleBindings() throws Exception {
+        String fileName = getClass().getResource("/wsdl/multiplePortTypes.wsdl").toString();
+        generator.setWsdlFile(fileName);
+        generator.setAllBindings(true);
+        Definition model = generator.generateCORBABinding();
+        assertEquals("All bindings should be generated.", 2, model.getAllBindings().size());
+    }
+    
 
     
 }

Modified: incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToIDLGenerationTest.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToIDLGenerationTest.java?view=diff&rev=538875&r1=538874&r2=538875
==============================================================================
--- incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToIDLGenerationTest.java (original)
+++ incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToIDLGenerationTest.java Thu May 17 04:35:09 2007
@@ -23,6 +23,7 @@
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.File;
+import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
@@ -120,7 +121,7 @@
                 
         idlgen.setBindingName("BaseCORBABinding");
         idlgen.setOutputFile("oneway.idl");
-        idlgen.setOutput(new PrintWriter(idloutput));
+        idlgen.setPrintWriter(new PrintWriter(idloutput));
         idlgen.generateIDL(null);
 
         InputStream origstream = getClass().getResourceAsStream("/idlgen/expected_oneway.idl");
@@ -136,7 +137,7 @@
             
             idlgen.setBindingName("BasePortTypeCORBABinding");
             idlgen.setOutputFile("stringtypes.idl");
-            idlgen.setOutput(new PrintWriter(idloutput));
+            idlgen.setPrintWriter(new PrintWriter(idloutput));
             idlgen.generateIDL(null);
 
             InputStream origstream = getClass().getResourceAsStream("/idlgen/expected_stringtypes.idl");
@@ -155,7 +156,7 @@
             
             idlgen.setBindingName("BasePortTypeCORBABinding");
             idlgen.setOutputFile("integertypes.idl");
-            idlgen.setOutput(new PrintWriter(idloutput));
+            idlgen.setPrintWriter(new PrintWriter(idloutput));
             idlgen.generateIDL(null);
 
             InputStream origstream = getClass().getResourceAsStream("/idlgen/expected_integertypes.idl");
@@ -174,7 +175,7 @@
             
             idlgen.setBindingName("Test.MultiPartCORBABinding");
             idlgen.setOutputFile("uniontypes.idl");
-            idlgen.setOutput(new PrintWriter(idloutput));
+            idlgen.setPrintWriter(new PrintWriter(idloutput));
             idlgen.generateIDL(null);
 
             InputStream origstream = getClass().getResourceAsStream("/idlgen/expected_uniontypes.idl");
@@ -193,7 +194,7 @@
             
             idlgen.setBindingName("Test.MultiPartCORBABinding");
             idlgen.setOutputFile("defaultuniontypes.idl");
-            idlgen.setOutput(new PrintWriter(idloutput));
+            idlgen.setPrintWriter(new PrintWriter(idloutput));
             idlgen.generateIDL(null);
 
             InputStream origstream = getClass().getResourceAsStream("/idlgen/expected_defaultuniontypes.idl");
@@ -214,7 +215,7 @@
 
             idlgen.setBindingName("TestException.ExceptionTestCORBABinding");
             idlgen.setOutputFile("exceptiontypes.idl");
-            idlgen.setOutput(new PrintWriter(idloutput));
+            idlgen.setPrintWriter(new PrintWriter(idloutput));
             idlgen.generateIDL(null);
 
             InputStream origstream = getClass().getResourceAsStream("/idlgen/expected_exceptions.idl");
@@ -234,7 +235,7 @@
 
             idlgen.setBindingName("StructTestCORBABinding");
             idlgen.setOutputFile("structtypes.idl");
-            idlgen.setOutput(new PrintWriter(idloutput));
+            idlgen.setPrintWriter(new PrintWriter(idloutput));
             idlgen.generateIDL(null);
 
             InputStream origstream = getClass().getResourceAsStream("/idlgen/expected_struct.idl");
@@ -255,7 +256,7 @@
 
             idlgen.setBindingName("IACC.ServerCORBABinding");
             idlgen.setOutputFile("sequencetypes.idl");
-            idlgen.setOutput(new PrintWriter(idloutput));
+            idlgen.setPrintWriter(new PrintWriter(idloutput));
             idlgen.generateIDL(null);
 
             InputStream origstream = getClass().getResourceAsStream("/idlgen/expected_sequencetype.idl");
@@ -275,7 +276,7 @@
 
             idlgen.setBindingName("XCORBABinding");
             idlgen.setOutputFile("arraytypes.idl");
-            idlgen.setOutput(new PrintWriter(idloutput));
+            idlgen.setPrintWriter(new PrintWriter(idloutput));
             idlgen.generateIDL(null);
 
             InputStream origstream = getClass().getResourceAsStream("/idlgen/expected_array.idl");
@@ -296,7 +297,7 @@
             
             idlgen.setBindingName("BVOIPCORBABinding");
             idlgen.setOutputFile("enumtype.idl");
-            idlgen.setOutput(new PrintWriter(idloutput));
+            idlgen.setPrintWriter(new PrintWriter(idloutput));
             idlgen.generateIDL(null);
 
             InputStream origstream = getClass().getResourceAsStream("/idlgen/expected_enum.idl");
@@ -316,7 +317,7 @@
             
             idlgen.setBindingName("ContentCORBABinding");
             idlgen.setOutputFile("contenttype.idl");            
-            idlgen.setOutput(new PrintWriter(idloutput));
+            idlgen.setPrintWriter(new PrintWriter(idloutput));
             idlgen.generateIDL(null);
 
             InputStream origstream = getClass().getResourceAsStream("/idlgen/expected_content.idl");
@@ -336,7 +337,7 @@
             
             idlgen.setBindingName("BaseCORBABinding");
             idlgen.setOutputFile("alltype.idl");            
-            idlgen.setOutput(new PrintWriter(idloutput));
+            idlgen.setPrintWriter(new PrintWriter(idloutput));
             idlgen.generateIDL(null);
 
             InputStream origstream = getClass().getResourceAsStream("/idlgen/expected_alltype.idl");
@@ -356,7 +357,7 @@
             
             idlgen.setBindingName("YCORBABinding");
             idlgen.setOutputFile("fixed.idl");            
-            idlgen.setOutput(new PrintWriter(idloutput));
+            idlgen.setPrintWriter(new PrintWriter(idloutput));
             idlgen.generateIDL(null);
 
             InputStream origstream = getClass().getResourceAsStream("/idlgen/expected_fixed.idl");
@@ -376,7 +377,7 @@
             
             idlgen.setBindingName("XCORBABinding");
             idlgen.setOutputFile("anonfixed.idl");            
-            idlgen.setOutput(new PrintWriter(idloutput));
+            idlgen.setPrintWriter(new PrintWriter(idloutput));
             idlgen.generateIDL(null);
 
             InputStream origstream = getClass().getResourceAsStream("/idlgen/expected_anonfixed.idl");
@@ -396,7 +397,7 @@
             
             idlgen.setBindingName("anyInterfaceCORBABinding");
             idlgen.setOutputFile("any.idl");            
-            idlgen.setOutput(new PrintWriter(idloutput));
+            idlgen.setPrintWriter(new PrintWriter(idloutput));
             idlgen.generateIDL(null);
 
             InputStream origstream = getClass().getResourceAsStream("/idlgen/expected_any.idl");
@@ -417,7 +418,7 @@
             
             idlgen.setBindingName("TypeInheritanceInterfaceCORBABinding");
             idlgen.setOutputFile("typeInheritance.idl");            
-            idlgen.setOutput(new PrintWriter(idloutput));
+            idlgen.setPrintWriter(new PrintWriter(idloutput));
             idlgen.generateIDL(null);
 
             InputStream origstream = getClass().getResourceAsStream("/idlgen/expected_typeInheritance.idl");
@@ -437,7 +438,7 @@
             
             idlgen.setBindingName("NillableCORBABinding");
             idlgen.setOutputFile("nillable.idl");            
-            idlgen.setOutput(new PrintWriter(idloutput));
+            idlgen.setPrintWriter(new PrintWriter(idloutput));
             idlgen.generateIDL(null);
 
             InputStream origstream = getClass().getResourceAsStream("/idlgen/expected_nillable.idl");
@@ -457,7 +458,7 @@
             
             idlgen.setBindingName("XCORBABinding");
             idlgen.setOutputFile("typedef.idl");            
-            idlgen.setOutput(new PrintWriter(idloutput));
+            idlgen.setPrintWriter(new PrintWriter(idloutput));
             idlgen.generateIDL(null);
 
             InputStream origstream = getClass().getResourceAsStream("/idlgen/expected_typedef.idl");
@@ -477,7 +478,7 @@
             
             idlgen.setBindingName("TypeInheritanceCORBABinding");
             idlgen.setOutputFile("nested.idl");            
-            idlgen.setOutput(new PrintWriter(idloutput));
+            idlgen.setPrintWriter(new PrintWriter(idloutput));
             idlgen.generateIDL(null);
 
             InputStream origstream = getClass().getResourceAsStream("/idlgen/expected_nested.idl");
@@ -497,7 +498,7 @@
             
             idlgen.setBindingName("DerivedTypesCORBABinding");
             idlgen.setOutputFile("nested-derivedtypes.idl");            
-            idlgen.setOutput(new PrintWriter(idloutput));
+            idlgen.setPrintWriter(new PrintWriter(idloutput));
             idlgen.generateIDL(null);
 
             InputStream origstream = 
@@ -518,7 +519,7 @@
             
             idlgen.setBindingName("XCORBABinding");
             idlgen.setOutputFile("nested_complex.idl");            
-            idlgen.setOutput(new PrintWriter(idloutput));
+            idlgen.setPrintWriter(new PrintWriter(idloutput));
             idlgen.generateIDL(null);
 
             InputStream origstream = 
@@ -539,7 +540,7 @@
             
             idlgen.setBindingName("C.C1CORBABinding");
             idlgen.setOutputFile("nested_interfaces.idl");            
-            idlgen.setOutput(new PrintWriter(idloutput));
+            idlgen.setPrintWriter(new PrintWriter(idloutput));
             idlgen.generateIDL(null);
 
             InputStream origstream = 
@@ -560,7 +561,7 @@
             
             idlgen.setBindingName("BaseCORBABinding");
             idlgen.setOutputFile("datetime.idl");            
-            idlgen.setOutput(new PrintWriter(idloutput));
+            idlgen.setPrintWriter(new PrintWriter(idloutput));
             idlgen.generateIDL(null);
 
             InputStream origstream = 
@@ -581,7 +582,7 @@
             
             idlgen.setBindingName("TestServerCORBABinding");
             idlgen.setOutputFile("wsaddress_server.idl");            
-            idlgen.setOutput(new PrintWriter(idloutput));
+            idlgen.setPrintWriter(new PrintWriter(idloutput));
             idlgen.generateIDL(null);
 
             InputStream origstream = 
@@ -602,7 +603,7 @@
             
             idlgen.setBindingName("AccountCORBABinding");
             idlgen.setOutputFile("wsaddress_account.idl");            
-            idlgen.setOutput(new PrintWriter(idloutput));
+            idlgen.setPrintWriter(new PrintWriter(idloutput));
             idlgen.generateIDL(null);
 
             InputStream origstream = 
@@ -623,7 +624,7 @@
             
             idlgen.setBindingName("BankCORBABinding");
             idlgen.setOutputFile("wsaddress_bank.idl");            
-            idlgen.setOutput(new PrintWriter(idloutput));
+            idlgen.setPrintWriter(new PrintWriter(idloutput));
             idlgen.generateIDL(null);
 
             InputStream origstream = 
@@ -633,6 +634,39 @@
             checkIDLStrings(orig, idloutput.toByteArray());
         } finally {
             new File("wsaddressing_bank.idl").deleteOnExit();
+        }
+    }
+    
+    public void testMultipleBindingIdlgen() throws Exception {
+        
+        try {
+            String fileName = getClass().getResource("/idlgen/multiplebinding.wsdl").toString();
+            idlgen.setWsdlFile(fileName);
+                        
+            idlgen.setOutputFile("expected_test1.idl,expected_test2.idl");  
+            idlgen.setGenerateAllBindings(true);            
+            idlgen.generateIDL(null);
+
+            File file1 = new File("expected_test1.idl");            
+            File file2 = new File("expected_test2.idl");            
+            
+            InputStream origstream = 
+                getClass().getResourceAsStream("/idlgen/expected_test1.idl");
+            byte orig[] = inputStreamToBytes(origstream);            
+            InputStream actualStream = new FileInputStream(file1);                
+            byte actual[] = inputStreamToBytes(actualStream);
+            checkIDLStrings(orig, actual);
+            
+            origstream = 
+                getClass().getResourceAsStream("/idlgen/expected_test2.idl");
+            orig = inputStreamToBytes(origstream);
+            actualStream = new FileInputStream(file2);                
+            actual = inputStreamToBytes(actualStream);
+            checkIDLStrings(orig, actual);
+            
+        } finally {
+            new File("expected_test1.idl").deleteOnExit();
+            new File("expected_test2.idl").deleteOnExit();
         }
     }
 

Added: incubator/yoko/trunk/tools/src/test/resources/idlgen/expected_test1.idl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/idlgen/expected_test1.idl?view=auto&rev=538875
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/idlgen/expected_test1.idl (added)
+++ incubator/yoko/trunk/tools/src/test/resources/idlgen/expected_test1.idl Thu May 17 04:35:09 2007
@@ -0,0 +1,36 @@
+/*
+ * 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.
+*/
+module edell {
+    module test2 {
+        struct num2 {
+            long long2;
+        };
+    };
+    interface test1 {
+        struct num1 {
+            string str1;
+        };
+        num1
+        opNum1(
+            in num1 in1,
+            out num1 out1,
+            inout num1 inout1
+        );
+    };
+};

Added: incubator/yoko/trunk/tools/src/test/resources/idlgen/expected_test2.idl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/idlgen/expected_test2.idl?view=auto&rev=538875
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/idlgen/expected_test2.idl (added)
+++ incubator/yoko/trunk/tools/src/test/resources/idlgen/expected_test2.idl Thu May 17 04:35:09 2007
@@ -0,0 +1,36 @@
+/*
+ * 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.
+*/
+module edell {
+    module test1 {
+        struct num1 {
+            string str1;
+        };
+    };
+    interface test2 {
+        struct num2 {
+            long long2;
+        };
+        num2
+        opNum2(
+            in num2 in2,
+            out num2 out2,
+            inout num2 inout2
+        );
+    };
+};

Added: incubator/yoko/trunk/tools/src/test/resources/idlgen/multiplebinding.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/idlgen/multiplebinding.wsdl?view=auto&rev=538875
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/idlgen/multiplebinding.wsdl (added)
+++ incubator/yoko/trunk/tools/src/test/resources/idlgen/multiplebinding.wsdl Thu May 17 04:35:09 2007
@@ -0,0 +1,161 @@
+<?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/multiplebinding" xmlns:tns="http://schemas.apache.org/yoko/idl/multiplebinding" 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/multiplebinding/typemap">
+    <corba:struct xmlns:ns4="http://schemas.apache.org/yoko/idl/multiplebinding" xmlns="http://schemas.apache.org/yoko/idl/multiplebinding/typemap" repositoryID="IDL:edell/test1/num1:1.0" name="edell.test1.num1" type="ns4:edell.test1.num1">
+      <corba:member name="str1" idltype="corba:string" />
+    </corba:struct>
+    <corba:struct xmlns:ns4="http://schemas.apache.org/yoko/idl/multiplebinding" xmlns="http://schemas.apache.org/yoko/idl/multiplebinding/typemap" repositoryID="IDL:edell/test2/num2:1.0" name="edell.test2.num2" type="ns4:edell.test2.num2">
+      <corba:member name="long2" idltype="corba:long" />
+    </corba:struct>
+  </corba:typeMapping>
+  <wsdl:types>
+    <xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://schemas.apache.org/yoko/idl/multiplebinding" xmlns="http://schemas.apache.org/yoko/idl/multiplebinding" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+      <xs:complexType name="edell.test1.num1">
+        <xs:sequence>
+          <xs:element name="str1" type="xs:string">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:element name="opNum1">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="in1" type="edell.test1.num1">
+            </xs:element>
+            <xs:element name="inout1" type="edell.test1.num1">
+            </xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <xs:element name="opNum1Response">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="return" type="edell.test1.num1">
+            </xs:element>
+            <xs:element name="out1" type="edell.test1.num1">
+            </xs:element>
+            <xs:element name="inout1" type="edell.test1.num1">
+            </xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <xs:complexType name="edell.test2.num2">
+        <xs:sequence>
+          <xs:element name="long2" type="xs:int">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:element name="opNum2">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="in2" type="edell.test2.num2">
+            </xs:element>
+            <xs:element name="inout2" type="edell.test2.num2">
+            </xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <xs:element name="opNum2Response">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="return" type="edell.test2.num2">
+            </xs:element>
+            <xs:element name="out2" type="edell.test2.num2">
+            </xs:element>
+            <xs:element name="inout2" type="edell.test2.num2">
+            </xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+    </xs:schema>
+  </wsdl:types>
+  <wsdl:message name="opNum2">
+    <wsdl:part name="inparameter" element="tns:opNum2">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="opNum1Response">
+    <wsdl:part name="outparameter" element="tns:opNum1Response">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="opNum1">
+    <wsdl:part name="inparameter" element="tns:opNum1">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="opNum2Response">
+    <wsdl:part name="outparameter" element="tns:opNum2Response">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:portType name="edell.test1">
+    <wsdl:operation name="opNum1">
+      <wsdl:input name="opNum1Request" message="tns:opNum1">
+    </wsdl:input>
+      <wsdl:output name="opNum1Response" message="tns:opNum1Response">
+    </wsdl:output>
+    </wsdl:operation>
+  </wsdl:portType>
+  <wsdl:portType name="edell.test2">
+    <wsdl:operation name="opNum2">
+      <wsdl:input name="opNum2Request" message="tns:opNum2">
+    </wsdl:input>
+      <wsdl:output name="opNum2Response" message="tns:opNum2Response">
+    </wsdl:output>
+    </wsdl:operation>
+  </wsdl:portType>
+  <wsdl:binding name="edell.test1CORBABinding" type="tns:edell.test1">
+    <corba:binding repositoryID="IDL:edell/test1:1.0" />
+    <wsdl:operation name="opNum1">
+      <corba:operation name="opNum1">
+        <corba:param xmlns="http://schemas.apache.org/yoko/idl/multiplebinding/typemap" mode="in" name="in1" idltype="edell.test1.num1" />
+        <corba:param xmlns="http://schemas.apache.org/yoko/idl/multiplebinding/typemap" mode="out" name="out1" idltype="edell.test1.num1" />
+        <corba:param xmlns="http://schemas.apache.org/yoko/idl/multiplebinding/typemap" mode="inout" name="inout1" idltype="edell.test1.num1" />
+        <corba:return xmlns="http://schemas.apache.org/yoko/idl/multiplebinding/typemap" name="return" idltype="edell.test1.num1" />
+      </corba:operation>
+      <wsdl:input name="opNum1Request">
+      </wsdl:input>
+      <wsdl:output name="opNum1Response">
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:binding name="edell.test2CORBABinding" type="tns:edell.test2">
+    <corba:binding repositoryID="IDL:edell/test2:1.0" />
+    <wsdl:operation name="opNum2">
+      <corba:operation name="opNum2">
+        <corba:param xmlns="http://schemas.apache.org/yoko/idl/multiplebinding/typemap" mode="in" name="in2" idltype="edell.test2.num2" />
+        <corba:param xmlns="http://schemas.apache.org/yoko/idl/multiplebinding/typemap" mode="out" name="out2" idltype="edell.test2.num2" />
+        <corba:param xmlns="http://schemas.apache.org/yoko/idl/multiplebinding/typemap" mode="inout" name="inout2" idltype="edell.test2.num2" />
+        <corba:return xmlns="http://schemas.apache.org/yoko/idl/multiplebinding/typemap" name="return" idltype="edell.test2.num2" />
+      </corba:operation>
+      <wsdl:input name="opNum2Request">
+      </wsdl:input>
+      <wsdl:output name="opNum2Response">
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:service name="edell.test1CORBAService">
+    <wsdl:port name="edell.test1CORBAPort" binding="tns:edell.test1CORBABinding">
+      <corba:address location="IOR:" />
+    </wsdl:port>
+  </wsdl:service>
+  <wsdl:service name="edell.test2CORBAService">
+    <wsdl:port name="edell.test2CORBAPort" binding="tns:edell.test2CORBABinding">
+      <corba:address location="IOR:" />
+    </wsdl:port>
+  </wsdl:service>
+</wsdl:definitions>

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

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

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

Added: incubator/yoko/trunk/tools/src/test/resources/wsdl/multiplePortTypes.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/wsdl/multiplePortTypes.wsdl?view=auto&rev=538875
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/wsdl/multiplePortTypes.wsdl (added)
+++ incubator/yoko/trunk/tools/src/test/resources/wsdl/multiplePortTypes.wsdl Thu May 17 04:35:09 2007
@@ -0,0 +1,113 @@
+<?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/multiplebinding" xmlns:tns="http://schemas.apache.org/yoko/idl/multiplebinding" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+  <wsdl:types>
+    <xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://schemas.apache.org/yoko/idl/multiplebinding" xmlns="http://schemas.apache.org/yoko/idl/multiplebinding" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+      <xs:complexType name="edell.test1.num1">
+        <xs:sequence>
+          <xs:element name="str1" type="xs:string">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:element name="opNum1">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="in1" type="edell.test1.num1">
+            </xs:element>
+            <xs:element name="inout1" type="edell.test1.num1">
+            </xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <xs:element name="opNum1Response">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="return" type="edell.test1.num1">
+            </xs:element>
+            <xs:element name="out1" type="edell.test1.num1">
+            </xs:element>
+            <xs:element name="inout1" type="edell.test1.num1">
+            </xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <xs:complexType name="edell.test2.num2">
+        <xs:sequence>
+          <xs:element name="long2" type="xs:int">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:element name="opNum2">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="in2" type="edell.test2.num2">
+            </xs:element>
+            <xs:element name="inout2" type="edell.test2.num2">
+            </xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <xs:element name="opNum2Response">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="return" type="edell.test2.num2">
+            </xs:element>
+            <xs:element name="out2" type="edell.test2.num2">
+            </xs:element>
+            <xs:element name="inout2" type="edell.test2.num2">
+            </xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+    </xs:schema>
+  </wsdl:types>
+  <wsdl:message name="opNum2">
+    <wsdl:part name="inparameter" element="tns:opNum2">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="opNum1Response">
+    <wsdl:part name="outparameter" element="tns:opNum1Response">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="opNum1">
+    <wsdl:part name="inparameter" element="tns:opNum1">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="opNum2Response">
+    <wsdl:part name="outparameter" element="tns:opNum2Response">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:portType name="edell.test1">
+    <wsdl:operation name="opNum1">
+      <wsdl:input name="opNum1Request" message="tns:opNum1">
+    </wsdl:input>
+      <wsdl:output name="opNum1Response" message="tns:opNum1Response">
+    </wsdl:output>
+    </wsdl:operation>
+  </wsdl:portType>
+  <wsdl:portType name="edell.test2">
+    <wsdl:operation name="opNum2">
+      <wsdl:input name="opNum2Request" message="tns:opNum2">
+    </wsdl:input>
+      <wsdl:output name="opNum2Response" message="tns:opNum2Response">
+    </wsdl:output>
+    </wsdl:operation>
+  </wsdl:portType>  
+</wsdl:definitions>

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

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

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

Added: incubator/yoko/trunk/tools/src/test/resources/wsdl/multiplebinding.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/wsdl/multiplebinding.wsdl?view=auto&rev=538875
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/wsdl/multiplebinding.wsdl (added)
+++ incubator/yoko/trunk/tools/src/test/resources/wsdl/multiplebinding.wsdl Thu May 17 04:35:09 2007
@@ -0,0 +1,161 @@
+<?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/multiplebinding" xmlns:tns="http://schemas.apache.org/yoko/idl/multiplebinding" 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/multiplebinding/typemap">
+    <corba:struct xmlns:ns4="http://schemas.apache.org/yoko/idl/multiplebinding" xmlns="http://schemas.apache.org/yoko/idl/multiplebinding/typemap" repositoryID="IDL:edell/test1/num1:1.0" name="edell.test1.num1" type="ns4:edell.test1.num1">
+      <corba:member name="str1" idltype="corba:string" />
+    </corba:struct>
+    <corba:struct xmlns:ns4="http://schemas.apache.org/yoko/idl/multiplebinding" xmlns="http://schemas.apache.org/yoko/idl/multiplebinding/typemap" repositoryID="IDL:edell/test2/num2:1.0" name="edell.test2.num2" type="ns4:edell.test2.num2">
+      <corba:member name="long2" idltype="corba:long" />
+    </corba:struct>
+  </corba:typeMapping>
+  <wsdl:types>
+    <xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://schemas.apache.org/yoko/idl/multiplebinding" xmlns="http://schemas.apache.org/yoko/idl/multiplebinding" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+      <xs:complexType name="edell.test1.num1">
+        <xs:sequence>
+          <xs:element name="str1" type="xs:string">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:element name="opNum1">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="in1" type="edell.test1.num1">
+            </xs:element>
+            <xs:element name="inout1" type="edell.test1.num1">
+            </xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <xs:element name="opNum1Response">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="return" type="edell.test1.num1">
+            </xs:element>
+            <xs:element name="out1" type="edell.test1.num1">
+            </xs:element>
+            <xs:element name="inout1" type="edell.test1.num1">
+            </xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <xs:complexType name="edell.test2.num2">
+        <xs:sequence>
+          <xs:element name="long2" type="xs:int">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:element name="opNum2">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="in2" type="edell.test2.num2">
+            </xs:element>
+            <xs:element name="inout2" type="edell.test2.num2">
+            </xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <xs:element name="opNum2Response">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="return" type="edell.test2.num2">
+            </xs:element>
+            <xs:element name="out2" type="edell.test2.num2">
+            </xs:element>
+            <xs:element name="inout2" type="edell.test2.num2">
+            </xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+    </xs:schema>
+  </wsdl:types>
+  <wsdl:message name="opNum2">
+    <wsdl:part name="inparameter" element="tns:opNum2">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="opNum1Response">
+    <wsdl:part name="outparameter" element="tns:opNum1Response">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="opNum1">
+    <wsdl:part name="inparameter" element="tns:opNum1">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="opNum2Response">
+    <wsdl:part name="outparameter" element="tns:opNum2Response">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:portType name="edell.test1">
+    <wsdl:operation name="opNum1">
+      <wsdl:input name="opNum1Request" message="tns:opNum1">
+    </wsdl:input>
+      <wsdl:output name="opNum1Response" message="tns:opNum1Response">
+    </wsdl:output>
+    </wsdl:operation>
+  </wsdl:portType>
+  <wsdl:portType name="edell.test2">
+    <wsdl:operation name="opNum2">
+      <wsdl:input name="opNum2Request" message="tns:opNum2">
+    </wsdl:input>
+      <wsdl:output name="opNum2Response" message="tns:opNum2Response">
+    </wsdl:output>
+    </wsdl:operation>
+  </wsdl:portType>
+  <wsdl:binding name="edell.test1CORBABinding" type="tns:edell.test1">
+    <corba:binding repositoryID="IDL:edell/test1:1.0" />
+    <wsdl:operation name="opNum1">
+      <corba:operation name="opNum1">
+        <corba:param xmlns="http://schemas.apache.org/yoko/idl/multiplebinding/typemap" mode="in" name="in1" idltype="edell.test1.num1" />
+        <corba:param xmlns="http://schemas.apache.org/yoko/idl/multiplebinding/typemap" mode="out" name="out1" idltype="edell.test1.num1" />
+        <corba:param xmlns="http://schemas.apache.org/yoko/idl/multiplebinding/typemap" mode="inout" name="inout1" idltype="edell.test1.num1" />
+        <corba:return xmlns="http://schemas.apache.org/yoko/idl/multiplebinding/typemap" name="return" idltype="edell.test1.num1" />
+      </corba:operation>
+      <wsdl:input name="opNum1Request">
+      </wsdl:input>
+      <wsdl:output name="opNum1Response">
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:binding name="edell.test2CORBABinding" type="tns:edell.test2">
+    <corba:binding repositoryID="IDL:edell/test2:1.0" />
+    <wsdl:operation name="opNum2">
+      <corba:operation name="opNum2">
+        <corba:param xmlns="http://schemas.apache.org/yoko/idl/multiplebinding/typemap" mode="in" name="in2" idltype="edell.test2.num2" />
+        <corba:param xmlns="http://schemas.apache.org/yoko/idl/multiplebinding/typemap" mode="out" name="out2" idltype="edell.test2.num2" />
+        <corba:param xmlns="http://schemas.apache.org/yoko/idl/multiplebinding/typemap" mode="inout" name="inout2" idltype="edell.test2.num2" />
+        <corba:return xmlns="http://schemas.apache.org/yoko/idl/multiplebinding/typemap" name="return" idltype="edell.test2.num2" />
+      </corba:operation>
+      <wsdl:input name="opNum2Request">
+      </wsdl:input>
+      <wsdl:output name="opNum2Response">
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:service name="edell.test1CORBAService">
+    <wsdl:port name="edell.test1CORBAPort" binding="tns:edell.test1CORBABinding">
+      <corba:address location="IOR:" />
+    </wsdl:port>
+  </wsdl:service>
+  <wsdl:service name="edell.test2CORBAService">
+    <wsdl:port name="edell.test2CORBAPort" binding="tns:edell.test2CORBABinding">
+      <corba:address location="IOR:" />
+    </wsdl:port>
+  </wsdl:service>
+</wsdl:definitions>

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

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

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