incubator-yoko-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eno...@apache.org
Subject svn commit: r441038 - in /incubator/yoko/trunk/tools/src: main/java/org/apache/yoko/tools/common/idltypes/ main/java/org/apache/yoko/tools/processors/wsdl/ test/java/org/apache/yoko/tools/processors/ test/resources/idlgen/ test/resources/wsdl/
Date Thu, 07 Sep 2006 09:54:12 GMT
Author: enolan
Date: Thu Sep  7 02:54:11 2006
New Revision: 441038

URL: http://svn.apache.org/viewvc?view=rev&rev=441038
Log:
Yoko- 118,119,120,121,122 0- Supoort for Anonymous types in binding and typemapping creation and also in idl generaton.

Added:
    incubator/yoko/trunk/tools/src/test/resources/idlgen/anonfixed.wsdl   (with props)
    incubator/yoko/trunk/tools/src/test/resources/idlgen/anontype.wsdl   (with props)
    incubator/yoko/trunk/tools/src/test/resources/idlgen/expected_anonfixed.idl
    incubator/yoko/trunk/tools/src/test/resources/idlgen/expected_anontype.idl
    incubator/yoko/trunk/tools/src/test/resources/wsdl/anon.wsdl   (with props)
    incubator/yoko/trunk/tools/src/test/resources/wsdl/anonfixed.wsdl   (with props)
Modified:
    incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/common/idltypes/IdlAnonArray.java
    incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/common/idltypes/IdlAnonFixed.java
    incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaBinding.java
    incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToIDLAction.java
    incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLTypes.java
    incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToCorbaBindingTest.java
    incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToIDLGenerationTest.java

Modified: incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/common/idltypes/IdlAnonArray.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/common/idltypes/IdlAnonArray.java?view=diff&rev=441038&r1=441037&r2=441038
==============================================================================
--- incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/common/idltypes/IdlAnonArray.java (original)
+++ incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/common/idltypes/IdlAnonArray.java Thu Sep  7 02:54:11 2006
@@ -27,7 +27,7 @@
         super(parent, "", elem, size);
     }
     
-    static IdlAnonArray create(IdlScopeBase parent, IdlType elem, int size) {
+    public static IdlAnonArray create(IdlScopeBase parent, IdlType elem, int size) {
         return new IdlAnonArray(parent, elem, size);
     }  
     

Modified: incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/common/idltypes/IdlAnonFixed.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/common/idltypes/IdlAnonFixed.java?view=diff&rev=441038&r1=441037&r2=441038
==============================================================================
--- incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/common/idltypes/IdlAnonFixed.java (original)
+++ incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/common/idltypes/IdlAnonFixed.java Thu Sep  7 02:54:11 2006
@@ -26,6 +26,7 @@
     private IdlAnonFixed(IdlScopeBase parent, int digits, int scale) {
         super(parent, "", digits, scale);
     }
+    
     public static IdlAnonFixed create(IdlScopeBase parent, int digits, int scale) {
         return new IdlAnonFixed(parent, digits, scale);
     }

Modified: incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaBinding.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaBinding.java?view=diff&rev=441038&r1=441037&r2=441038
==============================================================================
--- incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaBinding.java (original)
+++ incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaBinding.java Thu Sep  7 02:54:11 2006
@@ -27,6 +27,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.StringTokenizer;
 import java.util.TreeSet;
 import java.util.logging.Level;
 import java.util.logging.Logger;
@@ -49,14 +50,12 @@
 
 import org.apache.schemas.yoko.bindings.corba.Anonarray;
 import org.apache.schemas.yoko.bindings.corba.Anonsequence;
-//import org.apache.schemas.yoko.bindings.corba.Anonstring;
 import org.apache.schemas.yoko.bindings.corba.ArgType;
 import org.apache.schemas.yoko.bindings.corba.Array;
 import org.apache.schemas.yoko.bindings.corba.BindingType;
 import org.apache.schemas.yoko.bindings.corba.CaseType;
 import org.apache.schemas.yoko.bindings.corba.Enum;
 import org.apache.schemas.yoko.bindings.corba.Enumerator;
-//import org.apache.schemas.yoko.bindings.corba.Fixed;
 import org.apache.schemas.yoko.bindings.corba.MemberType;
 import org.apache.schemas.yoko.bindings.corba.OperationType;
 import org.apache.schemas.yoko.bindings.corba.ParamType;
@@ -77,6 +76,8 @@
 import org.apache.ws.commons.schema.XmlSchemaElement;
 import org.apache.ws.commons.schema.XmlSchemaEnumerationFacet;
 import org.apache.ws.commons.schema.XmlSchemaFacet;
+import org.apache.ws.commons.schema.XmlSchemaLengthFacet;
+import org.apache.ws.commons.schema.XmlSchemaMaxLengthFacet;
 import org.apache.ws.commons.schema.XmlSchemaObjectTable;
 import org.apache.ws.commons.schema.XmlSchemaParticle;
 import org.apache.ws.commons.schema.XmlSchemaSequence;
@@ -318,6 +319,7 @@
         } catch (Exception ex) {
             ex.printStackTrace();
         }
+        
         return binding;
     }
 
@@ -384,10 +386,9 @@
         try {
             operationType = (OperationType)extReg.createExtension(BindingOperation.class,
                                                                   CORBAConstants.NE_CORBA_OPERATION);
-        } catch (WSDLException wse) {
-            System.out.println("ERROR**************8");
-            // Message msg = new Message("FAIL_TO_CREATE_BINDINGOPERATION", LOG);
-            // throw new ToolException(msg, wse);
+        } catch (WSDLException wse) {            
+            LOG.log(Level.SEVERE, "Failed to create a Binding Operation extension", wse);
+            throw new Exception(LOG.toString(), wse);
         }
 
         operationType.setName(op.getName());
@@ -419,7 +420,7 @@
         bo.addExtensibilityElement(operationType);
     }
 
