cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sea...@apache.org
Subject svn commit: r656684 - in /cxf/trunk/tools: common/src/main/java/org/apache/cxf/tools/common/model/ wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/ wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/ws...
Date Thu, 15 May 2008 14:40:24 GMT
Author: seanoc
Date: Thu May 15 07:40:23 2008
New Revision: 656684

URL: http://svn.apache.org/viewvc?rev=656684&view=rev
Log:
Fixed http://issues.apache.org/jira/browse/CXF-1512
Added support for <jaxws:javadoc> customisation

Modified:
    cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaInterface.java
    cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaMethod.java
    cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaServiceClass.java
    cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/JAXWSBinding.java
    cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/JAXWSBindingParser.java
    cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/PortTypeProcessor.java
    cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java
    cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/mapper/MethodMapper.java
    cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/sei.vm
    cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm
    cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
    cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/expected/expected_hello_mime
    cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1152/jaxws1.xml

Modified: cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaInterface.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaInterface.java?rev=656684&r1=656683&r2=656684&view=diff
==============================================================================
--- cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaInterface.java
(original)
+++ cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaInterface.java
Thu May 15 07:40:23 2008
@@ -32,6 +32,8 @@
     private String packageName;
     private String namespace;
     private String location;
+    private String packageJavaDoc;
+    private String classJavaDoc;
     private JavaModel model;
     private SOAPBinding.Style soapStyle;
     private SOAPBinding.Use soapUse;
@@ -167,6 +169,22 @@
     public void setNamespace(String ns) {
         this.namespace = ns;
     }
+    
+    public void setPackageJavaDoc(String doc) {
+        packageJavaDoc = doc;
+    }
+    
+    public String getPackageJavaDoc() {   
+        return (packageJavaDoc != null) ? packageJavaDoc : "";
+    }
+    
+    public void setClassJavaDoc(String doc) {
+        classJavaDoc = doc;
+    }
+    
+    public String getClassJavaDoc() {   
+        return (classJavaDoc != null) ? classJavaDoc : "";
+    }
 
     public void addAnnotation(JAnnotation annotation) {
         this.annotations.add(annotation);

Modified: cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaMethod.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaMethod.java?rev=656684&r1=656683&r2=656684&view=diff
==============================================================================
--- cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaMethod.java
(original)
+++ cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaMethod.java
Thu May 15 07:40:23 2008
@@ -37,6 +37,7 @@
     private static final Logger LOG = LogUtils.getL7dLogger(JavaMethod.class);
     private String name;
     private String operationName;
+    private String javaDoc;
     private JavaReturn javaReturn;
     private OperationType style;
     private String soapAction;
@@ -352,4 +353,12 @@
     public final void setAsync(final boolean newAsync) {
         this.async = newAsync;
     }
+    
+    public void setJavaDoc(String doc) {
+        javaDoc = doc;
+    }
+    
+    public String getJavaDoc() {
+        return (javaDoc != null) ? javaDoc : "";
+    }
 }

Modified: cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaServiceClass.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaServiceClass.java?rev=656684&r1=656683&r2=656684&view=diff
==============================================================================
--- cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaServiceClass.java
(original)
+++ cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaServiceClass.java
Thu May 15 07:40:23 2008
@@ -27,6 +27,8 @@
     private final List<JavaPort> ports = new ArrayList<JavaPort>();
   
     private String serviceName;
+    private String classJavaDoc;
+    private String packageJavaDoc;
     
     public JavaServiceClass(JavaModel model) {
         super(model);
@@ -48,5 +50,20 @@
         return serviceName;
     }
     
+    public void setPackageJavaDoc(String doc) {
+        packageJavaDoc = doc;
+    }
+    
+    public String getPackageJavaDoc() {   
+        return (packageJavaDoc != null) ? packageJavaDoc : "";
+    }
+    
+    public void setClassJavaDoc(String doc) {
+        classJavaDoc = doc;
+    }
+    
+    public String getClassJavaDoc() {   
+        return (classJavaDoc != null) ? classJavaDoc : "";
+    } 
 
 }

Modified: cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/JAXWSBinding.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/JAXWSBinding.java?rev=656684&r1=656683&r2=656684&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/JAXWSBinding.java
(original)
+++ cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/JAXWSBinding.java
Thu May 15 07:40:23 2008
@@ -43,6 +43,12 @@
     private String packageName;
 
     private String methodName;
