cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r541230 - in /incubator/cxf/trunk/tools: javato/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/ javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/ wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/...
Date Thu, 24 May 2007 09:10:05 GMT
Author: ema
Date: Thu May 24 02:10:04 2007
New Revision: 541230

URL: http://svn.apache.org/viewvc?view=rev&rev=541230
Log:
* Fixed issue CXF-682
* Fixed issue in wrapperben generator and enable it to generate @XmlElement annotation

Modified:
    incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/wrapperbean.vm
    incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/ResponseWrapper.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/WebParamAnnotator.java
    incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java

Modified: incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/wrapperbean.vm
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/wrapperbean.vm?view=diff&rev=541230&r1=541229&r2=541230
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/wrapperbean.vm
(original)
+++ incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/wrapperbean.vm
Thu May 24 02:10:04 2007
@@ -35,7 +35,9 @@
 public class $bean.Name {
 
 #foreach ($field in $bean.Fields)
-#if($field.Annotation.length() > 0)$field.Annotation#end
+#if($field.Annotation)
+$field.Annotation
+#end
     private $field.Type $field.Name;
 #end
 

Modified: incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/ResponseWrapper.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/ResponseWrapper.java?view=diff&rev=541230&r1=541229&r2=541230
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/ResponseWrapper.java
(original)
+++ incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/ResponseWrapper.java
Thu May 24 02:10:04 2007
@@ -76,6 +76,7 @@
                 type = returnType.getName();
             }
             field.setType(type);
+            field.setTargetNamespace("");
         }
         fields.add(field);
         

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java?view=diff&rev=541230&r1=541229&r2=541230
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
(original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
Thu May 24 02:10:04 2007
@@ -294,12 +294,12 @@
               
         fullJavaName = this.dataBinding.getWrappedElementType(wrapperElement, item);
         
-        
-        String targetNamespace = item.getNamespaceURI();
-        if ("".equals(targetNamespace)) {
-            targetNamespace = ProcessorUtil.resolvePartNamespace(part);
-        }
-
+        String targetNamespace = "";
+        Object obj = part.getProperty("messagepart.isheader");
+        if (Boolean.TRUE.equals(obj)) {
+            targetNamespace = part.getMessageInfo().getOperation().getInterface().
+            getService().getTargetNamespace();
+        } 
         
         String jpname = ProcessorUtil.mangleNameToVariableName(item.getLocalPart());
         JavaParameter parameter = new JavaParameter(jpname, fullJavaName, targetNamespace);
@@ -332,11 +332,12 @@
             simpleJavaName = fullJavaName.substring(index);    
         }
         
-        String targetNamespace = element.getNamespaceURI();
-         
-        if ("".equals(targetNamespace)) {
-            targetNamespace = ProcessorUtil.resolvePartNamespace(part);
-        }
+        String targetNamespace = "";
+        Object obj = part.getProperty("messagepart.isheader");
+        if (Boolean.TRUE.equals(obj)) {
+            targetNamespace = part.getMessageInfo().getOperation().getInterface().
+            getService().getTargetNamespace();
+        } 
         
         String jpname = ProcessorUtil.mangleNameToVariableName(simpleJavaName);
         JavaReturn returnType = new JavaReturn(jpname, fullJavaName , targetNamespace);

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/WebParamAnnotator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/WebParamAnnotator.java?view=diff&rev=541230&r1=541229&r2=541230
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/WebParamAnnotator.java
(original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/WebParamAnnotator.java
Thu May 24 02:10:04 2007
@@ -45,6 +45,7 @@
         if (method.getSoapStyle() == SOAPBinding.Style.DOCUMENT
             || parameter.isHeader()) {
             targetNamespace = parameter.getTargetNamespace();
+            
             if (parameter.getQName() != null) {
                 name = parameter.getQName().getLocalPart();
             }

Modified: incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java?view=diff&rev=541230&r1=541229&r2=541230
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java
(original)
+++ incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java
Thu May 24 02:10:04 2007
@@ -281,8 +281,9 @@
         method = clz.getMethod("greetMe", new Class[] {String.class});
         assertEquals("String", method.getReturnType().getSimpleName());
         WebParam webParamAnn = AnnotationUtil.getWebParam(method, "requestType");
-        assertEquals("http://apache.org/hello_world_soap_http/types", webParamAnn.targetNamespace());
-
+        //if is wrapped, tns should be empty
+        //assertEquals("http://apache.org/hello_world_soap_http/types", webParamAnn.targetNamespace());
+        assertEquals("", webParamAnn.targetNamespace());
         method = clz.getMethod("greetMeOneWay", new Class[] {String.class});
         Oneway oneWayAnn = AnnotationUtil.getPrivMethodAnnotation(method, Oneway.class);
         assertNotNull("OneWay Annotation is not generated", oneWayAnn);
@@ -837,7 +838,8 @@
 
         method = clz.getMethod("deregisterPeerManager", new Class[] {String.class});
         webParamAnn = AnnotationUtil.getWebParam(method, "node_id");
-        assertEquals("http://apache.org/locator/types", webParamAnn.targetNamespace());
+        
+        assertEquals("", webParamAnn.targetNamespace());
 
 
 



Mime
View raw message