-    private void addCorbaTypes(Definition definition) throws Exception {    
+    private void addCorbaTypes(Definition definition) throws Exception {        
         try {
             typeMappingType = (TypeMappingType)extReg
                 .createExtension(Definition.class, CORBAConstants.NE_CORBA_TYPEMAPPING);
@@ -434,9 +435,9 @@
                 Iterator i = objs.getValues();                
                 while (i.hasNext()) {                
                     XmlSchemaType type = (XmlSchemaType)i.next();
-                    corbaTypeImpl = convertSchemaToCorbaType(type, null, null, false);               
-                    if (corbaTypeImpl != null) { 
-                        //&& (getLocalType(corbaTypeImpl.getQName()) == null)) {
+                    boolean anonymous = isAnonymous(type.getName());
+                    corbaTypeImpl = convertSchemaToCorbaType(type, null, null, anonymous);               
+                    if (corbaTypeImpl != null) {                         
                         if (corbaTypeImpl.getQName() != null) {
                             corbaTypeImpl.setQName(null);
                         }
@@ -449,10 +450,16 @@
                 XmlSchemaObjectTable elements = xmlSchemaTypes.getElements();                            
                 Iterator i2 = elements.getValues();                
                 while (i2.hasNext()) {                
-                    XmlSchemaElement el = (XmlSchemaElement)i2.next();                    
+                    XmlSchemaElement el = (XmlSchemaElement)i2.next();
+                    boolean anonymous = false;
+                    if (el.getSchemaType() == null) {
+                        anonymous = true;
+                    } else {
+                        anonymous = isAnonymous(el.getSchemaType().getName());
+                    }
                     corbaTypeImpl = 
                         convertSchemaToCorbaType(el.getSchemaType(),
-                                                 el.getQName(), el.getSchemaType(), false);               
+                                                 el.getQName(), el.getSchemaType(), anonymous);               
                     if (corbaTypeImpl != null) { 
                         if (corbaTypeImpl.getQName() != null) {
                             corbaTypeImpl.setQName(null);        
@@ -467,8 +474,29 @@
         } catch (WSDLException ex) {
             ex.printStackTrace();
         }
+    }          
+
+    // checks if the type is an anonymous type.
+    private boolean isAnonymous(String typeName) {
+        boolean anonymous = false;
+        
+        if (typeName == null) {
+            anonymous = true;
+        } else {                                                  
+            StringTokenizer strtok = new StringTokenizer(typeName, ".");
+            for (int i = 0; strtok.hasMoreTokens(); ++i) {
+                String token = strtok.nextToken();
+                if (token.startsWith("_")) {                    
+                    if (Character.isDigit(token.charAt(1))) {
+                        anonymous = true;
+                        break;
+                    }                    
+                }
+            }
+        }
+        return anonymous;
     }
-       
+    
     private boolean queryBinding(Definition definition, QName bqname) {
         Map bindings = definition.getBindings();
         Iterator i = bindings.values().iterator();
@@ -493,7 +521,7 @@
         if (stype instanceof XmlSchemaComplexType) {            
             return corbaTypeImpl = processComplexType((XmlSchemaComplexType)stype, defaultName, anonymous);
         } else if (stype instanceof XmlSchemaSimpleType) {            
-            return corbaTypeImpl = processSimpleType((XmlSchemaSimpleType)stype, defaultName);
+            return corbaTypeImpl = processSimpleType((XmlSchemaSimpleType)stype, defaultName, anonymous);
         }  else if (xmlSchemaType.getElementByName(stype.getQName()) != null) {
             XmlSchemaElement el = xmlSchemaType.getElementByName(stype.getQName());
             return corbaTypeImpl = processElementType(el, defaultName);
@@ -716,8 +744,13 @@
             QName name = createQNameTargetNamespace(elemtype.getQName().getLocalPart() + "_nil");
             membertype = createNillableUnion(name, element.getQName(), elemtype.getQName());
         } else {
+            // Need TO DO
+            // Need to check if its referencing a type first refname=""
+            //if (element.getRefName()
             XmlSchemaType st = element.getSchemaType();
-            membertype = convertSchemaToCorbaType(st, element.getQName(), st, false);
+            boolean anonymous = isAnonymous(st.getName());
+            //membertype = convertSchemaToCorbaType(st, element.getQName(), st, false);
+            membertype = convertSchemaToCorbaType(st, element.getQName(), st, anonymous);
         }
 
         if (!(element.getMaxOccurs() == 1) || !(element.getMinOccurs() == 1)) {
@@ -786,7 +819,7 @@
         }        
         
         type = struct;
-                
+                              
         if (!"1".equals(seq.getMaxOccurs()) || !"1".equals(seq.getMinOccurs())) {
             QName name = createQNameTargetNamespace(type.getQName().getLocalPart() + "Array");            
             CorbaTypeImpl atype = createArray(name, type.getQName(), type.getQName(),
@@ -872,7 +905,7 @@
 
     }
 
-    private CorbaTypeImpl processSimpleType(XmlSchemaSimpleType stype, QName defaultName)
+    private CorbaTypeImpl processSimpleType(XmlSchemaSimpleType stype, QName defaultName, boolean anonymous)
         throws Exception {
 
         CorbaTypeImpl corbaTypeImpl = null;
@@ -888,7 +921,7 @@
         }        
         
         if (stype.getContent() instanceof XmlSchemaSimpleTypeRestriction) {
-            corbaTypeImpl = processSimpleRestrictionType(stype, name, schematypeName);
+            corbaTypeImpl = processSimpleRestrictionType(stype, name, schematypeName, anonymous);
         } else if (stype.getContent() instanceof XmlSchemaSimpleTypeList) {
             XmlSchemaSimpleTypeList ltype = (XmlSchemaSimpleTypeList)stype.getContent();
             CorbaTypeImpl itemType = null;
@@ -914,7 +947,8 @@
     }
     
     private CorbaTypeImpl processSimpleRestrictionType(XmlSchemaSimpleType stype,
-                                                       QName name, QName schematypeName) 
+                                                       QName name, QName schematypeName,
+                                                       boolean anonymous) 
         throws Exception {
         CorbaTypeImpl corbaTypeImpl = null;
     
@@ -945,10 +979,10 @@
             Iterator i = restrictionType.getFacets().getIterator();
             while (i.hasNext()) {
                 XmlSchemaFacet val = (XmlSchemaFacet)i.next();
-                if (val.getValue().toString().equals("maxlength")) {
+                if (val instanceof XmlSchemaMaxLengthFacet) {                
                     maxLength = val.getValue().toString();
                 }
-                if (val.getValue().toString().equals("length")) {
+                if (val instanceof XmlSchemaLengthFacet) {
                     length = val.getValue().toString();
                 }
             }
@@ -960,7 +994,8 @@
                         wsdltypes.processStringType(corbaTypeImpl, name, maxLength, length);                
                 } else if (corbaTypeImpl.getType().equals(W3CConstants.NT_SCHEMA_DECIMAL)
                     || (baseName.equals(W3CConstants.NT_SCHEMA_DECIMAL))) {                
-                    corbaTypeImpl = wsdltypes.processDecimalType(restrictionType, name, corbaTypeImpl);
+                    corbaTypeImpl = wsdltypes.processDecimalType(restrictionType, name, 
+                                                                 corbaTypeImpl, anonymous);
                 } else if ((corbaTypeImpl.getType().equals(W3CConstants.NT_SCHEMA_BASE64))
                     || (baseName.equals(W3CConstants.NT_SCHEMA_BASE64))
                     || (corbaTypeImpl.getType().equals(W3CConstants.NT_SCHEMA_HBIN))
@@ -1090,6 +1125,11 @@
                     // it's a literal array
                     array = true;
                 }
+                if (el.getMaxOccurs() == 1 && el.getMinOccurs() == 1) {
+                    if (type.getName() != null &&  isAnonymous(type.getName())) {                
+                        array = true;
+                    }
+                }
             }
         }
         return array;
@@ -1112,10 +1152,14 @@
         
         if (min == max) {
             if (max == 1) {
-                String msg = "Couldn't Map to Array:" + name + ":minOccurs=" 
-                    + minOccurs + ":maxOccurs=" + maxOccurs;
-                LOG.log(Level.WARNING, msg.toString());
-                return null;
+                if (!anonymous) {
+                    String msg = "Couldn't Map to Array:" + name + ":minOccurs=" 
+                        + minOccurs + ":maxOccurs=" + maxOccurs;
+                    LOG.log(Level.WARNING, msg.toString());
+                    return null;
+                } else {
+                    return mapToArray(name, schematypeName, arrayType, max, anonymous);
+                }
             } else {
                 return mapToArray(name, schematypeName, arrayType, max, anonymous);
             }
@@ -1495,7 +1539,7 @@
             Iterator iter = seq.getItems().getIterator();
             while (iterator.hasNext()) {
                 if (iter.next() instanceof XmlSchemaElement) {
-                    arrayEl = (XmlSchemaElement)iterator.next();
+                    arrayEl = (XmlSchemaElement)iterator.next();                    
                     arrayType = convertSchemaToCorbaType(arrayEl.getSchemaType(), 
                                                            arrayEl.getQName(), 
                                                            arrayEl.getSchemaType(), true);
@@ -1515,7 +1559,7 @@
             maxOccurs = arrayEl.getMaxOccurs();
             minOccurs = arrayEl.getMinOccurs();
         }
-
+        
         return createArray(name, schematypeName, 
                            checkPrefix(arrayType.getQName()), maxOccurs, minOccurs, anonymous);     
     }

Modified: incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToIDLAction.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToIDLAction.java?view=diff&rev=441038&r1=441037&r2=441038
==============================================================================
--- incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToIDLAction.java (original)
+++ incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToIDLAction.java Thu Sep  7 02:54:11 2006
@@ -37,6 +37,9 @@
 import javax.xml.bind.JAXBException;
 import javax.xml.namespace.QName;
 
+import org.apache.schemas.yoko.bindings.corba.Anonarray;
+import org.apache.schemas.yoko.bindings.corba.Anonfixed;
+import org.apache.schemas.yoko.bindings.corba.Anonsequence;
 import org.apache.schemas.yoko.bindings.corba.Anonstring;
 import org.apache.schemas.yoko.bindings.corba.ArgType;
 import org.apache.schemas.yoko.bindings.corba.Array;
@@ -55,6 +58,9 @@
 import org.apache.schemas.yoko.bindings.corba.Unionbranch;
 import org.apache.yoko.tools.common.CORBAConstants;
 import org.apache.yoko.tools.common.idltypes.CorbaUtils;
+import org.apache.yoko.tools.common.idltypes.IdlAnonArray;
+import org.apache.yoko.tools.common.idltypes.IdlAnonFixed;
+import org.apache.yoko.tools.common.idltypes.IdlAnonSequence;
 import org.apache.yoko.tools.common.idltypes.IdlArray;
 import org.apache.yoko.tools.common.idltypes.IdlAttribute;
 import org.apache.yoko.tools.common.idltypes.IdlDefn;
@@ -472,6 +478,8 @@
             result = createEnum(corbaTypeImpl, scope, local);
         } else if (corbaTypeImpl instanceof Sequence) {
             result = createSequence(corbaTypeImpl, scope, local);
+        } else if (corbaTypeImpl instanceof Anonsequence) {
+            result = createAnonSequence(corbaTypeImpl, scope, local);
         } else if (corbaTypeImpl 
             instanceof org.apache.schemas.yoko.bindings.corba.Exception) {
             result = createIdlException(corbaTypeImpl, scope, local);
@@ -481,8 +489,12 @@
             result = createUnion(corbaTypeImpl, scope, local);
         } else if (corbaTypeImpl instanceof Array) {
             result = createArray(corbaTypeImpl, scope, local);
+        } else if (corbaTypeImpl instanceof Anonarray) {
+            result = createAnonArray(corbaTypeImpl, scope, local);
         } else if (corbaTypeImpl instanceof Fixed) {
             result = createFixed(corbaTypeImpl, scope, local);
+        } else if (corbaTypeImpl instanceof Anonfixed) {
+            result = createAnonFixed(corbaTypeImpl, scope, local);
         } else {
             result = checkAnon(corbaTypeImpl, scope, local);                                    
         }
@@ -622,6 +634,16 @@
         return idlType;
     }
     
+    private IdlType createAnonSequence(CorbaTypeImpl ctype, IdlScopeBase scope, String local) {
+        IdlType idlType = null;
+        Anonsequence s = (Anonsequence)ctype;
+        IdlType base = findType(s.getElemtype());        
+        int bound = (int)s.getBound();
+        idlType = IdlAnonSequence.create(scope, base, bound);
+        scope.addToScope(idlType);
+        return idlType;
+    }
+    
     private IdlType createArray(CorbaTypeImpl ctype, IdlScopeBase scope, String local) {
         IdlType idlType = null;
         Array s = (Array)ctype;
@@ -632,6 +654,16 @@
         return idlType;
     }
     
+    private IdlType createAnonArray(CorbaTypeImpl ctype, IdlScopeBase scope, String local) {
+        IdlType idlType = null;
+        Anonarray s = (Anonarray)ctype;
+        IdlType base = findType(s.getElemtype());        
+        int bound = (int)s.getBound();
+        idlType = IdlAnonArray.create(scope, base, bound);
+        scope.addToScope(idlType);
+        return idlType;
+    }
+    
     private IdlType createFixed(CorbaTypeImpl ctype, IdlScopeBase scope, String local) {
         IdlType idlType = null;
         Fixed f = (Fixed)ctype;     
@@ -639,6 +671,16 @@
         Long scale = f.getScale();        
         idlType = IdlFixed.create(scope, local, digits.intValue(),   
                                   scale.intValue());
+        scope.addToScope(idlType);
+        return idlType;
+    }
+    
+    private IdlType createAnonFixed(CorbaTypeImpl ctype, IdlScopeBase scope, String local) {
+        IdlType idlType = null;
+        Anonfixed f = (Anonfixed)ctype;     
+        Long digits = f.getDigits();
+        Long scale = f.getScale();        
+        idlType = IdlAnonFixed.create(scope, digits.intValue(), scale.intValue());
         scope.addToScope(idlType);
         return idlType;
     }

Modified: incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLTypes.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLTypes.java?view=diff&rev=441038&r1=441037&r2=441038
==============================================================================
--- incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLTypes.java (original)
+++ incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLTypes.java Thu Sep  7 02:54:11 2006
@@ -25,6 +25,7 @@
 
 import javax.xml.namespace.QName;
 
+import org.apache.schemas.yoko.bindings.corba.Anonfixed;
 import org.apache.schemas.yoko.bindings.corba.Anonstring;
 import org.apache.schemas.yoko.bindings.corba.Fixed;
 import org.apache.schemas.yoko.bindings.corba.Sequence;
@@ -45,7 +46,7 @@
     }
     
     public CorbaTypeImpl processStringType(CorbaTypeImpl corbaTypeImpl, QName name, 
-                                           String maxLength, String length) {
+                                           String maxLength, String length) throws Exception {
         boolean boundedString = true;        
         int bound = 0;
 
@@ -58,15 +59,16 @@
                 boundedString = false;
             }
         } catch (NumberFormatException ex) {
-            // throw new Exception("illegal number" , ex);
+            throw new Exception("illegal number" , ex);
         } catch (Exception e) {
-            // throw new Exception("illegal number" , e);
+            throw new Exception("illegal number" , e);
         }
 
         if (boundedString) {
             Anonstring anonString = new Anonstring();
             anonString.setBound(bound);
             anonString.setName(name.getLocalPart());
+            anonString.setQName(name);
             anonString.setType(CORBAConstants.NT_CORBA_STRING);
             corbaTypeImpl = anonString;
         }
@@ -74,7 +76,8 @@
     }
     
     public CorbaTypeImpl processDecimalType(XmlSchemaSimpleTypeRestriction restrictionType, 
-                                             QName name, CorbaTypeImpl corbaTypeImpl) {
+                                             QName name, CorbaTypeImpl corbaTypeImpl,
+                                             boolean anonymous) throws Exception {
                 
         String tdigits = null;
         String fdigits = null;
@@ -108,9 +111,10 @@
                 } else if (digits == 31) {
                     boundedDecimal = false;
                 }
-            } catch (NumberFormatException ex) {                        
-                //MessageDef msg = WSDLToCorbaMessages.RESTRICTION_TOTALDIGITS_ERROR;
-                //throw new IllegalCORBAStructException(msg.getLocalMessage(new Object[]{name}));
+            } catch (NumberFormatException ex) {
+                String msg = "totalDigits facet on the simple type restriction for type" 
+                    + name.getLocalPart() + "is incorrect.";
+                throw new Exception(msg);                                 
             }
         }
         
@@ -127,31 +131,48 @@
                     boundedScale = false;
                 }
             } catch (NumberFormatException ex) {
-                //MessageDef msg = WSDLToCorbaMessages.RESTRICTION_FRACTIONDIGITS_ERROR;
-                //throw new IllegalCORBAStructException(msg.getLocalMessage(new Object[]{name}));
+                String msg = "fractionDigits facet on the simple type restriction for type" 
+                    + name.getLocalPart() + " is incorrect.";                     
+                throw new Exception(msg);
             }
         }
 
         if (!boundedDecimal) {
-            Fixed fixed = (Fixed)corbaTypeImpl;
-            digits = Integer.parseInt(String.valueOf(fixed.getDigits()));
+            if (anonymous) {
+                Anonfixed fixed = (Anonfixed)corbaTypeImpl;
+                digits = Integer.parseInt(String.valueOf(fixed.getDigits()));
+            } else {
+                Fixed fixed = (Fixed)corbaTypeImpl;
+                digits = Integer.parseInt(String.valueOf(fixed.getDigits()));
+            }            
         }
 
         if (!boundedScale) {
-            Fixed fixed = (Fixed)corbaTypeImpl;
-            scale = Integer.parseInt(String.valueOf(fixed.getScale()));
+            if (anonymous) {
+                Anonfixed fixed = (Anonfixed)corbaTypeImpl;
+                scale = Integer.parseInt(String.valueOf(fixed.getScale()));
+            } else {
+                Fixed fixed = (Fixed)corbaTypeImpl;
+                scale = Integer.parseInt(String.valueOf(fixed.getScale()));
+            }
         }
 
         if (boundedDecimal || boundedScale) {
-            corbaTypeImpl = (CorbaTypeImpl)getFixedCorbaType(name, W3CConstants.NT_SCHEMA_DECIMAL, 
+            if (anonymous) { 
+                corbaTypeImpl = (CorbaTypeImpl)getAnonFixedCorbaType(name, W3CConstants.NT_SCHEMA_DECIMAL, 
+                                                                 digits, scale);
+            } else {
+                corbaTypeImpl = (CorbaTypeImpl)getFixedCorbaType(name, W3CConstants.NT_SCHEMA_DECIMAL, 
                                           digits, scale);
+            }
         }
         return corbaTypeImpl;
     }   
     
     
     public CorbaTypeImpl processBase64Type(CorbaTypeImpl corbaTypeImpl, QName name, 
-                                           String maxLength, String length) {
+                                           String maxLength, String length) 
+        throws Exception {
         int bound = 0;
         boolean boundedOctet = true;    
 
@@ -164,8 +185,9 @@
                 boundedOctet = false;
             }
         } catch (NumberFormatException ex) {
-            //MessageDef msg = WSDLToCorbaMessages.RESTRICTION_LENGTH_ERROR;
-            //throw new IllegalCORBAStructException(msg.getLocalMessage(new Object[]{name}));
+            String msg = "length facet on the simple type restriction for type"                 
+                + name.getLocalPart() + " is incorrect.";                     
+            throw new Exception(msg);
         }
 
         if (boundedOctet) {
@@ -175,8 +197,18 @@
         return corbaTypeImpl;
     }
     