+    
+    private String methodJavaDoc;
+    
+    private String packageJavaDoc;
+    
+    private String classJavaDoc;
 
     private JAXWSParameter jaxwsPara;
 
@@ -136,4 +142,28 @@
     public String getMethodName() {
         return this.methodName;
     }
+    
+    public void setMethodJavaDoc(String doc) {
+        methodJavaDoc = doc;
+    }
+    
+    public String getMethodJavaDoc() {   
+        return (methodJavaDoc != null) ? methodJavaDoc : "";
+    }
+    
+    public void setPackageJavaDoc(String doc) {
+        packageJavaDoc = doc;
+    }
+    
+    public String getPackageJavaDoc() {   
+        return (packageJavaDoc != null) ? packageJavaDoc : "";
+    }
+    
+    public void setClassJavaDoc(String doc) {
+        classJavaDoc = doc;
+    }
+    
+    public String getClassJavaDoc() {   
+        return (classJavaDoc != null) ? classJavaDoc : "";
+    }
 }

Modified: cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/JAXWSBindingParser.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/JAXWSBindingParser.java?rev=656684&r1=656683&r2=656684&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/JAXWSBindingParser.java
(original)
+++ cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/JAXWSBindingParser.java
Thu May 15 07:40:23 2008
@@ -89,8 +89,17 @@
                     jaxwsBinding.setEnableWrapperStyle(getNodeValue(child));
                 } else if (isPackageElement(child)) {
                     jaxwsBinding.setPackage(getPackageName(child));
+                    Node docChild = DOMUtils.getChild(child, Element.ELEMENT_NODE);
+                    if (docChild != null && this.isJAXWSClassDoc(docChild)) {
+                        jaxwsBinding.setPackageJavaDoc(DOMUtils.getContent(docChild));
+                    }
                 } else if (isJAXWSMethodElement(child)) {
                     jaxwsBinding.setMethodName(getMethodName(child));
+                    Node docChild = DOMUtils.getChild(child, Element.ELEMENT_NODE);
+
+                    if (docChild != null && this.isJAXWSClassDoc(docChild)) {
+                        jaxwsBinding.setMethodJavaDoc(DOMUtils.getContent(docChild));
+                    }
                 } else if (isJAXWSParameterElement(child)) {
                     Element childElement = (Element)child;
                     String partPath = "//" +  childElement.getAttribute("part");
@@ -137,6 +146,7 @@
         return ele.getAttribute("name");
     }
 
+
     private boolean isPackageElement(Node node) {
         if (ToolConstants.NS_JAXWS_BINDINGS.equals(node.getNamespaceURI())
             && "package".equals(node.getLocalName())) {

Modified: cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/PortTypeProcessor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/PortTypeProcessor.java?rev=656684&r1=656683&r2=656684&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/PortTypeProcessor.java
(original)
+++ cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/PortTypeProcessor.java
Thu May 15 07:40:23 2008
@@ -65,12 +65,19 @@
         } else if (jaxwsBinding != null && jaxwsBinding.getPackage() != null) {
             intf.setPackageName(jaxwsBinding.getPackage());
         }
+        
+        if (infBinding != null && !infBinding.getPackageJavaDoc().equals("")) {
+            intf.setPackageJavaDoc(infBinding.getPackageJavaDoc());
+        } else if (jaxwsBinding != null && !jaxwsBinding.getPackageJavaDoc().equals(""))
{
+            intf.setPackageJavaDoc(jaxwsBinding.getPackageJavaDoc());
+        }
 
         String name = intf.getName();
         if (infBinding != null
             && infBinding.getJaxwsClass() != null
             && infBinding.getJaxwsClass().getClassName() != null) {
             name = infBinding.getJaxwsClass().getClassName();
+            intf.setClassJavaDoc(infBinding.getJaxwsClass().getComments());
         }
         intf.setName(name);
 
@@ -104,12 +111,20 @@
         } else if (jaxwsBinding != null && jaxwsBinding.getPackage() != null) {
             intf.setPackageName(jaxwsBinding.getPackage());
         }
