incubator-yoko-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eno...@apache.org
Subject svn commit: r538201 - in /incubator/yoko/trunk/tools/src: main/java/org/apache/yoko/tools/processors/idl/ test/java/org/apache/yoko/tools/processors/ test/resources/idl/
Date Tue, 15 May 2007 15:17:59 GMT
Author: enolan
Date: Tue May 15 08:17:58 2007
New Revision: 538201

URL: http://svn.apache.org/viewvc?view=rev&rev=538201
Log:
Some updates for schema options and adding more tests.

Added:
    incubator/yoko/trunk/tools/src/test/resources/idl/expected_OptionL.wsdl   (with props)
    incubator/yoko/trunk/tools/src/test/resources/idl/expected_OptionP.wsdl   (with props)
    incubator/yoko/trunk/tools/src/test/resources/idl/expected_OptionsLT.wsdl   (with props)
    incubator/yoko/trunk/tools/src/test/resources/idl/expected_OptionsPT.wsdl   (with props)
Modified:
    incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/IDLToWSDLProcessor.java
    incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/IDLToWSDLGenerationTest.java
    incubator/yoko/trunk/tools/src/test/resources/idl/expected_LogicalLPT.wsdl
    incubator/yoko/trunk/tools/src/test/resources/idl/expected_LogicalLT.wsdl
    incubator/yoko/trunk/tools/src/test/resources/idl/expected_OptionsSchema.wsdl
    incubator/yoko/trunk/tools/src/test/resources/idl/expected_PhysicalLP.wsdl
    incubator/yoko/trunk/tools/src/test/resources/idl/expected_PhysicalLPT.wsdl
    incubator/yoko/trunk/tools/src/test/resources/idl/expected_PhysicalPT.wsdl

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=538201&r1=538200&r2=538201
==============================================================================
--- 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
Tue May 15 08:17:58 2007
@@ -187,6 +187,13 @@
         }
     }
     
+    // Sets the output directory and the generated filenames.
+    // Output directory is specified 
+    //     - File names have no path specified
+    //     - File names do have specified so they take precedence.
+    // Output directory is not specified
+    //     - File names have no path specified so use current directory.
+    //     - File names have full path specified.
     private void writeDefinitions(WSDLASTVisitor visitor) 
         throws Exception {
         
@@ -204,43 +211,45 @@
             if (logical == null || physical == null) {
                 if (outputWriter == null) {
                     outputWriter = getOutputWriter(idl + ".wsdl", outputDir);
-                    String separator = System.getProperty("file.separator");
-                    File file = null;
-                    if (env.get(ToolConstants.CFG_OUTPUTDIR) != null) {
-                        file = new File(outputDir + separator + idl + ".wsdl");
-                    } else {
-                        file = new File(idl + ".wsdl");
-                    }                                       
-                    visitor.setIdlFile(file.getAbsolutePath());
                 }
+                String separator = System.getProperty("file.separator");
+                File file = null;
+                if (env.get(ToolConstants.CFG_OUTPUTDIR) != null) {
+                    file = new File(outputDir + separator + idl + ".wsdl");             
          
+                } else {
+                    file = new File(idl + ".wsdl");                        
+                }   
+                visitor.setIdlFile(file.getAbsolutePath());                             
      
             }            
             
-            if (logical != null && logicalOutputWriter == null) {
-                logicalOutputWriter = getOutputWriter(logical, outputDir);
-                logical = getFilePath(logical).toString();               
-            }
-            if (physical != null && physicalOutputWriter == null) {
-                physicalOutputWriter = getOutputWriter(physical, outputDir);
-                physical = getFilePath(physical).toString();
-            }
+            if (logical != null) {                
+                logical = getFilePath(logical).getAbsolutePath();
+                if  (logicalOutputWriter == null) {
+                    logicalOutputWriter = createOutputWriter(logical);                  
 
+                }                                  
+            }
+                            
+            if (physical != null) {               
+                physical = getFilePath(physical).getAbsolutePath();
+                if (physicalOutputWriter == null) {            
+                    physicalOutputWriter = createOutputWriter(physical); 
+                }                                
+            }            
             
-            if (schemaFilename != null && schemaOutputWriter == null) {
-                schemaOutputWriter = getOutputWriter(schemaFilename, outputDir);
-                File file = getFilePath(schemaFilename);
+            if (schemaFilename != null) {                
+                schemaFilename = getFilePath(schemaFilename).getAbsolutePath();
+                if (schemaOutputWriter == null) {            
+                    schemaOutputWriter = createOutputWriter(schemaFilename); 
+                }    
+                File file = new File(schemaFilename);                
                 URI uri = file.toURI();
-                schemaFilename = uri.toString();                                
+                schemaFilename = uri.toString();                                        
  
             }
+                        
             if (importSchemaFilename != null) {
                 importSchemaFilename = getImportFile(importSchemaFilename);             
 
                 visitor.setImportSchema(importSchemaFilename);
-            }
-         
-            if (logical != null && physical != null) {
-                if (isFQPath(logical) && isFQPath(physical)
-                    && (env.get(ToolConstants.CFG_OUTPUTDIR) != null)) {        
                  
-                    // ouptut a warning.
-                }
-            }
+            }                     
                         
             visitor.setOutputDir(outputDir);   
             visitor.writeDefinitions(outputWriter, schemaOutputWriter,
@@ -254,6 +263,7 @@
         }         
     }
     