-    public CorbaTypeImpl getFixedCorbaType(QName name, QName stype, int digits, int scale) {
+    public CorbaTypeImpl getFixedCorbaType(QName name, QName stype, int digits, int scale) {        
         Fixed fixed = new Fixed();
+        fixed.setName(name.getLocalPart());
+        fixed.setQName(name);
+        fixed.setType(stype);
+        fixed.setDigits(digits);
+        fixed.setScale(scale);        
+        return fixed;
+    }
+    
+    public CorbaTypeImpl getAnonFixedCorbaType(QName name, QName stype, int digits, int scale) {
+        Anonfixed fixed = new Anonfixed();
         fixed.setName(name.getLocalPart());
         fixed.setQName(name);
         fixed.setType(stype);

Modified: incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToCorbaBindingTest.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToCorbaBindingTest.java?view=diff&rev=441038&r1=441037&r2=441038
==============================================================================
--- incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToCorbaBindingTest.java (original)
+++ incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToCorbaBindingTest.java Thu Sep  7 02:54:11 2006
@@ -37,11 +37,17 @@
 
 import junit.framework.TestCase;
 
+import org.apache.schemas.yoko.bindings.corba.Anonarray;
+import org.apache.schemas.yoko.bindings.corba.Anonfixed;
+import org.apache.schemas.yoko.bindings.corba.Anonsequence;
+import org.apache.schemas.yoko.bindings.corba.Anonstring;
+import org.apache.schemas.yoko.bindings.corba.Array;
 import org.apache.schemas.yoko.bindings.corba.BindingType;
 import org.apache.schemas.yoko.bindings.corba.Fixed;
 import org.apache.schemas.yoko.bindings.corba.OperationType;
 import org.apache.schemas.yoko.bindings.corba.ParamType;
 import org.apache.schemas.yoko.bindings.corba.Sequence;
+import org.apache.schemas.yoko.bindings.corba.Struct;
 import org.apache.schemas.yoko.bindings.corba.TypeMappingType;
 import org.apache.yoko.tools.common.CORBAConstants;
 import org.apache.yoko.tools.common.WSDLCorbaFactory;
@@ -86,7 +92,142 @@
         }
         return null;
     }