+        
+        if (infBinding != null && !infBinding.getPackageJavaDoc().equals("")) {
+            intf.setPackageJavaDoc(infBinding.getPackageJavaDoc());
+        } else if (jaxwsBinding != null && !jaxwsBinding.getPackageJavaDoc().equals(""))
{
+            intf.setPackageJavaDoc(jaxwsBinding.getPackageJavaDoc());
+        }
+
 
         String name = intf.getName();
         if (infBinding != null
             && infBinding.getJaxwsClass() != null
             && infBinding.getJaxwsClass().getClassName() != null) {
             name = infBinding.getJaxwsClass().getClassName();
+            intf.setClassJavaDoc(infBinding.getJaxwsClass().getComments());
         }
         intf.setName(name);
 

Modified: cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java?rev=656684&r1=656683&r2=656684&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java
(original)
+++ cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java
Thu May 15 07:40:23 2008
@@ -142,8 +142,10 @@
 
             if (serviceBinding.getJaxwsClass() != null
                 && serviceBinding.getJaxwsClass().getClassName() != null) {
-                name = serviceBinding.getJaxwsClass().getClassName();
+                name = serviceBinding.getJaxwsClass().getClassName();  
+                sclz.setClassJavaDoc(serviceBinding.getJaxwsClass().getComments());     
    
             }
+            sclz.setPackageJavaDoc(serviceBinding.getPackageJavaDoc());
         }
         if (serviceBinding2 != null) {
             if (serviceBinding2.getPackage() != null) {
@@ -163,10 +165,14 @@
             }
             if (serviceBinding2.getJaxwsClass() != null
                 && serviceBinding2.getJaxwsClass().getClassName() != null) {
-                name = serviceBinding2.getJaxwsClass().getClassName();
+                name = serviceBinding2.getJaxwsClass().getClassName();                
+                sclz.setClassJavaDoc(serviceBinding2.getJaxwsClass().getComments());
+            }
+            if (!serviceBinding2.getPackageJavaDoc().equals("")) {
+                sclz.setPackageJavaDoc(serviceBinding2.getPackageJavaDoc());
             }
         }
-
+        
         sclz.setServiceName(service.getName().getLocalPart());
         sclz.setNamespace(namespace);
 
@@ -195,6 +201,8 @@
             JavaPort javaport = processPort(model, port);
             sclz.addPort(javaport);
         }
+        
+        sclz.setClassJavaDoc(jaxwsBinding.getClassJavaDoc());
         model.addServiceClass(name, sclz);
     }
 
@@ -220,6 +228,7 @@
             if (infBinding.getJaxwsClass() != null
                 && !StringUtils.isEmpty(infBinding.getJaxwsClass().getClassName()))
{
                 jport.setPortType(infBinding.getJaxwsClass().getClassName());
+                jaxwsBinding.setClassJavaDoc(infBinding.getJaxwsClass().getComments());
             }
 
             if (!infBinding.isEnableAsyncMapping()) {
@@ -232,6 +241,10 @@
             if (infBinding.getPackage() != null) {
                 jaxwsBinding.setPackage(infBinding.getPackage());
             }
+            
+            if (!infBinding.getPackageJavaDoc().equals("")) {
+                jaxwsBinding.setPackageJavaDoc(infBinding.getPackageJavaDoc());
+            }
         }
 
         if (jaxwsBinding.getPackage() != null) {

Modified: cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/mapper/MethodMapper.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/mapper/MethodMapper.java?rev=656684&r1=656683&r2=656684&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/mapper/MethodMapper.java
(original)
+++ cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/mapper/MethodMapper.java
Thu May 15 07:40:23 2008
@@ -43,6 +43,11 @@
             && opBinding.getMethodName() != null) {
             method.setName(opBinding.getMethodName());
         }
