cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r613231 - in /incubator/cxf/branches/2.0.x-fixes/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl: generator/wsdl11/wrapperbean.vm processor/internal/jaxws/ResponseWrapper.java
Date Fri, 18 Jan 2008 19:20:25 GMT
Author: dkulp
Date: Fri Jan 18 11:20:23 2008
New Revision: 613231

URL: http://svn.apache.org/viewvc?rev=613231&view=rev
Log:
Fix for TCK failure (XmlElement not being written for "return" fields)

Modified:
    incubator/cxf/branches/2.0.x-fixes/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/wrapperbean.vm
    incubator/cxf/branches/2.0.x-fixes/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/ResponseWrapper.java

Modified: incubator/cxf/branches/2.0.x-fixes/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/wrapperbean.vm
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/wrapperbean.vm?rev=613231&r1=613230&r2=613231&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/wrapperbean.vm
(original)
+++ incubator/cxf/branches/2.0.x-fixes/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/wrapperbean.vm
Fri Jan 18 11:20:23 2008
@@ -35,20 +35,19 @@
 public class $bean.Name {
 
 #foreach ($field in $bean.Fields)
-#if($field.Annotation)
-$field.Annotation
+#foreach ($annotation in $field.Annotations)
+    $annotation
 #end
     private $field.Type $field.ParaName;
 #end
 
 #foreach ($method in $bean.Methods)
-    public ${method.return.ClassName} ${method.Name} (#if($method.ParameterListWithoutAnnotation.size()
== 0))#end #if($method.ParameterListWithoutAnnotation.size() != 0) #foreach ($param in ${method.ParameterListWithoutAnnotation})
$param #end ) #end 
-    {
-	#foreach ($exp in $method.JavaCodeBlock.Expressions)
-           $exp
-        #end
-}
-
+    public ${method.return.ClassName} ${method.Name}(#if($method.ParameterListWithoutAnnotation.size()
== 0))#else #foreach($param in ${method.ParameterListWithoutAnnotation})$param#end )#end {
+#foreach ($exp in $method.JavaCodeBlock.Expressions)
+        $exp
+#end
+    }
+    
 #end
 }
 

Modified: incubator/cxf/branches/2.0.x-fixes/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/ResponseWrapper.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/ResponseWrapper.java?rev=613231&r1=613230&r2=613231&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/ResponseWrapper.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/tools/javato/core/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/ResponseWrapper.java
Fri Jan 18 11:20:23 2008
@@ -65,12 +65,10 @@
         List<JavaField> fields = new ArrayList<JavaField>();
         
         final Class<?> returnType = method.getReturnType();
-        JavaField field = new JavaField();
         if (CollectionUtils.isEmpty(message.getMessageParts())) {
             return fields;
         }
         MessagePartInfo part = message.getMessageParts().get(0);
-        field.setName(part.getName().getLocalPart());
         
         if (!returnType.isAssignableFrom(void.class)) {
             String type;            
@@ -83,11 +81,11 @@
             } else {
                 type = returnType.getName();
             }
-            field.setType(type);
+            String name = part.getName().getLocalPart();
+            JavaField field = new JavaField(name, type, "");
             field.setTargetNamespace("");
-            
+            fields.add(field);            
         }
-        fields.add(field);
         
         final Class[] paramClasses = method.getParameterTypes();
         for (MessagePartInfo mpi : message.getMessageParts()) {
@@ -105,8 +103,9 @@
                 } else {
                     type = clz.getName();
                 }
-                fields.add(new JavaField(name, type, ""));
-               
+                JavaField field = new JavaField(name, type, "");
+                field.setTargetNamespace("");
+                fields.add(field);
             }
         }
         



Mime
View raw message