cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r835971 - in /cxf/branches/2.2.x-fixes: ./ tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/ tools/wsdlto/test/src/tes...
Date Fri, 13 Nov 2009 20:03:48 GMT
Author: dkulp
Date: Fri Nov 13 20:03:48 2009
New Revision: 835971

URL: http://svn.apache.org/viewvc?rev=835971&view=rev
Log:
Merged revisions 835969 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r835969 | dkulp | 2009-11-13 15:00:57 -0500 (Fri, 13 Nov 2009) | 1 line
  
  Fix TCK regression
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/PortTypeProcessor.java
    cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java
    cxf/branches/2.2.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
    cxf/branches/2.2.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1152/jaxws1.xml

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.2.x-fixes/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/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/PortTypeProcessor.java?rev=835971&r1=835970&r2=835971&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/PortTypeProcessor.java
(original)
+++ cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/PortTypeProcessor.java
Fri Nov 13 20:03:48 2009
@@ -47,7 +47,9 @@
         super(c);
     }
 
-    private JavaInterface getInterface(ServiceInfo serviceInfo,
+    public static JavaInterface getInterface(
+                                       ToolContext context,
+                                       ServiceInfo serviceInfo,
                                        InterfaceInfo interfaceInfo) throws ToolException
{
         JavaInterface intf = interfaceInfo.getProperty("JavaInterface", JavaInterface.class);
         if (intf == null) {
@@ -105,7 +107,7 @@
         if (interfaceInfo == null) {
             return;
         }
-        getInterface(serviceInfo, interfaceInfo);
+        getInterface(context, serviceInfo, interfaceInfo);
     }
 
     public void process(ServiceInfo serviceInfo) throws ToolException {
@@ -119,7 +121,7 @@
             return;
         }
 
-        JavaInterface intf = getInterface(serviceInfo, interfaceInfo);
+        JavaInterface intf = getInterface(context, serviceInfo, interfaceInfo);
         intf.setJavaModel(jmodel);
 
         Element handler = (Element)context.get(ToolConstants.HANDLER_CHAIN);

Modified: cxf/branches/2.2.x-fixes/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/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java?rev=835971&r1=835970&r2=835971&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java
(original)
+++ cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java
Fri Nov 13 20:03:48 2009
@@ -37,11 +37,9 @@
 import org.w3c.dom.Element;
 
 import org.apache.cxf.common.i18n.Message;
-import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.service.model.BindingInfo;
 import org.apache.cxf.service.model.BindingOperationInfo;
 import org.apache.cxf.service.model.EndpointInfo;
-import org.apache.cxf.service.model.InterfaceInfo;
 import org.apache.cxf.service.model.MessageInfo;
 import org.apache.cxf.service.model.MessagePartInfo;
 import org.apache.cxf.service.model.OperationInfo;
@@ -86,13 +84,14 @@
     private Object bindingObj;
     private ServiceInfo service;
 
-    private final JAXWSBinding jaxwsBinding = new JAXWSBinding();
+    private JAXWSBinding jaxwsBinding = new JAXWSBinding();
 
     public ServiceProcessor(ToolContext penv) {
         super(penv);
     }
 
     public void process(ServiceInfo si) throws ToolException {
+        jaxwsBinding = new JAXWSBinding();
         this.service = si;
         if (si.getName() == null) {
             processBindings(context.get(JavaModel.class));
@@ -194,7 +193,9 @@
                 if (serviceBinding2.getJaxwsClass() != null
                     && serviceBinding2.getJaxwsClass().getClassName() != null) {
                     name = serviceBinding2.getJaxwsClass().getClassName();              
 
-                    sclz.setClassJavaDoc(serviceBinding2.getJaxwsClass().getComments());
+                }
+                if (serviceBinding2.getJaxwsClass().getComments() != null) {
+                    jaxwsBinding.setClassJavaDoc(serviceBinding2.getJaxwsClass().getComments());
                 }
                 if (!serviceBinding2.getPackageJavaDoc().equals("")) {
                     sclz.setPackageJavaDoc(serviceBinding2.getPackageJavaDoc());
@@ -227,7 +228,7 @@
         Collection<EndpointInfo> ports = service.getEndpoints();
 
         for (EndpointInfo port : ports) {
-            JavaPort javaport = processPort(model, port);
+            JavaPort javaport = processPort(model, service, port);
             sclz.addPort(javaport);
         }
         
@@ -235,59 +236,22 @@
         model.addServiceClass(sclz.getName(), sclz);
     }
 
-    private JavaPort processPort(JavaModel model, EndpointInfo port) throws ToolException
{
+    private JavaPort processPort(JavaModel model, ServiceInfo si, EndpointInfo port) throws
ToolException {
+        BindingInfo binding = port.getBinding();
+        String portType = binding.getInterface().getName().getLocalPart();
+        JavaInterface intf = PortTypeProcessor.getInterface(context, si, binding.getInterface());
         JavaPort jport = new JavaPort(NameUtil.mangleNameToClassName(port.getName().getLocalPart()));
+        jport.setPackageName(intf.getPackageName());
+        
         jport.setPortName(port.getName().getLocalPart());
-        BindingInfo binding = port.getBinding();
         jport.setBindingAdress(port.getAddress());
         jport.setBindingName(binding.getName().getLocalPart());
 
-        String namespace = binding.getInterface().getName().getNamespaceURI();
-        String packageName = ProcessorUtil.parsePackageName(namespace, context.mapPackageName(namespace));
-        jport.setPackageName(packageName);
-
-        InterfaceInfo infInfo = binding.getInterface();
 
-        String portType = binding.getInterface().getName().getLocalPart();
         jport.setPortType(portType);
 
-        JAXWSBinding infBinding = infInfo.getExtensor(JAXWSBinding.class);
-
-        if (infBinding != null) {
-            if (infBinding.getJaxwsClass() != null
-                && !StringUtils.isEmpty(infBinding.getJaxwsClass().getClassName()))
{
-                jport.setPortType(infBinding.getJaxwsClass().getClassName());
-                jaxwsBinding.setClassJavaDoc(infBinding.getJaxwsClass().getComments());
-            }
-
-            if (!infBinding.isEnableAsyncMapping()) {
-                jaxwsBinding.setEnableAsyncMapping(false);
-            }
-            if (!infBinding.isEnableWrapperStyle()) {
-                jaxwsBinding.setEnableWrapperStyle(false);
-            }
-
-            if (infBinding.getPackage() != null) {
-                jaxwsBinding.setPackage(infBinding.getPackage());
-            }
-            
-            if (!infBinding.getPackageJavaDoc().equals("")) {
-                jaxwsBinding.setPackageJavaDoc(infBinding.getPackageJavaDoc());
-            }
-        }
-
-        if (jaxwsBinding.getPackage() != null) {
-            jport.setPackageName(jaxwsBinding.getPackage());
-        }
-
-        if (infBinding != null && infBinding.getJaxwsClass() != null
-            && infBinding.getJaxwsClass().getClassName() != null) {
-            String className = NameUtil.mangleNameToClassName(infBinding.getJaxwsClass().getClassName());
-            jport.setInterfaceClass(className);
-        } else {
-            jport.setInterfaceClass(NameUtil.mangleNameToClassName(portType));
-        }
 
+        jport.setInterfaceClass(intf.getName());
         bindingType = getBindingType(binding);
 
         if (bindingType == null) {

Modified: cxf/branches/2.2.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java?rev=835971&r1=835970&r2=835971&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
(original)
+++ cxf/branches/2.2.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
Fri Nov 13 20:03:48 2009
@@ -970,12 +970,12 @@
             if (str.contains("package javadoc")) {
                 match1 = true;
             }
-            if (str.contains("class javadoc")) {
+            if (str.contains("service class javadoc")) {
                 match2 = true;
             }
         }
-        assertTrue(match1);
-        assertTrue(match2);
+        assertTrue(results1.toString(), match1);
+        assertTrue(results2.toString(), match2);
         
     }
     

Modified: cxf/branches/2.2.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1152/jaxws1.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1152/jaxws1.xml?rev=835971&r1=835970&r2=835971&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1152/jaxws1.xml
(original)
+++ cxf/branches/2.2.x-fixes/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf1152/jaxws1.xml
Fri Nov 13 20:03:48 2009
@@ -36,6 +36,11 @@
            <jaxws:javadoc>this is class javadoc</jaxws:javadoc>
         </jaxws:class>
     </jaxws:bindings>
+    <jaxws:bindings node="wsdl:definitions/wsdl:service[@name='SOAPService']">
+        <jaxws:class name="SOAPService">
+           <jaxws:javadoc>this is service 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-->



Mime
View raw message