- 
+
+    // tests anonymous strings and fixed types.
+    public void testAnonFixedType() throws Exception {
+        
+        try {
+            String fileName = getClass().getResource("/wsdl/anonfixed.wsdl").toString();
+            generator.setWsdlFile(fileName);
+            generator.addInterfaceName("X");
+
+            Definition model = generator.generateCORBABinding();
+            Document document = writer.getDocument(model);
+
+            Element typemap = null;
+            Element root = document.getDocumentElement();
+            for (Node nd = root.getFirstChild(); nd != null; nd = nd.getNextSibling()) {
+                if (Node.ELEMENT_NODE == nd.getNodeType() && ("corba:typeMapping".equals(nd.getNodeName()))) {
+                    typemap = (Element)nd;
+                    break;
+                }
+            }
+            assertNotNull(typemap);
+            assertEquals(1, typemap.getElementsByTagName("corba:anonfixed").getLength());            
+            assertEquals(1, typemap.getElementsByTagName("corba:anonstring").getLength());            
+            assertEquals(3, typemap.getElementsByTagName("corba:struct").getLength());            
+            
+            TypeMappingType mapType = (TypeMappingType)model.getExtensibilityElements().get(0);            
+
+            WSDLToIDLAction idlgen = new WSDLToIDLAction();
+            idlgen.setBindingName("XCORBABinding");
+            idlgen.setOutputFile("atype.idl");
+            idlgen.generateIDL(model);
+
+            Anonstring str = (Anonstring)mapType.getStructOrExceptionOrUnion().get(1);
+            assertEquals("Name is incorrect for Array Type", "X._1_S", 
+                         str.getName());
+            assertEquals("Type is incorrect for AnonString Type", "string", 
+                         str.getType().getLocalPart());
+            
+            Anonfixed fx = (Anonfixed)mapType.getStructOrExceptionOrUnion().get(2);
+            assertEquals("Name is incorrect for Anon Array Type", "X._2_S", 
+                         fx.getName());
+            assertEquals("Type is incorrect for AnonFixed Type", "decimal", 
+                         fx.getType().getLocalPart());
+            
+            Struct struct = (Struct)mapType.getStructOrExceptionOrUnion().get(0);
+            assertEquals("Name is incorrect for Anon Array Type", "X.S", 
+                         struct.getName());            
+            assertEquals("Type is incorrect for Struct Type", "X.S", 
+                         struct.getType().getLocalPart());
+            assertEquals("Name for first Struct Member Type is incorrect", "str", 
+                         struct.getMember().get(0).getName());
+            assertEquals("Idltype for first Struct Member Type is incorrect", "X._1_S", 
+                         struct.getMember().get(0).getIdltype().getLocalPart());            
+            assertEquals("Name for second Struct Member Type is incorrect", "fx", 
+                         struct.getMember().get(1).getName());
+            assertEquals("Idltype for second Struct Member Type is incorrect", "X._2_S", 
+                         struct.getMember().get(1).getIdltype().getLocalPart());
+            
+            File f = new File("atype.idl");
+            assertTrue("atype.idl should be generated", f.exists());
+        } finally {
+            new File("atype.idl").deleteOnExit();
+        }
+    }
+    
+    // tests anonymous arrays and sequences
+    public void testAnonType() throws Exception {
+        
+        try {
+            String fileName = getClass().getResource("/wsdl/atype.wsdl").toString();
+            generator.setWsdlFile(fileName);
+            generator.addInterfaceName("X");
+
+            Definition model = generator.generateCORBABinding();
+            Document document = writer.getDocument(model);
+
+            Element typemap = null;
+            Element root = document.getDocumentElement();
+            for (Node nd = root.getFirstChild(); nd != null; nd = nd.getNextSibling()) {
+                if (Node.ELEMENT_NODE == nd.getNodeType() && ("corba:typeMapping".equals(nd.getNodeName()))) {
+                    typemap = (Element)nd;
+                    break;
+                }
+            }
+            assertNotNull(typemap);
+            assertEquals(3, typemap.getElementsByTagName("corba:anonsequence").getLength());            
+            assertEquals(2, typemap.getElementsByTagName("corba:anonarray").getLength());
+            assertEquals(1, typemap.getElementsByTagName("corba:array").getLength());
+            assertEquals(2, typemap.getElementsByTagName("corba:struct").getLength());            
+            
+            TypeMappingType mapType = (TypeMappingType)model.getExtensibilityElements().get(0);            
+
+            WSDLToIDLAction idlgen = new WSDLToIDLAction();
+            idlgen.setBindingName("XCORBABinding");
+            idlgen.setOutputFile("atype.idl");
+            idlgen.generateIDL(model);
+
+            Array arr = (Array)mapType.getStructOrExceptionOrUnion().get(0);            
+            assertEquals("ElementType is incorrect for Array Type", "X._5_A", 
+                         arr.getElemtype().getLocalPart());
+            
+            Anonarray arr2 = (Anonarray)mapType.getStructOrExceptionOrUnion().get(3);
+            assertEquals("ElementType is incorrect for Anon Array Type", "X._4_A", 
+                         arr2.getElemtype().getLocalPart());
+            
+            Anonarray arr3 = (Anonarray)mapType.getStructOrExceptionOrUnion().get(2);
+            assertEquals("ElementType is incorrect for Anon Array Type", "X._1_A", 
+                         arr3.getElemtype().getLocalPart());
+            
+            
+            Anonsequence seq = (Anonsequence)mapType.getStructOrExceptionOrUnion().get(5);
+            assertEquals("Name is incorrect for Anon Array Type", "X._1_A", 
+                         seq.getName());                        
+            assertEquals("ElementType is incorrect for Anon Sequence Type", "X._2_A", 
+                         seq.getElemtype().getLocalPart());
+            
+            
+            Anonsequence seq2 = (Anonsequence)mapType.getStructOrExceptionOrUnion().get(1);
+            assertEquals("Name is incorrect for Anon Array Type", "X._2_A", 
+                         seq2.getName());                        
+            assertEquals("ElementType is incorrect for Anon Sequence Type", "X._3_A", 
+                         seq2.getElemtype().getLocalPart());
+            
+            Anonsequence seq3 = (Anonsequence)mapType.getStructOrExceptionOrUnion().get(4);
+            assertEquals("Name is incorrect for Anon Array Type", "X._3_A", 
+                         seq3.getName());
+            assertEquals("ElementType is incorrect for Anon Sequence Type", "long", 
+                         seq3.getElemtype().getLocalPart());
+            
+            File f = new File("atype.idl");
+            assertTrue("atype.idl should be generated", f.exists());
+        } finally {
+            new File("atype.idl").deleteOnExit();
+        }
+    }
+    
     public void testFixedBindingGeneration() throws Exception {
         String fileName = getClass().getResource("/wsdl/fixed.wsdl").toString();
         generator.setWsdlFile(fileName);

Modified: incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToIDLGenerationTest.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToIDLGenerationTest.java?view=diff&rev=441038&r1=441037&r2=441038
==============================================================================
--- incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToIDLGenerationTest.java (original)
+++ incubator/yoko/trunk/tools/src/test/java/org/apache/yoko/tools/processors/WSDLToIDLGenerationTest.java Thu Sep  7 02:54:11 2006
@@ -348,4 +348,25 @@
         }
     }
     
