You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2008/01/04 16:47:53 UTC

svn commit: r608894 [6/10] - in /incubator/cxf/trunk: ./ buildtools/src/main/resources/ common/schemas/src/main/resources/schemas/wsdl/ etc/eclipse/ maven-plugins/corba/ parent/ rt/bindings/corba/ rt/bindings/corba/src/main/java/org/apache/yoko/binding...

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlScopedName.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlScopedName.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlScopedName.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlScopedName.java Fri Jan  4 07:47:28 2008
@@ -15,10 +15,12 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/
+ */
 
 package org.apache.yoko.tools.common.idltypes;
 
+import org.apache.yoko.tools.common.ToolCorbaConstants;
+
 public class IdlScopedName {
     private String fullName;
     private String localName;
@@ -26,7 +28,7 @@
 
     IdlScopedName(IdlScopeBase parent, String name) {
         if (parent != null) {
-            fullName = new String(parent.fullName() + "::" + name);
+            fullName = new String(parent.fullName() + ToolCorbaConstants.MODULE_SEPARATOR + name);
             parentNames = parent.name().parentNames();
         } else {
             fullName = new String(name);
@@ -52,7 +54,7 @@
         }
 
         StringBuffer nm = new StringBuffer(fullName);
-        String rel = relativeTo.fullName() + "::";
+        String rel = relativeTo.fullName() + ToolCorbaConstants.MODULE_SEPARATOR;
 
         if (fullName.indexOf(rel) == 0) {
             nm.delete(0, rel.length());

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlSequence.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlSequence.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlSequence.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlSequence.java Fri Jan  4 07:47:28 2008
@@ -15,7 +15,7 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/
+ */
 
 package org.apache.yoko.tools.common.idltypes;
 

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlSequenceBase.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlSequenceBase.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlSequenceBase.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlSequenceBase.java Fri Jan  4 07:47:28 2008
@@ -15,7 +15,7 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/
+ */
 
 package org.apache.yoko.tools.common.idltypes;
 

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlString.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlString.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlString.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlString.java Fri Jan  4 07:47:28 2008
@@ -15,7 +15,7 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/
+ */
 
 package org.apache.yoko.tools.common.idltypes;
 

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlStruct.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlStruct.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlStruct.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlStruct.java Fri Jan  4 07:47:28 2008
@@ -15,7 +15,7 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/
+ */
 
 package org.apache.yoko.tools.common.idltypes;
 

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlStructBase.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlStructBase.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlStructBase.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlStructBase.java Fri Jan  4 07:47:28 2008
@@ -15,7 +15,7 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/
+ */
 
 package org.apache.yoko.tools.common.idltypes;
 

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlType.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlType.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlType.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlType.java Fri Jan  4 07:47:28 2008
@@ -15,7 +15,7 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/
+ */
 
 package org.apache.yoko.tools.common.idltypes;
 

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlTypedef.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlTypedef.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlTypedef.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlTypedef.java Fri Jan  4 07:47:28 2008
@@ -15,7 +15,7 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/
+ */
 
 package org.apache.yoko.tools.common.idltypes;
 

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlUnion.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlUnion.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlUnion.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlUnion.java Fri Jan  4 07:47:28 2008
@@ -15,7 +15,7 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/
+ */
 
 package org.apache.yoko.tools.common.idltypes;
 

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlUnionBranch.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlUnionBranch.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlUnionBranch.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlUnionBranch.java Fri Jan  4 07:47:28 2008
@@ -15,7 +15,7 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/
+ */
 
 package org.apache.yoko.tools.common.idltypes;
 

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlWString.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlWString.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlWString.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/idltypes/IdlWString.java Fri Jan  4 07:47:28 2008
@@ -15,7 +15,7 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/
+ */
 
 package org.apache.yoko.tools.common.idltypes;
 

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/toolspec/toolspecs/idl2wsdl.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/toolspec/toolspecs/idl2wsdl.xml?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/toolspec/toolspecs/idl2wsdl.xml (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/toolspec/toolspecs/idl2wsdl.xml Fri Jan  4 07:47:28 2008
@@ -22,9 +22,9 @@
 <!-- The xhtml namespace is for usage documentation -->
 <toolspec xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns:xhtml="http://www.w3.org/TR/xhtml1/strict"
-    xsi:schemaLocation="http://www.xsume.com/Xutil/ToolSpecification http://www.xsume.com/schema/xutil/tool-specification.xsd"
-    xmlns="http://www.xsume.com/Xutil/ToolSpecification"
-    xmlns:ts="http://www.xsume.com/Xutil/ToolSpecification">
+    xsi:schemaLocation="http://cxf.apache.org/Xutil/ToolSpecification http://cxf.apache.org/schema/xutil/tool-specification.xsd"
+    xmlns="http://cxf.apache.org/Xutil/ToolSpecification"
+    xmlns:ts="http://cxf.apache.org/Xutil/ToolSpecification">
 
     <annotation> Examples :
         idltowsdl HelloWorld.idl
@@ -115,15 +115,6 @@
                 </associatedArgument>
             </option>
 
-
-            <!-- <option id="referenceimport" maxOccurs="1">
-                <annotation>Specify the pathname of the schema file imported to define the Reference type.</annotation>
-                <switch>r</switch>
-                <associatedArgument placement="afterSpace">
-                    <annotation>reference-schema-file</annotation>
-                </associatedArgument>
-            </option> -->
-
             <option id="logical" maxOccurs="1">
                 <annotation>Split the generated WSDL into two files.
                     The logical portion of the WSDL is generated into the specified file.
@@ -154,24 +145,10 @@
                 </associatedArgument>
             </option>
 
-            <!-- <option id="interface" maxOccurs="1">
-                <annotation>Specify the interface name within idl to use during fast track process.</annotation>
-                <switch>interface</switch>
-                <associatedArgument placement="afterSpace">
-                    <annotation>interface-name</annotation>
-                </associatedArgument>
-            </option> -->
-
-
             <option id="qualified" maxOccurs="1">
                 <annotation>Generate qualified wsdl contract</annotation>
                 <switch>qualified</switch>
             </option>
-
-            <!-- <option id="inline" maxOccurs="1">
-                <annotation>In-line imported schema</annotation>
-                <switch>inline</switch>
-            </option> -->
             
             <option id="encoding" maxOccurs="1">
                 <annotation>Use specified encoding as the value of the generated WSDL xml encoding attribute.
@@ -180,6 +157,36 @@
                 <associatedArgument placement="afterSpace">
                     <annotation>xml-encoding-type</annotation>
                 </associatedArgument>
+            </option>
+
+            <option id="moduletonamespace" maxOccurs="1">
+                <annotation>Map the IDL module to namespace</annotation>
+                <switch>mns</switch>
+                <associatedArgument placement="immediate">
+                    <annotation>Customize the mapping of idl modules</annotation>
+                </associatedArgument>
+            </option>
+
+            <option id="wsdloutputfile" maxOccurs="1">
+                <annotation>The wsdl output file name</annotation>
+                <switch>ow</switch>
+                <associatedArgument placement="afterSpace">
+                    <annotation>wsdloutput-file</annotation>
+                </associatedArgument>
+            </option>
+
+            <option id="excludemodules" maxOccurs="1">
+                <annotation>Exclude the idl modules from generation</annotation>
+                <switch>ex</switch>
+                <switch>exclude</switch>
+                <associatedArgument placement="immediate">
+                    <annotation>Specify the modules to exclude</annotation>
+                </associatedArgument>
+            </option>
+            
+            <option id="polymorphicfactories" maxOccurs="1">
+                <annotation>Support for polymorphic factories</annotation>
+                <switch>pf</switch>
             </option>
 
         </optionGroup>

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/toolspec/toolspecs/wsdl2idl.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/toolspec/toolspecs/wsdl2idl.xml?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/toolspec/toolspecs/wsdl2idl.xml (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/common/toolspec/toolspecs/wsdl2idl.xml Fri Jan  4 07:47:28 2008
@@ -22,10 +22,10 @@
 <!-- The xhtml namespace is for usage documentation -->
 <toolspec xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:xhtml="http://www.w3.org/TR/xhtml1/strict"
-  xsi:schemaLocation="http://www.xsume.com/Xutil/ToolSpecification 
-                      http://www.xsume.com/schema/xutil/tool-specification.xsd"
-  xmlns="http://www.xsume.com/Xutil/ToolSpecification"
-  xmlns:ts="http://www.xsume.com/Xutil/ToolSpecification">
+  xsi:schemaLocation="http://cxf.apache.org/Xutil/ToolSpecification 
+                      http://cxf.apache.org/schema/xutil/tool-specification.xsd"
+  xmlns="http://cxf.apache.org/Xutil/ToolSpecification"
+  xmlns:ts="http://cxf.apache.org/Xutil/ToolSpecification">
   <annotation> Examples :
         wsdltoidl HelloWorld.wsdl
         wsdltoidl -corba -i GreetPortType -o Greeting.wsdl TestGreeting.wsdl

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/idlpreprocessor/DefaultIncludeResolver.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/idlpreprocessor/DefaultIncludeResolver.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/idlpreprocessor/DefaultIncludeResolver.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/idlpreprocessor/DefaultIncludeResolver.java Fri Jan  4 07:47:28 2008
@@ -45,7 +45,7 @@
      * @see IncludeResolver#findSystemInclude(java.lang.String)
      */
     public URL findSystemInclude(String spec) {
-        throw new UnsupportedOperationException("system includes not currently implemented");
+        return findUserInclude(spec);
     }
 
     /**

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/idlpreprocessor/IdlPreprocessorReader.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/idlpreprocessor/IdlPreprocessorReader.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/idlpreprocessor/IdlPreprocessorReader.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/idlpreprocessor/IdlPreprocessorReader.java Fri Jan  4 07:47:28 2008
@@ -157,8 +157,9 @@
                 popInclude();
                 continue;
             }
+            line = processComments(line);
             
-            if (!line.startsWith("#")) {
+            if (!line.trim().startsWith("#")) {
                 if (!skips()) {
                     buf.append(line);
                 }
@@ -167,16 +168,18 @@
             }
 
             final IncludeStackEntry ise = includeStack.peek();
-            
+            line = line.trim();
+            line = processPreprocessorComments(buf, line);
+
             if (line.startsWith("#include")) {
                 handleInclude(line, lineNo, ise);
             } else if (line.startsWith("#ifndef")) {
                 handleIfndef(line);
             } else if (line.startsWith("#ifdef")) {
                 handleIfdef(line);
-            } else if (line.trim().startsWith("#endif")) {
+            } else if (line.startsWith("#endif")) {
                 handleEndif(lineNo, ise);
-            } else if (line.trim().startsWith("#else")) {
+            } else if (line.startsWith("#else")) {
                 handleElse(lineNo, ise);
             } else if (line.startsWith("#define")) {
                 handleDefine(line);
@@ -186,6 +189,30 @@
         }
     }
 
+    private String processComments(String line) {
+        int pos = line.indexOf("**/");
+        //The comments need to be end with */, so if the line has ****/,
+        //we need to insert space to make it *** */
+        if ((pos != -1) && (pos != 0)) {
+            line = line.substring(0, pos) + " " + line.substring(pos + 1);
+        }
+        return line;
+    }
+
+    private String processPreprocessorComments(StringBuilder buffer, String line) {
+        int pos = line.indexOf("//");
+        if ((pos != -1) && (pos != 0)) {
+            buffer.append(line.substring(pos));
+            line = line.substring(0, pos);
+        }
+        pos = line.indexOf("/*");
+        if ((pos != -1) && (pos != 0)) {
+            buffer.append(line.substring(pos));
+            line = line.substring(0, pos);
+        }
+        return line;
+    }
+    
     /**
      * TODO: support multiline definitions, functions, etc. 
      */
@@ -250,7 +277,6 @@
 
         String arg = line.replaceFirst("#include", "").trim();
         if (arg.length() == 0) {
-
             throw new PreprocessingException("#include without an argument", ise.getURL(), lineNo);
         }
 

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ArrayDeferredAction.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ArrayDeferredAction.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ArrayDeferredAction.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ArrayDeferredAction.java Fri Jan  4 07:47:28 2008
@@ -15,7 +15,7 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/
+ */
 
 package org.apache.yoko.tools.processors.idl;
 
@@ -26,42 +26,39 @@
 import org.apache.yoko.tools.common.ReferenceConstants;
 import org.apache.yoko.wsdl.CorbaTypeImpl;
 
-public class ArrayDeferredAction extends DeferredActionBase {
+public class ArrayDeferredAction implements SchemaDeferredAction {
 
     protected Array array;
     protected Anonarray anonarray;
     protected XmlSchemaElement element;
     
     
-    public ArrayDeferredAction(Array arrayType, Anonarray anonArrayType,
-                               XmlSchemaElement elem,  Scope scope) {                           
-        super(scope);
+    public ArrayDeferredAction(Array arrayType,
+                               Anonarray anonArrayType,
+                               XmlSchemaElement elem) {                           
         array = arrayType;
         anonarray = anonArrayType;
         element = elem;        
     }
     
-    public ArrayDeferredAction(Array arrayType, Scope scope) {                           
-        super(scope);
+    public ArrayDeferredAction(Array arrayType) {
         array = arrayType;         
     }
     
-    public ArrayDeferredAction(Anonarray anonarrayType, Scope scope) {                           
-        super(scope);
+    public ArrayDeferredAction(Anonarray anonarrayType) {
         anonarray = anonarrayType;         
     }
     
-    public ArrayDeferredAction(XmlSchemaElement elem, Scope scope) {                           
-        super(scope);
+    public ArrayDeferredAction(XmlSchemaElement elem) {
         element = elem;               
     }
     
-    public void doDeferredAction(XmlSchemaType stype, CorbaTypeImpl ctype) {
+    public void execute(XmlSchemaType stype, CorbaTypeImpl ctype) {
         if (array != null) {
-            array.setType(ctype.getQName());
+            array.setElemtype(ctype.getQName());
         }
         if (anonarray != null) {
-            anonarray.setType(ctype.getQName());
+            anonarray.setElemtype(ctype.getQName());
         }
         if (element != null) {
             element.setSchemaTypeName(stype.getQName());
@@ -72,6 +69,7 @@
     }
         
 }
+
 
 
 

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ArrayVisitor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ArrayVisitor.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ArrayVisitor.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ArrayVisitor.java Fri Jan  4 07:47:28 2008
@@ -15,10 +15,11 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/
+ */
 
 package org.apache.yoko.tools.processors.idl;
 
+import javax.wsdl.Definition;
 import javax.xml.namespace.QName;
 
 import antlr.collections.AST;
@@ -26,6 +27,7 @@
 import org.apache.schemas.yoko.bindings.corba.Anonarray;
 import org.apache.schemas.yoko.bindings.corba.Array;
 
+import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaComplexType;
 import org.apache.ws.commons.schema.XmlSchemaElement;
 import org.apache.ws.commons.schema.XmlSchemaSequence;
@@ -38,20 +40,16 @@
 
     private static final String ELEMENT_NAME = "item";
     private AST identifierNode;
-    private XmlSchemaType schemaType;
-    private CorbaTypeImpl corbaType;    
     
     public ArrayVisitor(Scope scope,
+                        Definition defn,
+                        XmlSchema schemaRef,
                         WSDLASTVisitor wsdlVisitor,
-                        XmlSchemaType schemaTypeRef,
-                        CorbaTypeImpl corbaTypeRef,
                         AST identifierNodeRef,
                         Scope fqName) {
-        super(scope, wsdlVisitor);
+        super(scope, defn, schemaRef, wsdlVisitor);
         setFullyQualifiedName(fqName);
         identifierNode = identifierNodeRef;
-        schemaType = schemaTypeRef;
-        corbaType = corbaTypeRef;        
     }
 
     public static boolean accept(AST node) {
@@ -87,11 +85,11 @@
         
         // process all anonarrays, skip first array as it might not be anonymous
         if (nextSizeNode != null) {
-            result = doAnonarray(nextSizeNode, schemaType, corbaType);
+            result = doAnonarray(nextSizeNode, getSchemaType(), getCorbaType());
         } else {
             result = new Types();
-            result.setSchemaType(schemaType);
-            result.setCorbaType(corbaType);
+            result.setSchemaType(getSchemaType());
+            result.setCorbaType(getCorbaType());
             result.setFullyQualifiedName(getFullyQualifiedName());
         }
         
@@ -102,40 +100,41 @@
         if (identifierNode != null) {
             Scope scopedName = getScope();            
             if (result.getSchemaType() != null) {
-                stype = generateSchemaArray(scopedName.toString(), size, 
+                stype = generateSchemaArray(scopedName, size, 
                                             result.getSchemaType(), 
                                             result.getFullyQualifiedName());
             } else {
-                stype = generateSchemaArray(scopedName.toString(), size, 
+                stype = generateSchemaArray(scopedName, size, 
                                             null, result.getFullyQualifiedName());
             }
             if (result.getCorbaType() != null) {
-                ctype = generateCorbaArray(scopedName, size, result.getCorbaType(),
+                ctype = generateCorbaArray(scopedName, size, result.getCorbaType(), stype,
                                            getFullyQualifiedName());
             } else {
-                ctype = generateCorbaArray(scopedName, size, null,
+                ctype = generateCorbaArray(scopedName, size, null, stype, 
                                            getFullyQualifiedName());
             }
         } else {
             // anonymous array
             Scope scopedName = TypesUtils.generateAnonymousScopedName(getScope(), schema);
             if (result.getSchemaType() != null) {
-                stype = generateSchemaArray(scopedName.toString(),
+                stype = generateSchemaArray(scopedName,
                                             size,
                                             result.getSchemaType(),
                                             getFullyQualifiedName());
             } else {
-                stype = generateSchemaArray(scopedName.toString(),
+                stype = generateSchemaArray(scopedName,
                                             size, null, getFullyQualifiedName());
             }
             if (result.getCorbaType() != null) {
                 ctype = generateCorbaAnonarray(scopedName.toString(),
                                                size,
                                                result.getCorbaType(),
+                                               stype,
                                                getFullyQualifiedName());
             } else {
                 ctype = generateCorbaAnonarray(scopedName.toString(),
-                                               size, null, getFullyQualifiedName());
+                                               size, null, stype, getFullyQualifiedName());
             }
         }
         
@@ -162,12 +161,12 @@
             Long size = new Long(node.toString());
             
             if (result.getSchemaType() == null) {
-                result.setSchemaType(generateSchemaArray(scopedName.toString(),
+                result.setSchemaType(generateSchemaArray(scopedName,
                                                          size,
                                                          stype,
                                                          getFullyQualifiedName()));
             } else {
-                result.setSchemaType(generateSchemaArray(scopedName.toString(),
+                result.setSchemaType(generateSchemaArray(scopedName,
                                                          size,
                                                          result.getSchemaType(),
                                                          getFullyQualifiedName()));
@@ -177,11 +176,13 @@
                 result.setCorbaType(generateCorbaAnonarray(scopedName.toString(),
                                                            size,
                                                            ctype,
+                                                           result.getSchemaType(),
                                                            getFullyQualifiedName()));
             } else {
                 result.setCorbaType(generateCorbaAnonarray(scopedName.toString(),
                                                            size,
                                                            result.getCorbaType(),
+                                                           result.getSchemaType(),
                                                            getFullyQualifiedName()));
             }
             
@@ -197,10 +198,10 @@
         return result;
     }
     
-    private XmlSchemaComplexType generateSchemaArray(String name, Long size, 
+    private XmlSchemaComplexType generateSchemaArray(Scope scopedName, Long size, 
                                                      XmlSchemaType type, Scope fQName) {
         XmlSchemaComplexType complexType = new XmlSchemaComplexType(schema);
-        complexType.setName(name);
+        complexType.setName(mapper.mapToQName(scopedName));
 
         XmlSchemaSequence sequence = new XmlSchemaSequence();
 
@@ -215,8 +216,8 @@
             }
         } else {
             ArrayDeferredAction arrayAction = 
-                new ArrayDeferredAction(element, fQName);
-            wsdlVisitor.getDeferredActions().add(arrayAction);
+                new ArrayDeferredAction(element);
+            wsdlVisitor.getDeferredActions().add(fQName, arrayAction);
         }
         
         sequence.getItems().add(element);
@@ -227,36 +228,38 @@
     }
 
     private Array generateCorbaArray(Scope scopedName, Long size, 
-                                     CorbaTypeImpl type, Scope fQName) {
+                                     CorbaTypeImpl type, XmlSchemaType stype, Scope fQName) {
         Array array = new Array();
         array.setQName(new QName(typeMap.getTargetNamespace(), scopedName.toString()));
         array.setBound(size);
         array.setRepositoryID(scopedName.toIDLRepositoryID());
+        array.setType(stype.getQName());
         //REVISIT, if we add qualification option, then change below.
         array.setElemname(new QName("", ELEMENT_NAME));
         if (type != null) {
-            array.setType(type.getQName());
+            array.setElemtype(type.getQName());
         } else {
             ArrayDeferredAction arrayAction = 
-                new ArrayDeferredAction(array, fQName);
-            wsdlVisitor.getDeferredActions().add(arrayAction);
+                new ArrayDeferredAction(array);
+            wsdlVisitor.getDeferredActions().add(fQName, arrayAction);
         }
         return array;
     }
 
     private Anonarray generateCorbaAnonarray(String name, Long size, 
-                                             CorbaTypeImpl type, Scope fQName) {
+                                             CorbaTypeImpl type, XmlSchemaType stype, Scope fQName) {
         Anonarray anonarray = new Anonarray();
         anonarray.setQName(new QName(typeMap.getTargetNamespace(), name));
         anonarray.setBound(size);
+        anonarray.setType(stype.getQName());
         //REVISIT, if we add qualification option, then change below.
         anonarray.setElemname(new QName("", ELEMENT_NAME));
         if (type != null) {
-            anonarray.setType(type.getQName());
+            anonarray.setElemtype(type.getQName());
         } else {
             ArrayDeferredAction anonarrayAction = 
-                new ArrayDeferredAction(anonarray, fQName);
-            wsdlVisitor.getDeferredActions().add(anonarrayAction);
+                new ArrayDeferredAction(anonarray);
+            wsdlVisitor.getDeferredActions().add(fQName, anonarrayAction);
         }
         return anonarray;
     }

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/AttributeDeferredAction.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/AttributeDeferredAction.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/AttributeDeferredAction.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/AttributeDeferredAction.java Fri Jan  4 07:47:28 2008
@@ -15,7 +15,7 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/
+ */
 
 package org.apache.yoko.tools.processors.idl;
 
@@ -26,37 +26,32 @@
 import org.apache.yoko.tools.common.ReferenceConstants;
 import org.apache.yoko.wsdl.CorbaTypeImpl;
 
-public class AttributeDeferredAction extends DeferredActionBase {
+public class AttributeDeferredAction implements SchemaDeferredAction {
 
     protected ArgType argType;
     protected ParamType param;
     protected XmlSchemaElement element;
     
     
-    public AttributeDeferredAction(ParamType paramType, ArgType arg, 
-                                   XmlSchemaElement elem, Scope scope) {                           
-        super(scope);
+    public AttributeDeferredAction(ParamType paramType, ArgType arg, XmlSchemaElement elem) {
         param = paramType;  
         argType = arg;
         element = elem;        
     }
     
-    public AttributeDeferredAction(ParamType paramType, Scope scope) {                           
-        super(scope);
+    public AttributeDeferredAction(ParamType paramType) {
         param = paramType;         
     }
     
-    public AttributeDeferredAction(ArgType arg, Scope scope) {                           
-        super(scope);
+    public AttributeDeferredAction(ArgType arg) {
         argType = arg;         
     }
     
-    public AttributeDeferredAction(XmlSchemaElement elem, Scope scope) {                           
-        super(scope);
+    public AttributeDeferredAction(XmlSchemaElement elem) {
         element = elem;               
     }
     
-    public void doDeferredAction(XmlSchemaType stype, CorbaTypeImpl ctype) {
+    public void execute(XmlSchemaType stype, CorbaTypeImpl ctype) {
         if (param != null) {
             param.setIdltype(ctype.getQName());
         }
@@ -72,6 +67,7 @@
     }
        
 }
+
 
 
 

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/AttributeVisitor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/AttributeVisitor.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/AttributeVisitor.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/AttributeVisitor.java Fri Jan  4 07:47:28 2008
@@ -15,7 +15,7 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/
+ */
 
 package org.apache.yoko.tools.processors.idl;
 
@@ -42,6 +42,7 @@
 import org.apache.schemas.yoko.bindings.corba.OperationType;
 import org.apache.schemas.yoko.bindings.corba.ParamType;
 
+import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaComplexType;
 import org.apache.ws.commons.schema.XmlSchemaElement;
 import org.apache.ws.commons.schema.XmlSchemaSequence;
@@ -61,17 +62,17 @@
     private static final String PARAM_NAME        = "_arg";
     private static final String RETURN_PARAM_NAME = "return";
     
-    private Definition          definition;
     private ExtensionRegistry   extReg;
     private PortType            portType;
     private Binding             binding;
     
     public AttributeVisitor(Scope scope,
+                            Definition defn,
+                            XmlSchema schemaRef,
                             WSDLASTVisitor wsdlVisitor,
                             PortType wsdlPortType,
                             Binding wsdlBinding) {
-        super(scope, wsdlVisitor);
-        definition = wsdlVisitor.getDefinition();
+        super(scope, defn, schemaRef, wsdlVisitor);
         extReg = definition.getExtensionRegistry();
         portType = wsdlPortType;
         binding = wsdlBinding;
@@ -146,7 +147,7 @@
         OperationType corbaOp = generateCorbaOperation(op, null, corbaReturn);
         
         // generate binding
-        BindingOperation corbaBindingOp = generateCorbaBindingOperation(binding, op, corbaOp);
+        generateCorbaBindingOperation(binding, op, corbaOp);
     }
 
     private void generateSetter(AST typeNode, AST nameNode) {
@@ -180,7 +181,7 @@
         OperationType corbaOp = generateCorbaOperation(op, corbaParam, null);
         
         // generate binding
-        BindingOperation corbaBindingOp = generateCorbaBindingOperation(binding, op, corbaOp);
+        generateCorbaBindingOperation(binding, op, corbaOp);
     }
     
     /** Generate a wrapped doc style XmlSchemaElement containing one element.
@@ -213,7 +214,9 @@
                                                        String paramName) {
         XmlSchemaElement element = new XmlSchemaElement();
         if (typeNode != null) {
-            ParamTypeSpecVisitor visitor = new ParamTypeSpecVisitor(getScope(), 
+            ParamTypeSpecVisitor visitor = new ParamTypeSpecVisitor(getScope(),
+                                                                    definition,
+                                                                    schema,
                                                                     wsdlVisitor);
             visitor.visit(typeNode);
             XmlSchemaType stype = visitor.getSchemaType();
@@ -226,7 +229,7 @@
                 }
             } else {
                 wsdlVisitor.getDeferredActions().
-                    add(new AttributeDeferredAction(element, fqName)); 
+                    add(fqName, new AttributeDeferredAction(element)); 
             }
             
             element.setName(paramName);
@@ -290,7 +293,9 @@
         ArgType param = new ArgType();
         param.setName(RETURN_PARAM_NAME);
 
-        ParamTypeSpecVisitor visitor = new ParamTypeSpecVisitor(getScope(), 
+        ParamTypeSpecVisitor visitor = new ParamTypeSpecVisitor(getScope(),
+                                                                definition,
+                                                                schema,
                                                                 wsdlVisitor);
         visitor.visit(type);
         CorbaTypeImpl corbaType = visitor.getCorbaType();
@@ -299,7 +304,7 @@
             param.setIdltype(corbaType.getQName());
         } else {
             wsdlVisitor.getDeferredActions().
-                add(new AttributeDeferredAction(param, visitor.getFullyQualifiedName())); 
+                add(visitor.getFullyQualifiedName(), new AttributeDeferredAction(param));
         }
         
         return param;
@@ -310,7 +315,9 @@
         param.setName(PARAM_NAME);
         param.setMode(ModeType.IN);
         
-        ParamTypeSpecVisitor visitor = new ParamTypeSpecVisitor(getScope(), 
+        ParamTypeSpecVisitor visitor = new ParamTypeSpecVisitor(getScope(),
+                                                                definition,
+                                                                schema,
                                                                 wsdlVisitor);
         visitor.visit(type);
         CorbaTypeImpl corbaType = visitor.getCorbaType();
@@ -318,7 +325,7 @@
             param.setIdltype(corbaType.getQName());
         } else {
             wsdlVisitor.getDeferredActions().
-                add(new AttributeDeferredAction(param, visitor.getFullyQualifiedName()));
+                add(visitor.getFullyQualifiedName(), new AttributeDeferredAction(param));
         }
 
         return param;

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ConstVisitor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ConstVisitor.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ConstVisitor.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ConstVisitor.java Fri Jan  4 07:47:28 2008
@@ -15,15 +15,17 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/
+ */
 
 package org.apache.yoko.tools.processors.idl;
 
+import javax.wsdl.Definition;
 import javax.xml.namespace.QName;
 
 import antlr.collections.AST;
 
 import org.apache.schemas.yoko.bindings.corba.Const;
+import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaType;
 
 import org.apache.yoko.wsdl.CorbaTypeImpl;
@@ -31,8 +33,10 @@
 public class ConstVisitor extends VisitorBase {
 
     public ConstVisitor(Scope scope,
+                        Definition defn,
+                        XmlSchema schemaRef,
                         WSDLASTVisitor wsdlVisitor) {
-        super(scope, wsdlVisitor);
+        super(scope, defn, schemaRef, wsdlVisitor);
     }
     
     public static boolean accept(AST node) {
@@ -73,17 +77,15 @@
 
         Visitor visitor = null;
         if (PrimitiveTypesVisitor.accept(constTypeNode)) {           
-            visitor = new PrimitiveTypesVisitor(getScope(), schemas);           
+            visitor = new PrimitiveTypesVisitor(getScope(), definition, schema, schemas);           
         } else if (StringVisitor.accept(constTypeNode)) {
             // string_type_spec
             // wstring_type_spec
-            visitor = new StringVisitor(getScope(), wsdlVisitor, constTypeNode); 
+            visitor = new StringVisitor(getScope(), definition, schema, wsdlVisitor, constTypeNode); 
         } else if (FixedPtConstVisitor.accept(constTypeNode)) {           
-            visitor = new FixedPtConstVisitor(getScope(), schemas); 
-        } else if (ScopedNameVisitor.accept(getScope(), schemas, schema, 
-                                            typeMap, wsdlVisitor.getDefinition(),
-                                            constTypeNode, wsdlVisitor)) {
-            visitor = new ScopedNameVisitor(getScope(), wsdlVisitor);            
+            visitor = new FixedPtConstVisitor(getScope(), definition, schema, schemas); 
+        } else if (ScopedNameVisitor.accept(getScope(), definition, schema, constTypeNode, wsdlVisitor)) {
+            visitor = new ScopedNameVisitor(getScope(), definition, schema, wsdlVisitor);            
         }
         
         visitor.visit(constTypeNode);                

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ConstrTypeSpecVisitor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ConstrTypeSpecVisitor.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ConstrTypeSpecVisitor.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ConstrTypeSpecVisitor.java Fri Jan  4 07:47:28 2008
@@ -15,20 +15,24 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/
+ */
 
 package org.apache.yoko.tools.processors.idl;
 
+import javax.wsdl.Definition;
 import antlr.collections.AST;
+import org.apache.ws.commons.schema.XmlSchema;
 
 public class ConstrTypeSpecVisitor extends VisitorBase {
 
-    private AST identifierNode;
+    protected AST identifierNode;
     
     public ConstrTypeSpecVisitor(Scope scope,
+                                 Definition defn,
+                                 XmlSchema schemaRef,
                                  WSDLASTVisitor wsdlASTVisitor,
                                  AST identifierNodeRef) {
-        super(scope, wsdlASTVisitor);
+        super(scope, defn, schemaRef, wsdlASTVisitor);
         identifierNode = identifierNodeRef;
     }
     
@@ -48,15 +52,15 @@
         Visitor visitor = null;
         
         if (StructVisitor.accept(node)) {
-            visitor = new StructVisitor(getScope(), wsdlVisitor);
+            visitor = new StructVisitor(getScope(), definition, schema, wsdlVisitor);
         }
 
         if (UnionVisitor.accept(node)) {
-            visitor = new UnionVisitor(getScope(), wsdlVisitor);
+            visitor = new UnionVisitor(getScope(), definition, schema, wsdlVisitor);
         }
 
         if (EnumVisitor.accept(node)) {
-            visitor = new EnumVisitor(getScope(), wsdlVisitor);
+            visitor = new EnumVisitor(getScope(), definition, schema, wsdlVisitor);
         }
 
         visitor.visit(node);

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/DeclaratorVisitor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/DeclaratorVisitor.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/DeclaratorVisitor.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/DeclaratorVisitor.java Fri Jan  4 07:47:28 2008
@@ -15,10 +15,11 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/
+ */
 
 package org.apache.yoko.tools.processors.idl;
 
+import javax.wsdl.Definition;
 import javax.xml.namespace.QName;
 
 import antlr.collections.AST;
@@ -27,6 +28,7 @@
 import org.apache.schemas.yoko.bindings.corba.Fixed;
 import org.apache.schemas.yoko.bindings.corba.Sequence;
 
+import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaComplexType;
 import org.apache.ws.commons.schema.XmlSchemaSimpleType;
 import org.apache.ws.commons.schema.XmlSchemaType;
@@ -41,11 +43,13 @@
     // <complex_declarator> ::= <array_declarator>
     
     public DeclaratorVisitor(Scope scope,
+                             Definition defn,
+                             XmlSchema schemaRef,
                              WSDLASTVisitor wsdlASTVisitor,
                              XmlSchemaType schemaTypeRef,
                              CorbaTypeImpl corbaTypeRef,
                              Scope fQName) {
-        super(scope, wsdlASTVisitor);
+        super(scope, defn, schemaRef, wsdlASTVisitor);
         setSchemaType(schemaTypeRef);
         setCorbaType(corbaTypeRef);
         setFullyQualifiedName(fQName);
@@ -55,11 +59,13 @@
     
         if (ArrayVisitor.accept(node)) {
             ArrayVisitor arrayVisitor = new ArrayVisitor(getScope(),
+                                                         definition,
+                                                         schema,
                                                          wsdlVisitor,
-                                                         getSchemaType(),
-                                                         getCorbaType(),
                                                          node,
-                                                         getFullyQualifiedName()); 
+                                                         getFullyQualifiedName());
+            arrayVisitor.setSchemaType(getSchemaType());
+            arrayVisitor.setCorbaType(getCorbaType());
             arrayVisitor.visit(node);
 
         } else {
@@ -80,84 +86,90 @@
 
             if (ArrayVisitor.accept(nextDecl)) {
                 ArrayVisitor arrayVisitor = new ArrayVisitor(newScope,
+                                                             definition,
+                                                             schema,
                                                              wsdlVisitor,
-                                                             getSchemaType(),
-                                                             getCorbaType(),
                                                              nextDecl,
                                                              getFullyQualifiedName()); 
+                arrayVisitor.setSchemaType(getSchemaType());
+                arrayVisitor.setCorbaType(getCorbaType());
                 arrayVisitor.visit(nextDecl);
-
             } else {
-                CorbaTypeImpl nextCorbaType = null;
-                XmlSchemaType nextSchemaType = null;
+                visitNewTypes(newScope);
+            }
+            
+            nextDecl = nextDecl.getNextSibling();
+        }
 
-                CorbaTypeImpl oldCorbaType = getCorbaType();
+    }
 
-                QName newQname = new QName(getCorbaType().getQName().getNamespaceURI(), newScope.toString());
+    private void visitNewTypes(Scope newScope) {
+        CorbaTypeImpl nextCorbaType = null;
+        XmlSchemaType nextSchemaType = null;
+
+        CorbaTypeImpl oldCorbaType = getCorbaType();
+
+        QName newQname = new QName(getCorbaType().getQName().getNamespaceURI(), newScope.toString());
+
+        if (oldCorbaType instanceof Alias) {
+            // Alias
+            //
+            Alias oldAlias = (Alias) oldCorbaType;
+            Alias alias = new Alias();
+            
+            alias.setQName(newQname);
+            alias.setBasetype(oldAlias.getBasetype());
+            alias.setType(oldAlias.getType());
+            alias.setRepositoryID(newScope.toIDLRepositoryID());
+            
+            nextCorbaType = alias;
+        } else if (oldCorbaType instanceof Sequence) {
+            // Sequence
+            //
+            
+            nextSchemaType = duplicateXmlSchemaComplexType(newScope);
+            
+            Sequence oldSequence = (Sequence) oldCorbaType;
+            Sequence newSequence = new Sequence();
 
-                if (oldCorbaType instanceof Alias) {
-                    // Alias
-                    //
-                    Alias oldAlias = (Alias) oldCorbaType;
-                    Alias alias = new Alias();
-
-                    alias.setQName(newQname);
-                    alias.setBasetype(oldAlias.getBasetype());
-                    alias.setType(oldAlias.getType());
-                    alias.setRepositoryID(newScope.toIDLRepositoryID());
-
-                    nextCorbaType = alias;
-                } else if (oldCorbaType instanceof Sequence) {
-                    // Sequence
-                    //
-
-                    nextSchemaType = duplicateXmlSchemaComplexType(newScope);
-
-                    Sequence oldSequence = (Sequence) oldCorbaType;
-                    Sequence newSequence = new Sequence();
-
-                    newSequence.setQName(newQname);
-                    newSequence.setType(nextSchemaType.getQName());
-                    newSequence.setElemtype(oldSequence.getElemtype());
-                    newSequence.setElemname(oldSequence.getElemname());
-                    newSequence.setBound(oldSequence.getBound());
-                    newSequence.setRepositoryID(newScope.toIDLRepositoryID());
-
-                    nextCorbaType = newSequence;
-                } else if (oldCorbaType instanceof Fixed) {
-                    // Fixed
-                    //
-
-                    nextSchemaType = duplicateXmlSchemaSimpleType(newScope);
-
-                    Fixed oldFixed = (Fixed) getCorbaType();
-                    Fixed newFixed = new Fixed();
-
-                    newFixed.setQName(newQname);
-                    newFixed.setDigits(oldFixed.getDigits());
-                    newFixed.setScale(oldFixed.getScale());
-                    newFixed.setType(oldFixed.getType());
-                    newFixed.setRepositoryID(newScope.toIDLRepositoryID());
-
-                    nextCorbaType = newFixed;
-                } else {
-                    System.err.println("[DeclaratorVisitor: Unexpected CORBA type error!]");
-                    System.exit(1);
-                }
-
-                if (nextCorbaType != null) {
-                    typeMap.getStructOrExceptionOrUnion().add(nextCorbaType);
-                }
-                if (nextSchemaType != null) {
-                    schema.getItems().add(nextSchemaType);
-                    schema.addType(nextSchemaType);                    
-                }
-            }
+            newSequence.setQName(newQname);
+            newSequence.setType(nextSchemaType.getQName());
+            newSequence.setElemtype(oldSequence.getElemtype());
+            newSequence.setElemname(oldSequence.getElemname());
+            newSequence.setBound(oldSequence.getBound());
+            newSequence.setRepositoryID(newScope.toIDLRepositoryID());
+
+            nextCorbaType = newSequence;
+        } else if (oldCorbaType instanceof Fixed) {
+            // Fixed
+            //
             
-            nextDecl = nextDecl.getNextSibling();
+            nextSchemaType = duplicateXmlSchemaSimpleType(newScope);
+
+            Fixed oldFixed = (Fixed) getCorbaType();
+            Fixed newFixed = new Fixed();
+
+            newFixed.setQName(newQname);
+            newFixed.setDigits(oldFixed.getDigits());
+            newFixed.setScale(oldFixed.getScale());
+            newFixed.setType(oldFixed.getType());
+            newFixed.setRepositoryID(newScope.toIDLRepositoryID());
+            
+            nextCorbaType = newFixed;
+        } else {
+            System.err.println("[DeclaratorVisitor: Unexpected CORBA type error!]");
+            System.exit(1);
         }
 
+        if (nextCorbaType != null) {
+            typeMap.getStructOrExceptionOrUnion().add(nextCorbaType);
+        }
+        if (nextSchemaType != null) {
+            schema.getItems().add(nextSchemaType);
+            schema.addType(nextSchemaType);                    
+        }
     }
+
     
     private XmlSchemaComplexType duplicateXmlSchemaComplexType(Scope newScope) {
         XmlSchemaComplexType oldSchemaType = (XmlSchemaComplexType) getSchemaType();

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/DeferredAction.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/DeferredAction.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/DeferredAction.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/DeferredAction.java Fri Jan  4 07:47:28 2008
@@ -15,15 +15,13 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/
+ */
 
 package org.apache.yoko.tools.processors.idl;
 
-import org.apache.ws.commons.schema.XmlSchemaType;
-import org.apache.yoko.wsdl.CorbaTypeImpl;
+/**
+ * Marker Interface to denote a deferred action for a forward declared idl object.
+ */
 
 public interface DeferredAction {
-
-    void doDeferredAction(XmlSchemaType stype, CorbaTypeImpl ctype);    
-    
 }

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/DeferredActionCollection.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/DeferredActionCollection.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/DeferredActionCollection.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/DeferredActionCollection.java Fri Jan  4 07:47:28 2008
@@ -15,60 +15,55 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/
+ */
 
 package org.apache.yoko.tools.processors.idl;
 
 import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
-// Class that holds a fully qualified name as the key that represents
-// a type that was forward declared. 
-// Associated with each fully qualified name is a list of actions.
-// Each action represents a task that is deferred until 
-// the type is really declared. 
-public final class DeferredActionCollection {
-    
-    Map deferredActions = new HashMap<String, List>();
-    
-    public void add(DeferredActionBase action) {
-        Object obj = deferredActions.get(action.getFullyQualifiedName().toString());
-        List list = null;
+import org.apache.cxf.helpers.CastUtils;
+
+/**
+ * Class that holds a fully qualified name as the key that represents
+ * a type that was forward declared. 
+ * Associated with each fully qualified name is a list of actions.
+ * Each action represents a task that is deferred until 
+ * the type is really declared. 
+ */
+
+public final class DeferredActionCollection {    
+    Map<String, List<Object>> deferredActions = new HashMap<String, List<Object>>();
+    public void add(Scope scope, DeferredAction action) {
+        Object obj = deferredActions.get(scope.toString());
+        List<Object> list;
         if (obj == null) {
-            // create a new list and add first action
-            list = new ArrayList();
-            list.add(action);
+            list = new ArrayList<Object>();
+            deferredActions.put(scope.toString(), list);
         } else {
-            // add action to list of actions for that scope
-            list = (ArrayList)obj;
-            list.add(action);
+            list = CastUtils.cast((List)obj);
         }
-        deferredActions.put(action.getFullyQualifiedName().toString(), list);
+        list.add(action);
     }
     
-    public void remove(DeferredActionBase action) {
-        deferredActions.remove(action.getFullyQualifiedName().toString());
+    public void remove(Scope scope, DeferredAction action) {
+        List list = deferredActions.get(scope.toString());
+        if (list != null) {
+            list.remove(action);
+        }
+    }
+
+    public void removeScope(Scope scope) {
+        deferredActions.remove(scope.toString());
     }
                    
     public int getSize() {
-        return deferredActions.size();   
+        return deferredActions.size();
     }
     
-    public List getActionsList(Scope scope) {        
-    
-        List list = new ArrayList();
-        if (deferredActions.size() > 0) {
-            for (Iterator iter = deferredActions.keySet().iterator(); iter.hasNext();) {
-                //Scope key = (Scope)iter.next();
-                String key = (String)iter.next();
-                if (key.equals(scope.toString())) {
-                    return list = (List)deferredActions.get(key);                    
-                }
-            }
-        }           
-        return list;
+    public List getActions(Scope scope) {   
+        return deferredActions.get(scope.toString());
     }
 }

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/DefinitionVisitor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/DefinitionVisitor.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/DefinitionVisitor.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/DefinitionVisitor.java Fri Jan  4 07:47:28 2008
@@ -15,7 +15,7 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/
+ */
 
 package org.apache.yoko.tools.processors.idl;
 
@@ -23,14 +23,15 @@
 
 import antlr.collections.AST;
 
+import org.apache.ws.commons.schema.XmlSchema;
+
 public class DefinitionVisitor extends VisitorBase {
     
-    private Definition definition;
-
     public DefinitionVisitor(Scope scope,
+                             Definition defn,
+                             XmlSchema schemaRef,
                              WSDLASTVisitor wsdlVisitor) {
-        super(scope, wsdlVisitor);
-        definition = wsdlVisitor.getDefinition();
+        super(scope, defn, schemaRef, wsdlVisitor);
     }
 
     public void visit(AST node) {
@@ -50,34 +51,104 @@
         }
         case IDLTokenTypes.LITERAL_module: {
             ModuleVisitor moduleVisitor = new ModuleVisitor(getScope(),
+                                                            definition,
+                                                            schema,
                                                             wsdlVisitor);
             moduleVisitor.visit(node);
             break;
         }
         case IDLTokenTypes.LITERAL_interface: {
+            Definition newDefinition = createDefinition(null);
             PortTypeVisitor portTypeVisitor = new PortTypeVisitor(getScope(),
+                                                                  newDefinition,
+                                                                  schema,
                                                                   wsdlVisitor);
             portTypeVisitor.visit(node);
             break;
         }
         case IDLTokenTypes.LITERAL_exception: {
+            XmlSchema newSchema = createSchema();
+            Definition newDefinition = createDefinition(newSchema);
             ExceptionVisitor exceptionVisitor = new ExceptionVisitor(getScope(),
+                                                                     newDefinition,
+                                                                     newSchema,
                                                                      wsdlVisitor);
             exceptionVisitor.visit(node);
             break;
         }
         case IDLTokenTypes.LITERAL_const: {
+            XmlSchema newSchema = createSchema();
             ConstVisitor constVisitor = new ConstVisitor(getScope(),
+                                                         definition,
+                                                         newSchema,
                                                          wsdlVisitor);
             constVisitor.visit(node);
             break;
         }
         default: {
+            XmlSchema newSchema = createSchema();
             TypeDclVisitor typeDclVisitor = new TypeDclVisitor(getScope(),
+                                                               definition,
+                                                               newSchema,
                                                                wsdlVisitor);
             typeDclVisitor.visit(node);
         }
         
         }
     }
+
+    /**
+     * Creates the XmlSchema corresponding to the module scope if none exists
+     */
+    private XmlSchema createSchema() {
+        String tns = mapper.map(getScope());
+        XmlSchema xmlSchema = schema;
+        if (tns != null) {
+            xmlSchema = manager.getXmlSchema(tns);
+            if (xmlSchema == null) {
+                xmlSchema = manager.createXmlSchema(tns, schemas);
+            }
+        }
+
+        return xmlSchema;
+    }
+
+    /**
+     * Creates the WSDL definition correspoinding to the module scope if none exists
+     */
+    private Definition createDefinition(XmlSchema schema) {
+        String tns = mapper.map(getScope());
+        Definition defn = definition;
+        if (tns != null) {
+            defn = manager.getWSDLDefinition(tns);
+            if (defn == null) {
+                try {
+                    defn = manager.createWSDLDefinition(tns);
+                    String key = getScope().toString("_");
+                    String fileName = getWsdlVisitor().getOutputDir()
+                        + System.getProperty("file.separator")
+                        + key;
+                    manager.addWSDLDefinitionImport(definition,
+                                                    defn,
+                                                    key,
+                                                    fileName);
+                    if (schema == null) {
+                        schema = manager.getXmlSchema(tns);
+                    }
+                    if (schema != null) {
+                        // add a schema based on the module with a corresponding import to the actual schema
+                        manager.addWSDLSchemaImport(defn, tns, fileName);
+                        // make sure that if we are adding the import to the wsdl, then we also
+                        // add the schema to the list of imported schemas
+                        manager.getImportedXmlSchemas().put(new java.io.File(fileName + ".xsd"),
+                                                            schema);
+                    }
+                } catch (Exception ex) {
+                    throw new RuntimeException(ex);
+                }
+            }
+        }
+        return defn;
+    }
+    
 }

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/EnumVisitor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/EnumVisitor.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/EnumVisitor.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/EnumVisitor.java Fri Jan  4 07:47:28 2008
@@ -15,10 +15,11 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/
+ */
 
 package org.apache.yoko.tools.processors.idl;
 
+import javax.wsdl.Definition;
 import javax.xml.namespace.QName;
 
 import antlr.collections.AST;
@@ -26,6 +27,7 @@
 import org.apache.schemas.yoko.bindings.corba.Enum;
 import org.apache.schemas.yoko.bindings.corba.Enumerator;
 
+import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaEnumerationFacet;
 import org.apache.ws.commons.schema.XmlSchemaSimpleType;
 import org.apache.ws.commons.schema.XmlSchemaSimpleTypeRestriction;
@@ -35,8 +37,10 @@
 public class EnumVisitor extends VisitorBase {
 
     public EnumVisitor(Scope scope,
+                       Definition defn,
+                       XmlSchema schemaRef,
                        WSDLASTVisitor wsdlVisitor) {
-        super(scope, wsdlVisitor);
+        super(scope, defn, schemaRef, wsdlVisitor);
     }
     
     public static boolean accept(AST node) {
@@ -56,7 +60,7 @@
 
         // xmlschema:enum
         XmlSchemaSimpleType enumSchemaSimpleType = new XmlSchemaSimpleType(schema);
-        enumSchemaSimpleType.setName(enumNameScope.toString());
+        enumSchemaSimpleType.setName(mapper.mapToQName(enumNameScope));
         
         XmlSchemaSimpleTypeRestriction enumSchemaSimpleTypeRestriction = new XmlSchemaSimpleTypeRestriction();
         enumSchemaSimpleTypeRestriction.setBaseTypeName(Constants.XSD_STRING);

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ExceptionDeferredAction.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ExceptionDeferredAction.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ExceptionDeferredAction.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ExceptionDeferredAction.java Fri Jan  4 07:47:28 2008
@@ -15,7 +15,7 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/
+ */
 
 package org.apache.yoko.tools.processors.idl;
 
@@ -25,30 +25,26 @@
 import org.apache.yoko.tools.common.ReferenceConstants;
 import org.apache.yoko.wsdl.CorbaTypeImpl;
 
-public class ExceptionDeferredAction extends DeferredActionBase {
+public class ExceptionDeferredAction implements SchemaDeferredAction {
 
     protected MemberType member;
     protected XmlSchemaElement element;
     
     
-    public ExceptionDeferredAction(MemberType memberType, XmlSchemaElement elem,
-                                  Scope scope) {                           
-        super(scope);
+    public ExceptionDeferredAction(MemberType memberType, XmlSchemaElement elem) {
         member = memberType;
         element = elem;        
     }
     
-    public ExceptionDeferredAction(MemberType memberType, Scope scope) {                           
-        super(scope);
+    public ExceptionDeferredAction(MemberType memberType) {
         member = memberType;         
     }
     
-    public ExceptionDeferredAction(XmlSchemaElement elem, Scope scope) {                           
-        super(scope);
+    public ExceptionDeferredAction(XmlSchemaElement elem) {
         element = elem;               
     }
     
-    public void doDeferredAction(XmlSchemaType stype, CorbaTypeImpl ctype) {
+    public void execute(XmlSchemaType stype, CorbaTypeImpl ctype) {
         if (member != null) {
             member.setIdltype(ctype.getQName());
         }
@@ -62,6 +58,7 @@
     }
        
 }
+
 
 
 

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ExceptionVisitor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ExceptionVisitor.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ExceptionVisitor.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ExceptionVisitor.java Fri Jan  4 07:47:28 2008
@@ -15,10 +15,13 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/
+ */
 
 package org.apache.yoko.tools.processors.idl;
 
+import javax.wsdl.Definition;
+import javax.wsdl.Message;
+import javax.wsdl.Part;
 import javax.xml.namespace.QName;
 
 import antlr.collections.AST;
@@ -26,6 +29,7 @@
 import org.apache.schemas.yoko.bindings.corba.Exception;
 import org.apache.schemas.yoko.bindings.corba.MemberType;
 
+import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaComplexType;
 import org.apache.ws.commons.schema.XmlSchemaElement;
 import org.apache.ws.commons.schema.XmlSchemaSequence;
@@ -39,8 +43,10 @@
     private static final String TYPE_SUFFIX = "Type";
     
     public ExceptionVisitor(Scope scope,
+                            Definition defn,
+                            XmlSchema schemaRef,
                             WSDLASTVisitor wsdlASTVisitor) {
-        super(scope, wsdlASTVisitor);
+        super(scope, defn, schemaRef, wsdlASTVisitor);
     }
 
     public static boolean accept(AST node) {
@@ -71,9 +77,9 @@
         
         // xmlschema:exception
         Scope scopedName = new Scope(getScope(), identifierNode);
-        String exceptionName = scopedName.toString();
+        String exceptionName = mapper.mapToQName(scopedName);
         XmlSchemaElement element = new XmlSchemaElement();
-        element.setName(exceptionName);
+        element.setName(mapper.mapToQName(scopedName));
         element.setQName(new QName(schema.getTargetNamespace(), exceptionName));
 
         String exceptionTypeName = exceptionName + TYPE_SUFFIX;
@@ -99,6 +105,8 @@
             AST memberNode = memberTypeNode.getNextSibling();
 
             TypesVisitor visitor = new TypesVisitor(exceptionScope,
+                                                    definition,
+                                                    schema,
                                                     wsdlVisitor,
                                                     null);
             visitor.visit(memberTypeNode);
@@ -111,11 +119,13 @@
                 Scope anonScope = new Scope(exceptionScope, 
                                             TypesUtils.getCorbaTypeNameNode(memberTypeNode));
                 ArrayVisitor arrayVisitor = new ArrayVisitor(anonScope,
+                                                             definition,
+                                                             schema,
                                                              wsdlVisitor,
-                                                             stype,
-                                                             ctype,
                                                              null,
                                                              fullyQualifiedName);
+                arrayVisitor.setSchemaType(stype);
+                arrayVisitor.setCorbaType(ctype);
                 arrayVisitor.visit(memberNode);
                 stype = arrayVisitor.getSchemaType();
                 ctype = arrayVisitor.getCorbaType();
@@ -144,6 +154,27 @@
         
         setSchemaType(complexType);
         setCorbaType(exception);
+        createFaultMessage(element.getQName());
+    }
+
+    private void createFaultMessage(QName qname) {
+        String exceptionName = qname.getLocalPart();
+        // messages
+        Message faultMsg = definition.createMessage();
+
+        faultMsg.setQName(new QName(definition.getTargetNamespace(), exceptionName));        
+        faultMsg.setUndefined(false);
+        // message - part
+        Part part = definition.createPart();
+        part.setName("exception");           
+        part.setElementName(qname);
+        faultMsg.addPart(part);
+
+        //add the fault element namespace to the definition
+        String nsURI = qname.getNamespaceURI();
+        manager.addWSDLDefinitionNamespace(definition, mapper.mapNSToPrefix(nsURI), nsURI);
+
+        definition.addMessage(faultMsg);
     }
     
     private XmlSchemaElement createElementType(AST memberNode, XmlSchemaType stype,
@@ -160,7 +191,7 @@
             }
         } else {
             wsdlVisitor.getDeferredActions().
-                add(new ExceptionDeferredAction(member, fqName)); 
+                add(fqName, new ExceptionDeferredAction(member)); 
         }
         return member;
     }
@@ -174,7 +205,7 @@
             memberType.setIdltype(ctype.getQName());
         } else {
             wsdlVisitor.getDeferredActions().
-                add(new ExceptionDeferredAction(memberType, fqName));
+                add(fqName, new ExceptionDeferredAction(memberType));
         }
         
         return memberType;

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/FixedPtConstVisitor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/FixedPtConstVisitor.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/FixedPtConstVisitor.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/FixedPtConstVisitor.java Fri Jan  4 07:47:28 2008
@@ -15,14 +15,16 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/
+ */
 
 package org.apache.yoko.tools.processors.idl;
 
+import javax.wsdl.Definition;
 import javax.xml.namespace.QName;
 
 import antlr.collections.AST;
 
+import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaCollection;
 import org.apache.ws.commons.schema.XmlSchemaType;
 import org.apache.ws.commons.schema.constants.Constants;
@@ -33,11 +35,15 @@
         
     private XmlSchemaType schemaType;
     private CorbaTypeImpl corbaType;
-    private Scope scope;   
+    private Scope scope;
+    private Scope moduleScope;
     private XmlSchemaCollection schemas;
     
     
-    public FixedPtConstVisitor(Scope scopeRef, XmlSchemaCollection xmlSchemas) {
+    public FixedPtConstVisitor(Scope scopeRef,
+                               Definition defn,
+                               XmlSchema schemaRef,
+                               XmlSchemaCollection xmlSchemas) {
         scope = scopeRef;
         schemas = xmlSchemas;
     }

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/FixedVisitor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/FixedVisitor.java?rev=608894&r1=608893&r2=608894&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/FixedVisitor.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/FixedVisitor.java Fri Jan  4 07:47:28 2008
@@ -15,16 +15,19 @@
  * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/
+ */
 
 package org.apache.yoko.tools.processors.idl;
 
+import javax.wsdl.Definition;
+
 import javax.xml.namespace.QName;
 
 import antlr.collections.AST;
 
 import org.apache.schemas.yoko.bindings.corba.Fixed;
 
+import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaFractionDigitsFacet;
 import org.apache.ws.commons.schema.XmlSchemaSimpleType;
 import org.apache.ws.commons.schema.XmlSchemaSimpleTypeRestriction;
@@ -36,9 +39,11 @@
     private AST identifierNode;
     
     public FixedVisitor(Scope scope,
+                        Definition defn,
+                        XmlSchema schemaRef,
                         WSDLASTVisitor wsdlVisitor,
                         AST identifierNodeRef) {
-        super(scope, wsdlVisitor);
+        super(scope, defn, schemaRef, wsdlVisitor);
         identifierNode = identifierNodeRef;
     }
     
@@ -103,7 +108,7 @@
         fixedFractionDigits.setFixed(true);
         fixedRestriction.getFacets().add(fixedTotalDigits);
         fixedRestriction.getFacets().add(fixedFractionDigits);
-        fixedSimpleType.setName(scopedName.toString());
+        fixedSimpleType.setName(mapper.mapToQName(scopedName));
         fixedSimpleType.setContent(fixedRestriction);
 
         // add xmlschema:fixed

Added: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/IDLModuleProcessor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/IDLModuleProcessor.java?rev=608894&view=auto
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/IDLModuleProcessor.java (added)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/IDLModuleProcessor.java Fri Jan  4 07:47:28 2008
@@ -0,0 +1,64 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.yoko.tools.processors.idl;
+
+import java.util.Map;
+
+import antlr.collections.AST;
+
+import org.apache.yoko.tools.common.ToolCorbaConstants;
+
+
+public class IDLModuleProcessor extends IDLProcessor {
+
+    ModuleToNSMapper mapper;
+
+    public IDLModuleProcessor() {
+        super();
+        mapper = new ModuleToNSMapper();
+        mapper.setDefaultMapping(false);
+    }
+    
+    public ModuleToNSMapper getMapper() {
+        return mapper;
+    }
+
+    public void buildModuleNSMap(Map<String, String> moduleNSMap) {
+        AST node = getIDLTree();
+        Scope rootScope = new Scope();
+        buildModuleNSMap(moduleNSMap, rootScope, node);
+    }
+
+    public void buildModuleNSMap(Map<String, String> map, Scope parent, AST node) {
+        while (node != null) {
+            if (node.getType() == IDLTokenTypes.LITERAL_module) {
+                AST identifierNode = node.getFirstChild();
+                AST definitionNode = identifierNode.getNextSibling();
+                Scope moduleScope = new Scope(parent, identifierNode);
+                String scope = moduleScope.toString(ToolCorbaConstants.MODULE_SEPARATOR);
+                if (!map.containsKey(scope)) {
+                    map.put(scope, mapper.map(moduleScope));
+                }
+                buildModuleNSMap(map, moduleScope, definitionNode);
+            }
+            node = node.getNextSibling();
+        }
+    }
+
+}

Propchange: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/IDLModuleProcessor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/IDLModuleProcessor.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date