+        
+        if (opBinding != null
+            && opBinding.getMethodJavaDoc() != null) {
+            method.setJavaDoc(opBinding.getMethodJavaDoc());
+        }
 
 
         if (operation.isOneWay()) {

Modified: cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/sei.vm
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/sei.vm?rev=656684&r1=656683&r2=656684&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/sei.vm
(original)
+++ cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/sei.vm
Thu May 15 07:40:23 2008
@@ -15,6 +15,10 @@
 ## specific language governing permissions and limitations
 ## under the License.
 
+/*
+ * $intf.packageJavaDoc
+ */
+
 package $intf.PackageName;
 
 #foreach ($import in $intf.Imports)
@@ -27,6 +31,11 @@
  * Generated source version: $version
  * 
  */
+ 
+ /*
+  * $intf.classJavaDoc
+  */
+
 
 #foreach ($annotation in $intf.Annotations)
 $annotation
@@ -35,6 +44,10 @@
 public interface $intf.Name {
 #foreach ($method in $intf.Methods)
 
+/*
+ * ${method.JavaDoc}
+ */
+
 #foreach ($annotation in $method.Annotations)
     $annotation
 #end

Modified: cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm?rev=656684&r1=656683&r2=656684&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm
(original)
+++ cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm
Thu May 15 07:40:23 2008
@@ -15,6 +15,10 @@
 ## specific language governing permissions and limitations
 ## under the License.
 
+/*
+ * $service.packageJavaDoc
+ */
+
 package $service.PackageName;
 
 import java.net.MalformedURLException;
@@ -34,6 +38,10 @@
  * Generated source version: $version
  * 
  */
+ 
+/*
+ * $service.classJavaDoc
+ */
 
 @WebServiceClient(name = "${service.ServiceName}", targetNamespace = "$service.Namespace",
wsdlLocation = "$wsdlLocation")
 #foreach ($annotation in $service.Annotations)

Modified: cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java?rev=656684&r1=656683&r2=656684&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
(original)
+++ cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
Thu May 15 07:40:23 2008
@@ -24,6 +24,8 @@
 import java.io.FileInputStream;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
+import java.util.List;
+
 import javax.jws.WebService;
 import javax.xml.namespace.QName;
 import javax.xml.ws.WebFault;
@@ -75,10 +77,10 @@
     @After
     public void tearDown() {
         super.tearDown();
-        processor = null;
+        //processor = null;
         env = null;
     }
-
+    
     @Test
     public void testBug305729() throws Exception {
         env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/bug305729/hello_world.wsdl"));
@@ -514,9 +516,18 @@
 
         WSDLToJava.main(args);
 
-        assertFileEquals(getClass().getResource("expected/expected_hello_mime").getFile(),
-                         output.getCanonicalPath() 
-                         + "/org/apache/cxf/w2j/hello_world_mime/Hello.java");
+        String str1 = "SOAPBinding.ParameterStyle.BARE";
+        String str2 = "javax.xml.ws.Holder";
+        String str3 = "org.apache.cxf.mime.Address";
+        String str4 = "http://cxf.apache.org/w2j/hello_world_mime/types";
+                
+        String file = getStringFromFile(new File(output.getCanonicalPath() 
+                                        + "/org/apache/cxf/w2j/hello_world_mime/Hello.java"));
+        
+        assertTrue(file.contains(str1));
+        assertTrue(file.contains(str2));
+        assertTrue(file.contains(str3));
+        assertTrue(file.contains(str4));
     }
 
     @Test
@@ -922,6 +933,29 @@
         assertNotNull("Customized method 'myGreetMe' in MyGreeter.class is not found", customizedMethod);
     }
     
+    
+    @Test
+    public void testJaxwsBindingJavaDoc() throws Exception {
+        env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/hello_world.wsdl"));
+        env.put(ToolConstants.CFG_BINDING, getLocation("/wsdl2java_wsdl/cxf1152/jaxws1.xml"));
+        processor.setContext(env);
+        processor.execute();
+
+        List<String> results1 = FileUtils.readLines(new File(output.getCanonicalPath(),

+            "org/mypkg/MyGreeter.java"));
+                
+        assertTrue(results1.contains(" * this is package javadoc"));
+        assertTrue(results1.contains("  * this is class javadoc"));
+        assertTrue(results1.contains(" * this is method javadoc"));
+        
+        List<String> results2 = FileUtils.readLines(new File(output.getCanonicalPath(),

+            "org/mypkg/SoapService.java")); 
+        
+        assertTrue(results2.contains(" * this is package javadoc"));
+        assertTrue(results2.contains(" * this is class javadoc"));
+        
+    }
+    
     @Test
     public void testWSAActionAnno() throws Exception {
         env.put(ToolConstants.CFG_WSDLURL, 

Modified: cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/expected/expected_hello_mime
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/expected/expected_hello_mime?rev=656684&r1=656683&r2=656684&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/expected/expected_hello_mime
(original)
+++ cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/expected/expected_hello_mime
Thu May 15 07:40:23 2008
@@ -1,23 +1,8 @@
-/**
- * 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.cxf.w2j.hello_world_mime;
 
 import javax.jws.WebMethod;
@@ -31,12 +16,41 @@
 import javax.xml.ws.RequestWrapper;
 import javax.xml.ws.ResponseWrapper;
 
+/**
+ * This class was generated by Apache CXF 
+ * 
+ * Generated source version:
+ * 
+ */
+ 
+ /*
+  * 
+  */
+
+
 @WebService(targetNamespace = "http://cxf.apache.org/w2j/hello_world_mime", name = "Hello")
 @XmlSeeAlso({org.apache.cxf.mime.ObjectFactory.class})
 @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
 
 public interface Hello {
 
+/*
+ * 
+ */
+
+    @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+    @WebMethod
+    public void hello(
+        @WebParam(partName = "body", name = "body", targetNamespace = "http://cxf.apache.org/w2j/hello_world_mime/types")
+        java.lang.String body,
+        @WebParam(partName = "mime", mode = WebParam.Mode.INOUT, name = "mime", targetNamespace
= "")
+        javax.xml.ws.Holder<byte[]> mime
+    );
+
+/*
+ * 
+ */
+
     @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
     @WebResult(name = "addressRes", targetNamespace = "http://cxf.apache.org/w2j/hello_world_mime/types",
partName = "mime")
     @WebMethod
@@ -45,6 +59,10 @@
         org.apache.cxf.mime.Address mime
     );
 
+/*
+ * 
+ */
+
     @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
     @WebMethod
     public void helloMime(
@@ -53,13 +71,4 @@
         @WebParam(partName = "mime", mode = WebParam.Mode.INOUT, name = "mime", targetNamespace
= "")
         javax.xml.ws.Holder<java.awt.Image> mime
     );
-
-    @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
-    @WebMethod
-    public void hello(
-        @WebParam(partName = "body", name = "body", targetNamespace = "http://cxf.apache.org/w2j/hello_world_mime/types")
-        java.lang.String body,
-        @WebParam(partName = "mime", mode = WebParam.Mode.INOUT, name = "mime", targetNamespace
= "")
-        javax.xml.ws.Holder<byte[]> mime
-    );
-}
+}
\ No newline at end of file

Modified: cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1152/jaxws1.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1152/jaxws1.xml?rev=656684&r1=656683&r2=656684&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1152/jaxws1.xml (original)
+++ cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1152/jaxws1.xml Thu May
15 07:40:23 2008
@@ -20,7 +20,9 @@
 <jaxws:bindings wsdlLocation="../hello_world.wsdl" xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
 
     <jaxws:bindings node="wsdl:definitions">
-        <jaxws:package name="org.mypkg"/>
+        <jaxws:package name="org.mypkg">
+            <jaxws:javadoc>this is package javadoc</jaxws:javadoc>
+        </jaxws:package>
     </jaxws:bindings>
 
     <jaxws:bindings node="wsdl:definitions/wsdl:types/xsd:schema[@targetNamespace='http://cxf.apache.org/w2j/hello_world_soap_http/types']"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
@@ -30,12 +32,16 @@
     </jaxws:bindings>
 
     <jaxws:bindings node="wsdl:definitions/wsdl:portType[@name='Greeter']">
-        <jaxws:class name="MyGreeter"/>
+        <jaxws:class name="MyGreeter">
+           <jaxws:javadoc>this is class javadoc</jaxws:javadoc>
+        </jaxws:class>
     </jaxws:bindings>
 
     <jaxws:bindings node="wsdl:definitions/wsdl:portType[@name='Greeter']/wsdl:operation[@name='greetMe']">
         <!-- rename the generated java method name-->
-        <jaxws:method name="myGreetMe"/>        
+        <jaxws:method name="myGreetMe"> 
+            <jaxws:javadoc>this is method javadoc</jaxws:javadoc>
+        </jaxws:method>       
     </jaxws:bindings>
 
 </jaxws:bindings>



Mime
View raw message