+    public void testAnonFixedTypeIdlgen() throws Exception {
+        
+        try {
+            String fileName = getClass().getResource("/idlgen/anonfixed.wsdl").toString();
+            idlgen.setWsdlFile(fileName);
+            
+            idlgen.setBindingName("XCORBABinding");
+            idlgen.setOutputFile("anonfixed.idl");            
+            idlgen.setOutput(new PrintWriter(idloutput));
+            idlgen.generateIDL(null);
+
+            InputStream origstream = getClass().getResourceAsStream("/idlgen/expected_anonfixed.idl");
+            byte orig[] = inputStreamToBytes(origstream);
+
+            checkIDLStrings(orig, idloutput.toByteArray());
+        } finally {
+            new File("anonfixed.idl").deleteOnExit();
+        }
+    }
+
+    
 }

Added: incubator/yoko/trunk/tools/src/test/resources/idlgen/anonfixed.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/idlgen/anonfixed.wsdl?view=auto&rev=441038
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/idlgen/anonfixed.wsdl (added)
+++ incubator/yoko/trunk/tools/src/test/resources/idlgen/anonfixed.wsdl Thu Sep  7 02:54:11 2006
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="l" targetNamespace="http://schemas.apache.org/idl/l.idl" xmlns:tns="http://schemas.apache.org/idl/l.idl" xmlns:corbatm="http://schemas.apache.org/typemap/corba/l.idl" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:corba="http://schemas.apache.org/yoko/bindings/corba" xmlns:ns1="http://schemas.apache.org/idl/l.idl/corba/typemap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsd1="http://schemas.apache.org/idltypes/l.idl" xmlns="http://schemas.xmlsoap.org/wsdl/">
+  <corba:typeMapping targetNamespace="http://schemas.apache.org/idl/l.idl/corba/typemap/">
+    <corba:struct xmlns:xsd1="http://schemas.apache.org/idltypes/l.idl" repositoryID="IDL:X/S:1.0" type="xsd1:X.S" name="X.S">
+      <corba:member xmlns:ns1="http://schemas.apache.org/idl/l.idl/corba/typemap/" name="str" idltype="ns1:X._1_S" />
+      <corba:member xmlns:ns1="http://schemas.apache.org/idl/l.idl/corba/typemap/" name="fx" idltype="ns1:X._2_S" />
+    </corba:struct>
+      <corba:anonstring bound="4" type="corba:string" name="X._1_S" />
+      <corba:anonfixed xmlns:xs="http://www.w3.org/2001/XMLSchema" scale="3" digits="5" type="xs:decimal" name="X._2_S" />
+      <corba:struct xmlns:xsd1="http://schemas.apache.org/idltypes/l.idl" repositoryID="IDL:X/op_a:1.0" type="xsd1:X.op_a" name="X.op_a">
+        <corba:member xmlns:ns1="http://schemas.apache.org/idl/l.idl/corba/typemap/" name="p1" idltype="ns1:X.S" />
+        <corba:member xmlns:ns1="http://schemas.apache.org/idl/l.idl/corba/typemap/" name="p2" idltype="ns1:X.S" />
+      </corba:struct>
+        <corba:struct xmlns:xsd1="http://schemas.apache.org/idltypes/l.idl" repositoryID="IDL:X/op_aResult:1.0" type="xsd1:X.op_aResult" name="X.op_aResult">
+          <corba:member xmlns:ns1="http://schemas.apache.org/idl/l.idl/corba/typemap/" name="return" idltype="ns1:X.S" />
+          <corba:member xmlns:ns1="http://schemas.apache.org/idl/l.idl/corba/typemap/" name="p2" idltype="ns1:X.S" />
+          <corba:member xmlns:ns1="http://schemas.apache.org/idl/l.idl/corba/typemap/" name="p3" idltype="ns1:X.S" />
+        </corba:struct>
+        </corba:typeMapping>
+  <types>
+    <schema targetNamespace="http://schemas.apache.org/idltypes/l.idl" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+            <simpleType name="X._1_S">
+                <restriction base="string">
+                    <maxLength value="4"/>
+                </restriction>
+            </simpleType>
+            <xsd:simpleType xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="X._2_S">
+		        <xsd:restriction base="xsd:decimal">
+				    <xsd:totalDigits value="5"/>
+   		            <xsd:fractionDigits value="3"/>
+		        </xsd:restriction>
+		    </xsd:simpleType>
+            <complexType name="X.S">
+                <sequence>
+                    <element name="str" type="xsd1:X._1_S"/>
+                    <element name="fx" type="xsd1:X._2_S"/>
+                </sequence>
+            </complexType>
+            <element name="X.op_a">
+                <complexType>
+                    <sequence>
+                        <element name="p1" type="xsd1:X.S"/>
+                        <element name="p2" type="xsd1:X.S"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="X.op_aResult">
+                <complexType>
+                    <sequence>
+                        <element name="return" type="xsd1:X.S"/>
+                        <element name="p2" type="xsd1:X.S"/>
+                        <element name="p3" type="xsd1:X.S"/>
+                    </sequence>
+                </complexType>
+            </element>
+        </schema>
+  </types>
+  <message name="X.op_a">
+    <part name="parameters" element="xsd1:X.op_a"/>
+  </message>
+  <message name="X.op_aResponse">
+    <part name="parameters" element="xsd1:X.op_aResult"/>
+  </message>
+  <portType name="X">
+    <operation name="op_a">
+      <input name="op_a" message="tns:X.op_a"/>
+      <output name="op_aResponse" message="tns:X.op_aResponse"/>
+    </operation>
+  </portType>
+  <binding name="XCORBABinding" type="tns:X">
+    <corba:binding repositoryID="IDL:X:1.0" />
+    <operation name="op_a">
+      <corba:operation name="op_a">
+        <corba:param xmlns:ns1="http://schemas.apache.org/idl/l.idl/corba/typemap/" mode="in" name="p1" idltype="ns1:X.S" />
+        <corba:param xmlns:ns1="http://schemas.apache.org/idl/l.idl/corba/typemap/" mode="out" name="p3" idltype="ns1:X.S" />
+        <corba:param xmlns:ns1="http://schemas.apache.org/idl/l.idl/corba/typemap/" mode="inout" name="p2" idltype="ns1:X.S" />
+        <corba:return xmlns:ns1="http://schemas.apache.org/idl/l.idl/corba/typemap/" name="return" idltype="ns1:X.S" />
+      </corba:operation>
+      <input name="op_a">
+      </input>
+      <output name="op_aResponse">
+      </output>
+    </operation>
+  </binding>
+</definitions>

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

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

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