+    // Get the imported schema file.
     private String getImportFile(String importFilename) {
         // check that file exists        
         File file = new File(importFilename);                        
@@ -289,8 +299,17 @@
         return file.isAbsolute();
     }
     
-    // get the fully qualified path for a file.
-    private File getFilePath(String ifile) {
+    private Writer createOutputWriter(String name) throws Exception {        
+        String outDir = outputDir;
+        String filename = name;               
+        int index = name.lastIndexOf(System.getProperty("file.separator"));
+        outDir = name.substring(0, index);
+        filename = name.substring(index + 1, name.length());                        
+        return getOutputWriter(filename, outDir);        
+    }
+    
+    // Gets the fully qualified path of a file.
+    private File getFilePath(String ifile) {        
         String separator = System.getProperty("file.separator");
         StringTokenizer token = new StringTokenizer(ifile, separator);        
 
@@ -301,10 +320,9 @@
                 return new File(ifile);
             }
         } else {
-            return new File(ifile);                       
-        }        
+            return new File(ifile);
+        }                           
     }           
-
     
     private Writer getOutputWriter(String filename, String outputDirectory) throws Exception
{
 

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=538201&r1=538200&r2=538201
==============================================================================
--- 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
Tue May 15 08:17:58 2007
@@ -19,8 +19,14 @@
 
 package org.apache.yoko.tools.processors;
 
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
 import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
 import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
 import java.net.URL;
 import java.util.HashMap;
 import java.util.Map;
@@ -29,7 +35,6 @@
 import javax.xml.stream.XMLStreamReader;
 
 import junit.framework.TestCase;
-
 import org.apache.yoko.tools.common.ProcessorEnvironment;
 import org.apache.yoko.tools.common.ToolCorbaConstants;
 import org.apache.yoko.tools.processors.idl.IDLToWSDLProcessor;
@@ -246,152 +251,190 @@
         testWSDLGeneration("/idl/ConstScopename.idl", "/idl/expected_ConstScopename.wsdl");
     }
     
