cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r451559 - in /incubator/cxf/trunk/tools: common/src/main/java/org/apache/cxf/tools/util/ wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/databindings/jaxb/ wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/internal/
Date Sat, 30 Sep 2006 08:13:43 GMT
Author: ema
Date: Sat Sep 30 01:13:42 2006
New Revision: 451559

URL: http://svn.apache.org/viewvc?view=rev&rev=451559
Log:
Fixed tooling generated holder class issue 

Modified:
    incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/ProcessorUtil.java
    incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/databindings/jaxb/JAXBBindingGenerator.java
    incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/internal/ParameterProcessor.java

Modified: incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/ProcessorUtil.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/ProcessorUtil.java?view=diff&rev=451559&r1=451558&r2=451559
==============================================================================
--- incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/ProcessorUtil.java
(original)
+++ incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/ProcessorUtil.java
Sat Sep 30 01:13:42 2006
@@ -124,18 +124,19 @@
     public static String resolvePartType(Part part, ToolContext env, boolean fullName) {
         DataBindingGenerator binder = (DataBindingGenerator)env.get(ToolConstants.BINDING_GENERATOR);
         if (binder == null) {
-            return resolvePartType(part);
+            String primitiveType = JAXBUtils.builtInTypeToJavaType(part.getTypeName().getLocalPart());
+            if (part.getTypeName() != null &&  primitiveType != null) {
+                return primitiveType;
+            } else {
+                return resolvePartType(part);
+            }
         }
         String name = binder.getType(getElementName(part), fullName);
         if (name == null) {
             return resolvePartType(part);
         }
         return name;
-        /*if (fullName) {
-            return mapping.getType().getTypeClass().fullName();
-        } else {
-            return mapping.getType().getTypeClass().name();
-        }*/
+       
     }
 
     public static String resolvePartNamespace(Part part) {
@@ -251,22 +252,22 @@
         } 
         
         if (boxify && dataBindingGenerator == null) {
-            jtype = JAXBUtils.builtInTypeToJavaType(xmlTypeName.getLocalPart());        
  
-        }
-        
-        if (!boxify && dataBindingGenerator != null) {
-            jtype = dataBindingGenerator.getJavaType(xmlTypeName, false);
-        }
-        
-        if (!boxify && dataBindingGenerator == null) {
             Class holderClass = JAXBUtils.holderClass(xmlTypeName.getLocalPart());
             jtype = holderClass == null ? null : holderClass.getName();
             if (jtype == null) {
                 jtype = JAXBUtils.builtInTypeToJavaType(xmlTypeName.getLocalPart());
             }
+                       
         }
         
+        if (!boxify && dataBindingGenerator != null) {
+            jtype = dataBindingGenerator.getJavaType(xmlTypeName, false);
+        }
         
+        if (!boxify && dataBindingGenerator == null) {
+            jtype = JAXBUtils.builtInTypeToJavaType(xmlTypeName.getLocalPart());
+        }
+            
         
         String namespace = xmlTypeName.getNamespaceURI();
         String type = resolvePartType(part, env, true);

Modified: incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/databindings/jaxb/JAXBBindingGenerator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/databindings/jaxb/JAXBBindingGenerator.java?view=diff&rev=451559&r1=451558&r2=451559
==============================================================================
--- incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/databindings/jaxb/JAXBBindingGenerator.java
(original)
+++ incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/databindings/jaxb/JAXBBindingGenerator.java
Sat Sep 30 01:13:42 2006
@@ -192,8 +192,7 @@
                 return true;
             }
         }
-        return false;
-        
+        return false;        
     }
 
     private InputSource processNestedBinding(Element schemaElement, String systemid) {
@@ -295,19 +294,17 @@
             return null;
         }
         TypeAndAnnotation jtype = rawJaxbModel.getJavaType(qn);
+        
         if (jtype == null || jtype.getTypeClass() == null) {
             return null;
         } else {         
-            if (boxify) {           
-                jtypeClass = jtype.getTypeClass().boxify().fullName();
+            if (boxify) {
+                jtypeClass = jtype.getTypeClass().boxify().fullName();               
             } else {
                 jtypeClass = jtype.getTypeClass().fullName();
             }
-        }
-        
+        }        
         return jtypeClass;
-    
-
     }
 
     private void customizeSchema(Element schema, String targetNamespace) {

Modified: incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/internal/ParameterProcessor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/internal/ParameterProcessor.java?view=diff&rev=451559&r1=451558&r2=451559
==============================================================================
--- incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/internal/ParameterProcessor.java
(original)
+++ incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/internal/ParameterProcessor.java
Sat Sep 30 01:13:42 2006
@@ -90,7 +90,7 @@
         parameter.setPartName(part.getName());
         parameter.setQName(ProcessorUtil.getElementName(part));
 
-        parameter.setClassName(ProcessorUtil.getFullClzName(part, env, this.collector, true));
+        parameter.setClassName(ProcessorUtil.getFullClzName(part, env, this.collector, false));
 
         if (style == JavaType.Style.INOUT || style == JavaType.Style.OUT) {
             parameter.setHolder(true);



Mime
View raw message