Added: incubator/yoko/trunk/tools/src/test/resources/idlgen/anontype.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/idlgen/anontype.wsdl?view=auto&rev=441038
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/idlgen/anontype.wsdl (added)
+++ incubator/yoko/trunk/tools/src/test/resources/idlgen/anontype.wsdl Thu Sep  7 02:54:11 2006
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="m" targetNamespace="http://schemas.apache.org/idl/m.idl" xmlns:tns="http://schemas.apache.org/idl/m.idl" xmlns:corbatm="http://schemas.apache.org/typemap/corba/m.idl" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:corba="http://schemas.apache.org/yoko/bindings/corba" xmlns:ns1="http://schemas.apache.org/idl/m.idl/corba/typemap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsd1="http://schemas.apache.org/idltypes/m.idl" xmlns="http://schemas.xmlsoap.org/wsdl/">
+  <corba:typeMapping targetNamespace="http://schemas.apache.org/idl/m.idl/corba/typemap/">
+    <corba:array xmlns:xsd1="http://schemas.apache.org/idltypes/m.idl" xmlns:ns1="http://schemas.apache.org/idl/m.idl/corba/typemap/" elemtype="ns1:X._5_A" bound="3" repositoryID="IDL:X/A:1.0" type="xsd1:X.A" name="X.A" />
+    <corba:anonsequence xmlns:xsd1="http://schemas.apache.org/idltypes/m.idl" xmlns:ns1="http://schemas.apache.org/idl/m.idl/corba/typemap/" elemtype="ns1:X._3_A" bound="0" type="xsd1:X._2_A" name="X._2_A" />
+    <corba:anonarray xmlns:xsd1="http://schemas.apache.org/idltypes/m.idl" xmlns:ns1="http://schemas.apache.org/idl/m.idl/corba/typemap/" elemtype="ns1:X._1_A" bound="1" type="xsd1:X._4_A" name="X._4_A" />
+    <corba:anonarray xmlns:xsd1="http://schemas.apache.org/idltypes/m.idl" xmlns:ns1="http://schemas.apache.org/idl/m.idl/corba/typemap/" elemtype="ns1:X._4_A" bound="2" type="xsd1:X._5_A" name="X._5_A" />
+    <corba:anonsequence xmlns:xsd1="http://schemas.apache.org/idltypes/m.idl" elemtype="corba:long" bound="0" type="xsd1:X._3_A" name="X._3_A" />
+    <corba:anonsequence xmlns:xsd1="http://schemas.apache.org/idltypes/m.idl" xmlns:ns1="http://schemas.apache.org/idl/m.idl/corba/typemap/" elemtype="ns1:X._2_A" bound="0" type="xsd1:X._1_A" name="X._1_A" />
+    <corba:struct xmlns:xsd1="http://schemas.apache.org/idltypes/m.idl" repositoryID="IDL:X/op_a:1.0" type="xsd1:X.op_a" name="X.op_a">
+      <corba:member xmlns:ns1="http://schemas.apache.org/idl/m.idl/corba/typemap/" name="p1" idltype="ns1:X.A" />
+      <corba:member xmlns:ns1="http://schemas.apache.org/idl/m.idl/corba/typemap/" name="p2" idltype="ns1:X.A" />
+    </corba:struct>
+      <corba:struct xmlns:xsd1="http://schemas.apache.org/idltypes/m.idl" repositoryID="IDL:X/op_aResult:1.0" type="xsd1:X.op_aResult" name="X.op_aResult">
+        <corba:member xmlns:ns1="http://schemas.apache.org/idl/m.idl/corba/typemap/" name="return" idltype="ns1:X.A" />
+        <corba:member xmlns:ns1="http://schemas.apache.org/idl/m.idl/corba/typemap/" name="p2" idltype="ns1:X.A" />
+        <corba:member xmlns:ns1="http://schemas.apache.org/idl/m.idl/corba/typemap/" name="p3" idltype="ns1:X.A" />
+      </corba:struct>
+      </corba:typeMapping>
+  <types>
+    <schema targetNamespace="http://schemas.apache.org/idltypes/m.idl" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+            <complexType name="X._3_A">
+                <sequence>
+                    <element maxOccurs="unbounded" minOccurs="0" name="item" type="int"/>
+                </sequence>
+            </complexType>
+            <complexType name="X._2_A">
+                <sequence>
+                    <element maxOccurs="unbounded" minOccurs="0" name="item" type="xsd1:X._3_A"/>
+                </sequence>
+            </complexType>
+            <complexType name="X._1_A">
+                <sequence>
+                    <element maxOccurs="unbounded" minOccurs="0" name="item" type="xsd1:X._2_A"/>
+                </sequence>
+            </complexType>
+            <complexType name="X._4_A">
+                <sequence>
+                    <element maxOccurs="1" minOccurs="1" name="item" type="xsd1:X._1_A"/>
+                </sequence>
+            </complexType>
+            <complexType name="X._5_A">
+                <sequence>
+                    <element maxOccurs="2" minOccurs="2" name="item" type="xsd1:X._4_A"/>
+                </sequence>
+            </complexType>
+            <complexType name="X.A">
+                <sequence>
+                    <element maxOccurs="3" minOccurs="3" name="item" type="xsd1:X._5_A"/>
+                </sequence>
+            </complexType>
+            <element name="X.op_a">
+                <complexType>
+                    <sequence>
+                        <element name="p1" type="xsd1:X.A"/>
+                        <element name="p2" type="xsd1:X.A"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="X.op_aResult">
+                <complexType>
+                    <sequence>
+                        <element name="return" type="xsd1:X.A"/>
+                        <element name="p2" type="xsd1:X.A"/>
+                        <element name="p3" type="xsd1:X.A"/>
+                    </sequence>
+                </complexType>
+            </element>
+        </schema>
+  </types>
+  <message name="X.op_a">
+    <part name="parameters" element="xsd1:X.op_a"/>
+  </message>
+  <message name="X.op_aResponse">
+    <part name="parameters" element="xsd1:X.op_aResult"/>
+  </message>
+  <portType name="X">
+    <operation name="op_a">
+      <input name="op_a" message="tns:X.op_a"/>
+      <output name="op_aResponse" message="tns:X.op_aResponse"/>
+    </operation>
+  </portType>
+  <binding name="XCORBABinding" type="tns:X">
+    <corba:binding repositoryID="IDL:X:1.0" />
+    <operation name="op_a">
+      <corba:operation name="op_a">
+        <corba:param xmlns:ns1="http://schemas.apache.org/idl/m.idl/corba/typemap/" mode="in" name="p1" idltype="ns1:X.A" />
+        <corba:param xmlns:ns1="http://schemas.apache.org/idl/m.idl/corba/typemap/" mode="out" name="p3" idltype="ns1:X.A" />
+        <corba:param xmlns:ns1="http://schemas.apache.org/idl/m.idl/corba/typemap/" mode="inout" name="p2" idltype="ns1:X.A" />
+        <corba:return xmlns:ns1="http://schemas.apache.org/idl/m.idl/corba/typemap/" name="return" idltype="ns1:X.A" />
+      </corba:operation>
+      <input name="op_a">
+      </input>
+      <output name="op_aResponse">
+      </output>
+    </operation>
+  </binding>
+</definitions>

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

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

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

Added: incubator/yoko/trunk/tools/src/test/resources/idlgen/expected_anonfixed.idl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/idlgen/expected_anonfixed.idl?view=auto&rev=441038
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/idlgen/expected_anonfixed.idl (added)
+++ incubator/yoko/trunk/tools/src/test/resources/idlgen/expected_anonfixed.idl Thu Sep  7 02:54:11 2006
@@ -0,0 +1,21 @@
+interface X {
+    struct S {
+        string<4>  str;
+        fixed<5, 3>  fx;
+    };
+    struct op_a {
+        S p1;
+        S p2;
+    };
+    struct op_aResult {
+        S return;
+        S p2;
+        S p3;
+    };
+    S
+    op_a(
+        in S p1,
+        out S p3,
+        inout S p2
+    );
+};