-    public void testLogicalPhysicalSchemaGeneration(String sourceIdlFilename, String sourceLogicalName,
-                                                    String sourcePhysicalName, String sourceSchemaFilename,
-                                                    String expectedLogicalName, String expectedPhysicalName,
-                                                    String expectedSchemaFilename) throws
Exception {
-
-        URL idl = getClass().getResource(sourceIdlFilename);
+    public void testLogicalPhysicalSchemaGeneration(String idlFilename, 
+                                             String logicalName,
+                                             String physicalName, 
+                                             String schemaFilename,
+                                             String defaultFilename,
+                                             String importName,
+                                             String defaultImportName) throws Exception {
 
+        URL idl = getClass().getResource(idlFilename);
         ProcessorEnvironment env = new ProcessorEnvironment();
         Map<String, Object> cfg = new HashMap<String, Object>();
         cfg.put(ToolCorbaConstants.CFG_IDLFILE, idl.getFile());
-        if (sourceLogicalName != null) {
-            cfg.put(ToolCorbaConstants.CFG_LOGICAL, sourceLogicalName);
+        if (logicalName != null) {
+            cfg.put(ToolCorbaConstants.CFG_LOGICAL, logicalName);
         }
-        if (sourcePhysicalName != null) {
-            cfg.put(ToolCorbaConstants.CFG_PHYSICAL, sourcePhysicalName);
+        if (physicalName != null) {
+            cfg.put(ToolCorbaConstants.CFG_PHYSICAL, physicalName);
         }
-        if (sourceSchemaFilename != null) {
-            cfg.put(ToolCorbaConstants.CFG_SCHEMA, sourceSchemaFilename);
+        if (schemaFilename != null) {
+            cfg.put(ToolCorbaConstants.CFG_SCHEMA, schemaFilename);
         }
 
         env.setParameters(cfg);
         IDLToWSDLProcessor processor = new IDLToWSDLProcessor();
-        processor.setEnvironment(env);        
+        processor.setEnvironment(env);    
+        java.io.CharArrayWriter outD = new java.io.CharArrayWriter();
+        processor.setOutputWriter(outD);
         java.io.CharArrayWriter outL = new java.io.CharArrayWriter();
-        processor.setLogicalOutputWriter(outL);
         java.io.CharArrayWriter outP = new java.io.CharArrayWriter();
-        processor.setPhysicalOutputWriter(outP);
         java.io.CharArrayWriter outS = new java.io.CharArrayWriter();
-        processor.setSchemaOutputWriter(outS);
-        processor.process();
-
-        if (expectedLogicalName != null) {
-            InputStream origLogicalStream = getClass().getResourceAsStream(expectedLogicalName);
-            InputStream actualLogicalStream = new ByteArrayInputStream(outL.toString().getBytes());
-            XMLStreamReader orig = factory.createXMLStreamReader(origLogicalStream);
-            XMLStreamReader actual = factory.createXMLStreamReader(actualLogicalStream);
-            wsdlGenTester.compare(orig, actual);
+        if (logicalName != null) {            
+            processor.setLogicalOutputWriter(outL);
         }
-
-        if (expectedPhysicalName != null) {
-            InputStream origPhysicalStream = getClass().getResourceAsStream(expectedPhysicalName);
-            InputStream actualPhysicalStream = new ByteArrayInputStream(outP.toString().getBytes());
-            XMLStreamReader orig = factory.createXMLStreamReader(origPhysicalStream);
-            XMLStreamReader actual = factory.createXMLStreamReader(actualPhysicalStream);
-            wsdlGenTester.compare(orig, actual);
+        if (physicalName != null) {            
+            processor.setPhysicalOutputWriter(outP);
         }
-
-        if (expectedSchemaFilename != null) {
-            InputStream origSchemaStream = getClass().getResourceAsStream(expectedSchemaFilename);
+        if (schemaFilename != null) {            
+            processor.setSchemaOutputWriter(outS);
+        }
+        processor.process();        
+        
+        String userdir = System.getProperty("user.dir");
+        String sep = System.getProperty("file.separator");                    
+        File file = file = new File(userdir + sep + importName);            
+        String location = file.toURI().toString();
+        File schemaFile = new File(userdir + sep + schemaFilename);                     
 
+        String schemaLocation = schemaFile.toURI().toString();
+        File defaultFile = new File(userdir + sep + defaultImportName);                 
     
+        String defaultLocation = defaultFile.toURI().toString();
+         
+        
+        if (logicalName != null) {                
+            testCompare(logicalName, outL, schemaLocation);            
+        }
+        
+        if (physicalName != null) {
+            testCompare(physicalName, outP, location);            
+        }
+                
+        if (schemaFilename != null) {                        
+            InputStream origSchemaStream = getClass().getResourceAsStream("/idl/" + schemaFilename);
             InputStream actualSchemaStream = new ByteArrayInputStream(outS.toString().getBytes());
             XMLStreamReader orig = factory.createXMLStreamReader(origSchemaStream);
             XMLStreamReader actual = factory.createXMLStreamReader(actualSchemaStream);
             wsdlGenTester.compare(orig, actual);
         }
-    } 
-    
-    
+        
+        if (defaultFilename != null) {                
+            testCompare(defaultFilename, outD, defaultLocation);            
+        }
+        
+    }         
     
-    public void testSchemaGeneration(String sourceIdlFilename, String sourceSchemaFilename,
-                                     String expectedDefaultName, String expectedSchemaFilename)
+    public boolean testCompare(String filename, java.io.CharArrayWriter outWriter, String
location)
         throws Exception {
-        URL idl = getClass().getResource(sourceIdlFilename);
-        ProcessorEnvironment env = new ProcessorEnvironment();
-        Map<String, Object> cfg = new HashMap<String, Object>();
-        cfg.put(ToolCorbaConstants.CFG_IDLFILE, idl.getFile());
-        if (sourceSchemaFilename != null) {
-            cfg.put(ToolCorbaConstants.CFG_SCHEMA, sourceSchemaFilename);
+        try {
+            InputStream origExpectedStream = getClass().getResourceAsStream("/idl/" + filename);
+            ByteArrayInputStream expectedByteStream = get(origExpectedStream, location);
+            InputStream actualPhysicalStream = new ByteArrayInputStream(outWriter.toString().getBytes());
+            ByteArrayInputStream  actualByteStream = get(actualPhysicalStream, location);
+            XMLStreamReader orig = factory.createXMLStreamReader(expectedByteStream);
+            XMLStreamReader actual = factory.createXMLStreamReader(actualByteStream);
+            wsdlGenTester.compare(orig, actual);
+        } catch (Exception ex) {
+            throw ex;
+        }
+        return true;
+    }
+    
+    public ByteArrayInputStream get(InputStream stream, String location) throws Exception
{
+        try {
+            BufferedReader br = new BufferedReader(new InputStreamReader(stream));
+            ByteArrayOutputStream bos = new ByteArrayOutputStream();
+            BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(bos));
+            String line = br.readLine();
+            while (null != line) {
+                // replace line if necessary
+                String modifiedLine = line;
+                if (location != null) {
+                    modifiedLine = line.replace("@LOCATION@", location);
+                }
+                bw.write(modifiedLine);
+                line = br.readLine();
+            }
+            bw.close();
+            return new ByteArrayInputStream(bos.toByteArray()); 
+        } catch (Exception ex) {
+            throw ex;
         }
-
-        env.setParameters(cfg);
-        IDLToWSDLProcessor processor = new IDLToWSDLProcessor();
-        processor.setEnvironment(env);
-        java.io.CharArrayWriter out = new java.io.CharArrayWriter();
-        processor.setOutputWriter(out);
-        java.io.CharArrayWriter outS = new java.io.CharArrayWriter();
-        processor.setSchemaOutputWriter(outS);
-        processor.process();
-
-        InputStream origSchemaStream = getClass().getResourceAsStream(expectedSchemaFilename);
-        InputStream actualSchemaStream = new ByteArrayInputStream(outS.toString().getBytes());
-        XMLStreamReader orig = factory.createXMLStreamReader(origSchemaStream);
-        XMLStreamReader actual = factory.createXMLStreamReader(actualSchemaStream);
-        wsdlGenTester.compare(orig, actual);
-
-        InputStream origDefaultStream = getClass().getResourceAsStream(expectedDefaultName);
-        InputStream actualDefaultStream = new ByteArrayInputStream(out.toString().getBytes());
-        orig = factory.createXMLStreamReader(origDefaultStream);
-        actual = factory.createXMLStreamReader(actualDefaultStream);
-        wsdlGenTester.compare(orig, actual);
-
     }
     
+    
     public void testSchemaOnly() throws Exception {
         // This tests if -T option is only passed.
-        testSchemaGeneration("/idl/OptionsSchema.idl", "expected_Schema.xsd", 
-                             "/idl/expected_OptionsSchema.wsdl", "/idl/expected_Schema.xsd");
+        testLogicalPhysicalSchemaGeneration("/idl/OptionsSchema.idl", 
+                                            null, null,
+                                            "expected_Schema.xsd",
+                                            "expected_OptionsSchema.wsdl",
+                                            "expected_Schema.xsd",
+                                            "expected_Schema.xsd");
     }
     
-    public void testPhysicalSchema() throws Exception {
-        // This tests if -P and -T options are passed.
+    
+    // default files generated in user dir - no full path specified.
+    // This tests if -P and -T options are passed.
+    public void testPhysicalSchema() throws Exception { 
         testLogicalPhysicalSchemaGeneration("/idl/OptionsPT.idl", null,
-                                            "expected_PhysicalPT.wsdl", 
-                                            "expected_SchemaPT.xsd", null, 
-                                            "/idl/expected_PhysicalPT.wsdl",
-                                            "/idl/expected_SchemaPT.xsd");
+                                        "expected_PhysicalPT.wsdl", 
+                                        "expected_SchemaPT.xsd",
+                                        "expected_OptionsPT.wsdl",
+                                        "OptionsPT.wsdl",
+                                        "expected_SchemaPT.xsd");                       
             
     }
-        
+            
     public void testLogicalSchema() throws Exception {
         // This tests -L and -T options are passed.
-        testLogicalPhysicalSchemaGeneration("/idl/OptionsLT.idl", "expected_LogicalLT.wsdl",
+        testLogicalPhysicalSchemaGeneration("/idl/OptionsLT.idl", 
+                                            "expected_LogicalLT.wsdl",
                                             null, "expected_SchemaLT.xsd",
-                                            "/idl/expected_LogicalLT.wsdl", null,
-                                            "/idl/expected_SchemaLT.xsd");       
+                                            "expected_OptionsLT.wsdl",
+                                            "OptionsLT.wsdl",
+                                            "expected_LogicalLT.wsdl");       
     }
 
 
     public void testLogicalOnly() throws Exception {
         // This tests if only -L option is passed.
-        testLogicalPhysicalSchemaGeneration("/idl/OptionL.idl", "expected_Logical.wsdl",
-                                            null, null, "/idl/expected_Logical.wsdl", 
-                                            null, null);
+        testLogicalPhysicalSchemaGeneration("/idl/OptionL.idl", 
+                                            "expected_Logical.wsdl",
+                                            null, null,
+                                            "expected_OptionL.wsdl",
+                                            "expected_Logical.wsdl",
+                                            "expected_Logical.wsdl");
     }
     
     public void testLogicalPhysical() throws Exception {
         // This tests if -L and -P options are passed.
         testLogicalPhysicalSchemaGeneration("/idl/OptionsLP.idl", "expected_LogicalLP.wsdl",
                                             "expected_PhysicalLP.wsdl", null,
-                                            "/idl/expected_LogicalLP.wsdl", 
-                                            "/idl/expected_PhysicalLP.wsdl", null);
+                                            null,
+                                            "expected_LogicalLP.wsdl",
+                                            null);
     }
     
     public void testPhysicalOnly() throws Exception {
         // This tests if -P option is only passed.
         testLogicalPhysicalSchemaGeneration("/idl/OptionP.idl", null,
                                             "expected_Physical.wsdl", 
-                                            null, null, "/idl/expected_Physical.wsdl",
-                                            null);
+                                            null,
+                                            "expected_OptionP.wsdl",
+                                            "OptionP.wsdl",
+                                            "null");
     }            
     
     public void testLogicalPyhsicalSchema() throws Exception {
         // This tests if -L, -P and -T options are passed. 
-        testLogicalPhysicalSchemaGeneration("/idl/OptionsLPT.idl", "expected_LogicalLPT.wsdl",
-                                            "expected_PhysicalLPT.wsdl", "expected_SchemaLPT.xsd",
-                                            "/idl/expected_LogicalLPT.wsdl",
-                                            "/idl/expected_PhysicalLPT.wsdl", 
-                                            "/idl/expected_SchemaLPT.xsd");
+        testLogicalPhysicalSchemaGeneration("/idl/OptionsLPT.idl", 
+                                            "expected_LogicalLPT.wsdl",
+                                            "expected_PhysicalLPT.wsdl", 
+                                            "expected_SchemaLPT.xsd",
+                                            null,
+                                            "expected_LogicalLPT.wsdl",
+                                            null);
+                                            
         
     }
                 

Modified: incubator/yoko/trunk/tools/src/test/resources/idl/expected_LogicalLPT.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/idl/expected_LogicalLPT.wsdl?view=diff&rev=538201&r1=538200&r2=538201
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/idl/expected_LogicalLPT.wsdl (original)
+++ incubator/yoko/trunk/tools/src/test/resources/idl/expected_LogicalLPT.wsdl Tue May 15
08:17:58 2007
@@ -20,7 +20,7 @@
 <wsdl:definitions targetNamespace="http://schemas.apache.org/yoko/idl/OptionsLPT" xmlns:tns="http://schemas.apache.org/yoko/idl/OptionsLPT"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd1="http://schemas.apache.org/yoko/idl/OptionsLPT-types" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
   <wsdl:types>
     <xsd:schema>
-      <xsd:import namespace="http://schemas.apache.org/yoko/idl/OptionsLPT-types" schemaLocation="expected_SchemaLPT.xsd"/>
+      <xsd:import namespace="http://schemas.apache.org/yoko/idl/OptionsLPT-types" schemaLocation="@LOCATION@"/>
     </xsd:schema>
   </wsdl:types>
   <wsdl:message name="getEmployee">

Modified: incubator/yoko/trunk/tools/src/test/resources/idl/expected_LogicalLT.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/idl/expected_LogicalLT.wsdl?view=diff&rev=538201&r1=538200&r2=538201
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/idl/expected_LogicalLT.wsdl (original)
+++ incubator/yoko/trunk/tools/src/test/resources/idl/expected_LogicalLT.wsdl Tue May 15 08:17:58
2007
@@ -20,7 +20,7 @@
 <wsdl:definitions targetNamespace="http://schemas.apache.org/yoko/idl/OptionsLT" xmlns:tns="http://schemas.apache.org/yoko/idl/OptionsLT"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd1="http://schemas.apache.org/yoko/idl/OptionsLT-types" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
   <wsdl:types>
     <xsd:schema>
-      <xsd:import namespace="http://schemas.apache.org/yoko/idl/OptionsLT-types" schemaLocation="expected_SchemaLT.xsd"/>
+      <xsd:import namespace="http://schemas.apache.org/yoko/idl/OptionsLT-types" schemaLocation="@LOCATION@"/>
     </xsd:schema>
   </wsdl:types>
   <wsdl:message name="getEmployeeResponse">

Added: incubator/yoko/trunk/tools/src/test/resources/idl/expected_OptionL.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/idl/expected_OptionL.wsdl?view=auto&rev=538201
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/idl/expected_OptionL.wsdl (added)
+++ incubator/yoko/trunk/tools/src/test/resources/idl/expected_OptionL.wsdl Tue May 15 08:17:58
2007
@@ -0,0 +1,49 @@
+<?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/OptionL" xmlns:tns="http://schemas.apache.org/yoko/idl/OptionL"
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/OptionL/typemap">
+    <corba:struct xmlns:ns4="http://schemas.apache.org/yoko/idl/OptionL" xmlns="http://schemas.apache.org/yoko/idl/OptionL/typemap"
repositoryID="IDL:foo/bar/Employee:1.0" name="foo.bar.Employee" type="ns4:foo.bar.Employee">
+      <corba:member name="name" idltype="corba:string" />
+      <corba:member name="number" idltype="corba:long" />
+    </corba:struct>
+  </corba:typeMapping>
+  <wsdl:import namespace="http://schemas.apache.org/yoko/idl/OptionL" location="@LOCATION@">
+    </wsdl:import>
+  <wsdl:binding name="foo.barCORBABinding" type="tns:foo.bar">
+    <corba:binding repositoryID="IDL:foo/bar:1.0" />
+    <wsdl:operation name="getEmployee">
+      <corba:operation name="getEmployee">
+        <corba:param xmlns="http://schemas.apache.org/yoko/idl/OptionL/typemap" mode="in"
name="inEmp" idltype="foo.bar.Employee" />
+        <corba:param xmlns="http://schemas.apache.org/yoko/idl/OptionL/typemap" mode="out"
name="outEmp" idltype="foo.bar.Employee" />
+        <corba:param xmlns="http://schemas.apache.org/yoko/idl/OptionL/typemap" mode="inout"
name="inoutEmp" idltype="foo.bar.Employee" />
+        <corba:return xmlns="http://schemas.apache.org/yoko/idl/OptionL/typemap" name="return"
idltype="foo.bar.Employee" />
+      </corba:operation>
+      <wsdl:input name="getEmployeeRequest">
+      </wsdl:input>
+      <wsdl:output name="getEmployeeResponse">
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:service name="foo.barCORBAService">
+    <wsdl:port name="foo.barCORBAPort" binding="tns:foo.barCORBABinding">
+      <corba:address location="IOR:" />
+    </wsdl:port>
+  </wsdl:service>
+</wsdl:definitions>

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

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

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

Added: incubator/yoko/trunk/tools/src/test/resources/idl/expected_OptionP.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/idl/expected_OptionP.wsdl?view=auto&rev=538201
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/idl/expected_OptionP.wsdl (added)
+++ incubator/yoko/trunk/tools/src/test/resources/idl/expected_OptionP.wsdl Tue May 15 08:17:58
2007
@@ -0,0 +1,71 @@
+<?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/OptionP" xmlns:tns="http://schemas.apache.org/yoko/idl/OptionP"
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/OptionP"
xmlns="http://schemas.apache.org/yoko/idl/OptionP" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+      <xs:complexType name="foo.bar.Employee">
+        <xs:sequence>
+          <xs:element name="name" type="xs:string">
+          </xs:element>
+          <xs:element name="number" type="xs:int">
+          </xs:element>
+        </xs:sequence>
+      </xs:complexType>
+      <xs:element name="getEmployee">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="inEmp" type="foo.bar.Employee">
+            </xs:element>
+            <xs:element name="inoutEmp" type="foo.bar.Employee">
+            </xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <xs:element name="getEmployeeResponse">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="return" type="foo.bar.Employee">
+            </xs:element>
+            <xs:element name="outEmp" type="foo.bar.Employee">
+            </xs:element>
+            <xs:element name="inoutEmp" type="foo.bar.Employee">
+            </xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+    </xs:schema>
+  </wsdl:types>
+  <wsdl:message name="getEmployeeResponse">
+    <wsdl:part name="outparameter" element="tns:getEmployeeResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="getEmployee">
+    <wsdl:part name="inparameter" element="tns:getEmployee">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:portType name="foo.bar">
+    <wsdl:operation name="getEmployee">
+      <wsdl:input name="getEmployeeRequest" message="tns:getEmployee">
+    </wsdl:input>
+      <wsdl:output name="getEmployeeResponse" message="tns:getEmployeeResponse">
+    </wsdl:output>
+    </wsdl:operation>
+  </wsdl:portType>
+</wsdl:definitions>

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

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

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

Added: incubator/yoko/trunk/tools/src/test/resources/idl/expected_OptionsLT.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/idl/expected_OptionsLT.wsdl?view=auto&rev=538201
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/idl/expected_OptionsLT.wsdl (added)
+++ incubator/yoko/trunk/tools/src/test/resources/idl/expected_OptionsLT.wsdl Tue May 15 08:17:58
2007
@@ -0,0 +1,49 @@
+<?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/OptionsLT" xmlns:tns="http://schemas.apache.org/yoko/idl/OptionsLT"
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:xsd1="http://schemas.apache.org/yoko/idl/OptionsLT-types"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+  <corba:typeMapping targetNamespace="http://schemas.apache.org/yoko/idl/OptionsLT/typemap">
+    <corba:struct xmlns:ns4="http://schemas.apache.org/yoko/idl/OptionsLT-types" xmlns="http://schemas.apache.org/yoko/idl/OptionsLT/typemap"
repositoryID="IDL:foo/bar/Employee:1.0" name="foo.bar.Employee" type="ns4:foo.bar.Employee">
+      <corba:member name="name" idltype="corba:string" />
+      <corba:member name="number" idltype="corba:long" />
+    </corba:struct>
+  </corba:typeMapping>
+  <wsdl:import namespace="http://schemas.apache.org/yoko/idl/OptionsLT" location="@LOCATION@">
+    </wsdl:import>
+  <wsdl:binding name="foo.barCORBABinding" type="tns:foo.bar">
+    <corba:binding repositoryID="IDL:foo/bar:1.0" />
+    <wsdl:operation name="getEmployee">
+      <corba:operation name="getEmployee">
+        <corba:param xmlns="http://schemas.apache.org/yoko/idl/OptionsLT/typemap" mode="in"
name="inEmp" idltype="foo.bar.Employee" />
+        <corba:param xmlns="http://schemas.apache.org/yoko/idl/OptionsLT/typemap" mode="out"
name="outEmp" idltype="foo.bar.Employee" />
+        <corba:param xmlns="http://schemas.apache.org/yoko/idl/OptionsLT/typemap" mode="inout"
name="inoutEmp" idltype="foo.bar.Employee" />
+        <corba:return xmlns="http://schemas.apache.org/yoko/idl/OptionsLT/typemap" name="return"
idltype="foo.bar.Employee" />
+      </corba:operation>
+      <wsdl:input name="getEmployeeRequest">
+      </wsdl:input>
+      <wsdl:output name="getEmployeeResponse">
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:service name="foo.barCORBAService">
+    <wsdl:port name="foo.barCORBAPort" binding="tns:foo.barCORBABinding">
+      <corba:address location="IOR:" />
+    </wsdl:port>
+  </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file

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

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

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

Added: incubator/yoko/trunk/tools/src/test/resources/idl/expected_OptionsPT.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/idl/expected_OptionsPT.wsdl?view=auto&rev=538201
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/idl/expected_OptionsPT.wsdl (added)
+++ incubator/yoko/trunk/tools/src/test/resources/idl/expected_OptionsPT.wsdl Tue May 15 08:17:58
2007
@@ -0,0 +1,42 @@
+<?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/OptionsPT" xmlns:tns="http://schemas.apache.org/yoko/idl/OptionsPT"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd1="http://schemas.apache.org/yoko/idl/OptionsPT-types" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+  <wsdl:types>
+    <xsd:schema>
+      <xsd:import namespace="http://schemas.apache.org/yoko/idl/OptionsPT-types" schemaLocation="@LOCATION@"/>
+    </xsd:schema>
+  </wsdl:types>
+  <wsdl:message name="getEmployee">
+    <wsdl:part name="inparameter" element="xsd1:getEmployee">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="getEmployeeResponse">
+    <wsdl:part name="outparameter" element="xsd1:getEmployeeResponse">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:portType name="foo.bar">
+    <wsdl:operation name="getEmployee">
+      <wsdl:input name="getEmployeeRequest" message="tns:getEmployee">
+    </wsdl:input>
+      <wsdl:output name="getEmployeeResponse" message="tns:getEmployeeResponse">
+    </wsdl:output>
+    </wsdl:operation>
+  </wsdl:portType>
+</wsdl:definitions>
\ No newline at end of file

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

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

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

Modified: incubator/yoko/trunk/tools/src/test/resources/idl/expected_OptionsSchema.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/idl/expected_OptionsSchema.wsdl?view=diff&rev=538201&r1=538200&r2=538201
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/idl/expected_OptionsSchema.wsdl (original)
+++ incubator/yoko/trunk/tools/src/test/resources/idl/expected_OptionsSchema.wsdl Tue May
15 08:17:58 2007
@@ -26,7 +26,7 @@
   </corba:typeMapping>
   <wsdl:types>
     <xsd:schema>
-      <xsd:import namespace="http://schemas.apache.org/yoko/idl/OptionsSchema-types" schemaLocation="expected_Schema.xsd"/>
+      <xsd:import namespace="http://schemas.apache.org/yoko/idl/OptionsSchema-types" schemaLocation="@LOCATION@"/>
     </xsd:schema>
   </wsdl:types>
   <wsdl:message name="getEmployee">

Modified: incubator/yoko/trunk/tools/src/test/resources/idl/expected_PhysicalLP.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/idl/expected_PhysicalLP.wsdl?view=diff&rev=538201&r1=538200&r2=538201
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/idl/expected_PhysicalLP.wsdl (original)
+++ incubator/yoko/trunk/tools/src/test/resources/idl/expected_PhysicalLP.wsdl Tue May 15
08:17:58 2007
@@ -24,7 +24,7 @@
       <corba:member name="number" idltype="corba:long" />
     </corba:struct>
   </corba:typeMapping>
-  <wsdl:import namespace="http://schemas.apache.org/yoko/idl/OptionsLP" location="file:/C:/yoko_tan/trunk/tools/expected_LogicalLP.wsdl">
+  <wsdl:import namespace="http://schemas.apache.org/yoko/idl/OptionsLP" location="@LOCATION@">
     </wsdl:import>
   <wsdl:binding name="foo.barCORBABinding" type="tns:foo.bar">
     <corba:binding repositoryID="IDL:foo/bar:1.0" />

Modified: incubator/yoko/trunk/tools/src/test/resources/idl/expected_PhysicalLPT.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/idl/expected_PhysicalLPT.wsdl?view=diff&rev=538201&r1=538200&r2=538201
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/idl/expected_PhysicalLPT.wsdl (original)
+++ incubator/yoko/trunk/tools/src/test/resources/idl/expected_PhysicalLPT.wsdl Tue May 15
08:17:58 2007
@@ -24,7 +24,7 @@
       <corba:member name="number" idltype="corba:long" />
     </corba:struct>
   </corba:typeMapping>
-  <wsdl:import namespace="http://schemas.apache.org/yoko/idl/OptionsLPT" location="file:/C:/yoko_tan/trunk/tools/expected_LogicalLPT.wsdl">
+  <wsdl:import namespace="http://schemas.apache.org/yoko/idl/OptionsLPT" location="@LOCATION@">
     </wsdl:import>
   <wsdl:binding name="foo.barCORBABinding" type="tns:foo.bar">
     <corba:binding repositoryID="IDL:foo/bar:1.0" />

Modified: incubator/yoko/trunk/tools/src/test/resources/idl/expected_PhysicalPT.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/idl/expected_PhysicalPT.wsdl?view=diff&rev=538201&r1=538200&r2=538201
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/idl/expected_PhysicalPT.wsdl (original)
+++ incubator/yoko/trunk/tools/src/test/resources/idl/expected_PhysicalPT.wsdl Tue May 15
08:17:58 2007
@@ -24,7 +24,7 @@
       <corba:member name="number" idltype="corba:long" />
     </corba:struct>
   </corba:typeMapping>
-  <wsdl:import namespace="http://schemas.apache.org/yoko/idl/OptionsPT" location="file:/C:/yoko_tan/trunk/tools/OptionsPT.wsdl">
+  <wsdl:import namespace="http://schemas.apache.org/yoko/idl/OptionsPT" location="@LOCATION@">
     </wsdl:import>
   <wsdl:binding name="foo.barCORBABinding" type="tns:foo.bar">
     <corba:binding repositoryID="IDL:foo/bar:1.0" />
@@ -46,4 +46,4 @@
       <corba:address location="IOR:" />
     </wsdl:port>
   </wsdl:service>
-</wsdl:definitions>
\ No newline at end of file
+</wsdl:definitions>



Mime
View raw message