Added: incubator/yoko/trunk/tools/src/test/resources/idlgen/expected_anontype.idl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/idlgen/expected_anontype.idl?view=auto&rev=441038
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/idlgen/expected_anontype.idl (added)
+++ incubator/yoko/trunk/tools/src/test/resources/idlgen/expected_anontype.idl Thu Sep  7 02:54:11 2006
@@ -0,0 +1,18 @@
+interface X {
+    typedef sequence<sequence<sequence<long> > >  A[3][2][1];
+    struct op_a {
+        A p1;
+        A p2;
+    };
+    struct op_aResult {
+        A return;
+        A p2;
+        A p3;
+    };
+    A
+    op_a(
+        in A p1,
+        out A p3,
+        inout A p2
+    );
+};

Added: incubator/yoko/trunk/tools/src/test/resources/wsdl/anon.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/wsdl/anon.wsdl?view=auto&rev=441038
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/wsdl/anon.wsdl (added)
+++ incubator/yoko/trunk/tools/src/test/resources/wsdl/anon.wsdl Thu Sep  7 02:54:11 2006
@@ -0,0 +1,250 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="anon.idl"
+ targetNamespace="http://schemas.apache.org/idl/anon.idl"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:tns="http://schemas.apache.org/idl/anon.idl"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsd1="http://schemas.apache.org/idltypes/anon.idl"
+ xmlns:corba="http://schemas.apache.org/bindings/corba"
+ xmlns:corbatm="http://schemas.apache.org/bindings/corba/typemap">
+  <types>
+    <schema targetNamespace="http://schemas.apache.org/idltypes/anon.idl"
+     xmlns="http://www.w3.org/2001/XMLSchema"
+     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+      <xsd:complexType name="X._3_A">
+        <xsd:sequence>
+          <xsd:element name="item" type="xsd:int" minOccurs="0" maxOccurs="unbounded"/>
+        </xsd:sequence>
+      </xsd:complexType>
+      <xsd:complexType name="X._2_A">
+        <xsd:sequence>
+          <xsd:element name="item" type="xsd1:X._3_A" minOccurs="0" maxOccurs="unbounded"/>
+        </xsd:sequence>
+      </xsd:complexType>
+      <xsd:complexType name="X._1_A">
+        <xsd:sequence>
+          <xsd:element name="item" type="xsd1:X._2_A" minOccurs="0" maxOccurs="unbounded"/>
+        </xsd:sequence>
+      </xsd:complexType>
+      <xsd:complexType name="X._4_A">
+        <xsd:sequence>
+          <xsd:element name="item" type="xsd1:X._1_A" minOccurs="1" maxOccurs="1"/>
+        </xsd:sequence>
+      </xsd:complexType>
+      <xsd:complexType name="X._5_A">
+        <xsd:sequence>
+          <xsd:element name="item" type="xsd1:X._4_A" minOccurs="2" maxOccurs="2"/>
+        </xsd:sequence>
+      </xsd:complexType>
+      <xsd:complexType name="X.A">
+        <xsd:sequence>
+          <xsd:element name="item" type="xsd1:X._5_A" minOccurs="3" maxOccurs="3"/>
+        </xsd:sequence>
+      </xsd:complexType>
+      <xsd:complexType name="X._7_B">
+        <xsd:sequence>
+          <xsd:element name="item" type="xsd:string" minOccurs="4" maxOccurs="4"/>
+        </xsd:sequence>
+      </xsd:complexType>
+      <xsd:complexType name="X._8_B">
+        <xsd:sequence>
+          <xsd:element name="item" type="xsd1:X._7_B" minOccurs="5" maxOccurs="5"/>
+        </xsd:sequence>
+      </xsd:complexType>
+      <xsd:complexType name="X.B">
+        <xsd:sequence>
+          <xsd:element name="item" type="xsd1:X._8_B" minOccurs="6" maxOccurs="6"/>
+        </xsd:sequence>
+      </xsd:complexType>
+      <xsd:simpleType name="X.C">
+        <xsd:restriction base="xsd:string"/>
+      </xsd:simpleType>
+      <xsd:simpleType name="X._11_D">
+        <xsd:restriction base="xsd:string">
+          <xsd:maxLength value="20" fixed="true"/>
+        </xsd:restriction>
+      </xsd:simpleType>
+      <xsd:complexType name="X._10_D">
+        <xsd:sequence>
+           <xsd:element name="item" type="xsd1:X._11_D" minOccurs="0" maxOccurs="unbounded"/>
+        </xsd:sequence>
+      </xsd:complexType>
+      <xsd:complexType name="X._9_D">
+        <xsd:sequence>
+          <xsd:element name="item" type="xsd1:X._10_D" minOccurs="0" maxOccurs="unbounded"/>
+        </xsd:sequence>
+      </xsd:complexType>
+      <xsd:complexType name="X.D">
+        <xsd:sequence>
+          <xsd:element name="item" type="xsd1:X._9_D" minOccurs="2" maxOccurs="2"/>
+        </xsd:sequence>
+      </xsd:complexType>
+      <xsd:simpleType name="X._12_String10">
+        <xsd:restriction base="xsd:string">
+          <xsd:maxLength value="10" fixed="true"/>
+        </xsd:restriction>
+      </xsd:simpleType>
+      <xsd:simpleType name="X.String10">
+        <xsd:restriction base="xsd1:X._12_String10"/>
+      </xsd:simpleType>
+      <xsd:complexType name="X._13_E">
+        <xsd:sequence>
+          <xsd:element name="item" type="xsd1:X.String10" minOccurs="0" maxOccurs="unbounded"/>
+        </xsd:sequence>
+      </xsd:complexType>
+      <xsd:complexType name="X.E">
+        <xsd:sequence>
+          <xsd:element name="item" type="xsd1:X._13_E" minOccurs="0" maxOccurs="unbounded"/>
+        </xsd:sequence>
+      </xsd:complexType>
+      <xsd:simpleType name="X.op_f._14_p1">
+        <xsd:restriction base="xsd:string">
+          <xsd:maxLength value="1" fixed="true"/>
+        </xsd:restriction>
+      </xsd:simpleType>
+      <xsd:simpleType name="X.op_f._15_p2">
+        <xsd:restriction base="xsd:string">
+          <xsd:maxLength value="2" fixed="true"/>
+        </xsd:restriction>
+      </xsd:simpleType>
+      <xsd:simpleType name="X.op_f._16_p3">
+        <xsd:restriction base="xsd:string">
+          <xsd:maxLength value="3" fixed="true"/>
+        </xsd:restriction>
+      </xsd:simpleType>
+      <xsd:simpleType name="X._17_op_f">
+        <xsd:restriction base="xsd:string">
+          <xsd:maxLength value="4" fixed="true"/>
+        </xsd:restriction>
+      </xsd:simpleType>
+      <xsd:simpleType name="X._18_op_g">
+        <xsd:restriction base="xsd:string">
+          <xsd:maxLength value="20" fixed="true"/>
+        </xsd:restriction>
+      </xsd:simpleType>
+      <xsd:element name="X.op_a.p1" type="xsd1:X.A"/>
+      <xsd:element name="X.op_a.p2" type="xsd1:X.A"/>
+      <xsd:element name="X.op_a.p3" type="xsd1:X.A"/>
+      <xsd:element name="X.op_a.return" type="xsd1:X.A"/>
+      <xsd:element name="X.op_b.p1" type="xsd1:X.B"/>
+      <xsd:element name="X.op_b.p2" type="xsd1:X.B"/>
+      <xsd:element name="X.op_b.p3" type="xsd1:X.B"/>
+      <xsd:element name="X.op_b.return" type="xsd1:X.B"/>
+      <xsd:element name="X.op_c.p1" type="xsd:string"/>
+      <xsd:element name="X.op_c.p2" type="xsd:string"/>
+            <xsd:element name="X.op_c.p3" type="xsd:string"/>
+      <xsd:element name="X.op_c.return" type="xsd:string"/>
+      <xsd:element name="X.op_d.p1" type="xsd1:X.D"/>
+      <xsd:element name="X.op_d.p2" type="xsd1:X.D"/>
+      <xsd:element name="X.op_d.p3" type="xsd1:X.D"/>
+      <xsd:element name="X.op_d.return" type="xsd1:X.D"/>
+      <xsd:element name="X.op_e.p1" type="xsd1:X.E"/>
+      <xsd:element name="X.op_e.p2" type="xsd1:X.E"/>
+      <xsd:element name="X.op_e.p3" type="xsd1:X.E"/>
+      <xsd:element name="X.op_e.return" type="xsd1:X.E"/>
+      <xsd:element name="X.op_f.p1" type="xsd1:X.op_f._14_p1"/>
+      <xsd:element name="X.op_f.p2" type="xsd1:X.op_f._15_p2"/>
+      <xsd:element name="X.op_f.p3" type="xsd1:X.op_f._16_p3"/>
+      <xsd:element name="X.op_f.return" type="xsd1:X._17_op_f"/>
+      <xsd:element name="X._get_op_g.return" type="xsd1:X._18_op_g"/>
+      <xsd:element name="X._set_op_g._arg" type="xsd1:X._18_op_g"/>
+    </schema>
+  </types>
+  <message name="X.op_a">
+    <part name="p1" element="xsd1:X.op_a.p1"/>
+    <part name="p2" element="xsd1:X.op_a.p2"/>
+  </message>
+  <message name="X.op_aResponse">
+    <part name="return" element="xsd1:X.op_a.return"/>
+    <part name="p2" element="xsd1:X.op_a.p2"/>
+    <part name="p3" element="xsd1:X.op_a.p3"/>
+  </message>
+  <message name="X.op_b">
+    <part name="p1" element="xsd1:X.op_b.p1"/>
+    <part name="p2" element="xsd1:X.op_b.p2"/>
+  </message>
+  <message name="X.op_bResponse">
+    <part name="return" element="xsd1:X.op_b.return"/>
+    <part name="p2" element="xsd1:X.op_b.p2"/>
+    <part name="p3" element="xsd1:X.op_b.p3"/>
+  </message>
+  <message name="X.op_c">
+    <part name="p1" element="xsd1:X.op_c.p1"/>
+    <part name="p2" element="xsd1:X.op_c.p2"/>
+  </message>
+  <message name="X.op_cResponse">
+    <part name="return" element="xsd1:X.op_c.return"/>
+    <part name="p2" element="xsd1:X.op_c.p2"/>
+    <part name="p3" element="xsd1:X.op_c.p3"/>
+  </message>
+  <message name="X.op_d">
+    <part name="p1" element="xsd1:X.op_d.p1"/>
+    <part name="p2" element="xsd1:X.op_d.p2"/>
+  </message>
+  <message name="X.op_dResponse">
+    <part name="return" element="xsd1:X.op_d.return"/>
+    <part name="p2" element="xsd1:X.op_d.p2"/>
+    <part name="p3" element="xsd1:X.op_d.p3"/>
+  </message>
+  <message name="X.op_e">
+    <part name="p1" element="xsd1:X.op_e.p1"/>
+    <part name="p2" element="xsd1:X.op_e.p2"/>
+  </message>
+  <message name="X.op_eResponse">
+    <part name="return" element="xsd1:X.op_e.return"/>
+    <part name="p2" element="xsd1:X.op_e.p2"/>
+    <part name="p3" element="xsd1:X.op_e.p3"/>
+  </message>
+  <message name="X.op_f">
+    <part name="p1" element="xsd1:X.op_f.p1"/>
+        <part name="p2" element="xsd1:X.op_f.p2"/>
+  </message>
+  <message name="X.op_fResponse">
+    <part name="return" element="xsd1:X.op_f.return"/>
+    <part name="p2" element="xsd1:X.op_f.p2"/>
+    <part name="p3" element="xsd1:X.op_f.p3"/>
+  </message>
+  <message name="X._get_op_g"/>
+  <message name="X._get_op_gResponse">
+    <part name="return" element="xsd1:X._get_op_g.return"/>
+  </message>
+  <message name="X._set_op_g">
+    <part name="_arg" element="xsd1:X._set_op_g._arg"/>
+  </message>
+  <message name="X._set_op_gResponse"/>
+  <portType name="X">
+    <operation name="op_a">
+      <input message="tns:X.op_a" name="op_a"/>
+      <output message="tns:X.op_aResponse" name="op_aResponse"/>
+    </operation>
+    <operation name="op_b">
+      <input message="tns:X.op_b" name="op_b"/>
+      <output message="tns:X.op_bResponse" name="op_bResponse"/>
+    </operation>
+    <operation name="op_c">
+      <input message="tns:X.op_c" name="op_c"/>
+      <output message="tns:X.op_cResponse" name="op_cResponse"/>
+    </operation>
+    <operation name="op_d">
+      <input message="tns:X.op_d" name="op_d"/>
+      <output message="tns:X.op_dResponse" name="op_dResponse"/>
+    </operation>
+    <operation name="op_e">
+      <input message="tns:X.op_e" name="op_e"/>
+      <output message="tns:X.op_eResponse" name="op_eResponse"/>
+    </operation>
+    <operation name="op_f">
+      <input message="tns:X.op_f" name="op_f"/>
+      <output message="tns:X.op_fResponse" name="op_fResponse"/>
+    </operation>
+    <operation name="_get_op_g">
+      <input message="tns:X._get_op_g" name="_get_op_g"/>
+      <output message="tns:X._get_op_gResponse" name="_get_op_gResponse"/>
+    </operation>
+    <operation name="_set_op_g">
+      <input message="tns:X._set_op_g" name="_set_op_g"/>
+      <output message="tns:X._set_op_gResponse" name="_set_op_gResponse"/>
+    </operation>
+  </portType>
+</definitions>
+

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

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

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

Added: incubator/yoko/trunk/tools/src/test/resources/wsdl/anonfixed.wsdl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/test/resources/wsdl/anonfixed.wsdl?view=auto&rev=441038
==============================================================================
--- incubator/yoko/trunk/tools/src/test/resources/wsdl/anonfixed.wsdl (added)
+++ incubator/yoko/trunk/tools/src/test/resources/wsdl/anonfixed.wsdl Thu Sep  7 02:54:11 2006
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated by <idltowsdl> Tool. Version 4.0.0 -->
+<definitions name="l" targetNamespace="http://schemas.apache.org/idl/l.idl" 
+    xmlns="http://schemas.xmlsoap.org/wsdl/" 
+    xmlns:corba="http://schemas.apache.org/bindings/corba" 
+    xmlns:corbatm="http://schemas.apache.org/typemap/corba/l.idl" 
+    xmlns:tns="http://schemas.apache.org/idl/l.idl" 
+    xmlns:wsa="http://www.w3.org/2005/08/addressing" 
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
+    xmlns:xsd1="http://schemas.apache.org/idltypes/l.idl">
+    <types>
+        <schema targetNamespace="http://schemas.apache.org/idltypes/l.idl" 
+            xmlns="http://www.w3.org/2001/XMLSchema" 
+            xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+            <simpleType name="X._1_S">
+                <restriction base="string">
+                    <maxLength value="4"/>
+                </restriction>
+            </simpleType>
+            <xsd:simpleType name="X._2_S">
+		        <xsd:restriction base="xsd:decimal">
+				    <xsd:totalDigits value="5"/>
+   		            <xsd:fractionDigits value="3"/>
+		        </xsd:restriction>
+		    </xsd:simpleType>
+            <complexType name="X.S">
+                <sequence>
+                    <element name="str" type="xsd1:X._1_S"/>
+                    <element name="fx" type="xsd1:X._2_S"/>
+                </sequence>
+            </complexType>
+            <element name="X.op_a">
+                <complexType>
+                    <sequence>
+                        <element name="p1" type="xsd1:X.S"/>
+                        <element name="p2" type="xsd1:X.S"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="X.op_aResult">
+                <complexType>
+                    <sequence>
+                        <element name="return" type="xsd1:X.S"/>
+                        <element name="p2" type="xsd1:X.S"/>
+                        <element name="p3" type="xsd1:X.S"/>
+                    </sequence>
+                </complexType>
+            </element>
+        </schema>
+    </types>
+    <message name="X.op_a">
+        <part element="xsd1:X.op_a" name="parameters"/>
+    </message>
+    <message name="X.op_aResponse">
+        <part element="xsd1:X.op_aResult" name="parameters"/>
+    </message>
+    <portType name="X">
+        <operation name="op_a">
+            <input message="tns:X.op_a" name="op_a"/>
+            <output message="tns:X.op_aResponse" name="op_aResponse"/>
+        </operation>
+    </portType>
+</definitions>

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

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

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



Mime
View raw message