cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r908597 - in /cxf/trunk/tools/wsdlto: frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ test/src/test/resources/wsdl2java_wsdl/cxf918/
Date Wed, 10 Feb 2010 17:38:45 GMT
Author: dkulp
Date: Wed Feb 10 17:38:44 2010
New Revision: 908597

URL: http://svn.apache.org/viewvc?rev=908597&view=rev
Log:
[CXF-2661] Fix some issues where various jaxws customizations were not
being picked up properly from the portType

Modified:
    cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/OperationProcessor.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/test/src/test/resources/wsdl2java_wsdl/cxf918/bug2.wsdl

Modified: cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/OperationProcessor.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/OperationProcessor.java?rev=908597&r1=908596&r2=908597&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/OperationProcessor.java
(original)
+++ cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/OperationProcessor.java
Wed Feb 10 17:38:44 2010
@@ -88,20 +88,7 @@
 
         ParameterProcessor paramProcessor = new ParameterProcessor(context);
         method.clear();
-        paramProcessor.process(method,
-                               inputMessage,
-                               outputMessage,
-                               operation.getParameterOrdering());
-
-        method.annotate(new WebMethodAnnotator());
-
-        if (method.isWrapperStyle()) {
-            setWrapper(operation);
-            method.annotate(new WrapperAnnotator(wrapperRequest, wrapperResponse));
-        }
-
-        method.annotate(new WebResultAnnotator());
-
+        
         JAXWSBinding opBinding = (JAXWSBinding)operation.getExtensor(JAXWSBinding.class);
         JAXWSBinding ptBinding = operation.getInterface().getExtensor(JAXWSBinding.class);
         JAXWSBinding defBinding = operation.getInterface().getService()
@@ -109,6 +96,7 @@
         
         boolean enableAsync = false;
         boolean enableMime = false;
+        boolean enableWrapper = method.isWrapperStyle();
         if (defBinding != null) {
             if (defBinding.isSetEnableMime()) {
                 enableMime = defBinding.isEnableMime();
@@ -116,6 +104,9 @@
             if (defBinding.isSetEnableAsyncMapping()) {
                 enableAsync = defBinding.isEnableAsyncMapping();
             }
+            if (defBinding.isSetEnableWrapperStyle()) {
+                enableWrapper = defBinding.isEnableWrapperStyle();
+            }
         }
         if (ptBinding != null) {
             if (ptBinding.isSetEnableMime()) {
@@ -124,6 +115,9 @@
             if (ptBinding.isSetEnableAsyncMapping()) {
                 enableAsync = ptBinding.isEnableAsyncMapping();
             }
+            if (ptBinding.isSetEnableWrapperStyle()) {
+                enableWrapper = ptBinding.isEnableWrapperStyle();
+            }
         }
         if (opBinding != null) {
             if (opBinding.isSetEnableMime()) {
@@ -132,13 +126,33 @@
             if (opBinding.isSetEnableAsyncMapping()) {
                 enableAsync = opBinding.isEnableAsyncMapping();
             }
+            if (opBinding.isSetEnableWrapperStyle()) {
+                enableWrapper = opBinding.isEnableWrapperStyle();
+            }
         }
+        method.setWrapperStyle(enableWrapper);
         
+        
+        paramProcessor.process(method,
+                               inputMessage,
+                               outputMessage,
+                               operation.getParameterOrdering());
+
+        if (method.isWrapperStyle()) {
+            setWrapper(operation);
+            method.annotate(new WrapperAnnotator(wrapperRequest, wrapperResponse));
+        }
+
+        method.annotate(new WebMethodAnnotator());
+
+
+        method.annotate(new WebResultAnnotator());
+
+
         if (!method.isOneWay()
             && enableAsync && !isAddedAsycMethod(method)) {
             addAsyncMethod(method);
         }
-
         if (enableMime) {
             method.setMimeEnable(true);
         }

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=908597&r1=908596&r2=908597&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
Wed Feb 10 17:38:44 2010
@@ -369,29 +369,29 @@
                 OperationInfo opinfo = bop.getOperationInfo();
 
                 JAXWSBinding opBinding = (JAXWSBinding)opinfo.getExtensor(JAXWSBinding.class);
-
-
-                if (opBinding != null) {
-                    if (opBinding.isEnableWrapperStyle()) {
-                        jaxwsBinding.setEnableWrapperStyle(true);
-                    } else {
-                        jaxwsBinding.setEnableWrapperStyle(false);
-                        if (!opBinding.isEnableAsyncMapping()) {
-                            jaxwsBinding.setEnableAsyncMapping(false);
-                        }
-                    }
-
-                    if (opBinding.isEnableMime()) {
-                        enableOpMime = true;
-                    }
+                JAXWSBinding infBinding = (JAXWSBinding)opinfo.getInterface().getExtensor(JAXWSBinding.class);
+                boolean enableMime = enableOpMime;
+                boolean enableWrapperStyle = true;
+                
+                if (infBinding != null && infBinding.isSetEnableWrapperStyle()) {
+                    enableWrapperStyle = infBinding.isEnableWrapperStyle();
+                }
+                if (infBinding != null && infBinding.isSetEnableMime()) {
+                    enableMime = infBinding.isEnableMime();
+                }
+                if (opBinding != null && opBinding.isSetEnableWrapperStyle()) {
+                    enableWrapperStyle = opBinding.isEnableWrapperStyle();
                 }
-                if (jaxwsBinding.isEnableMime() || enableOpMime) {
+                if (opBinding != null && opBinding.isSetEnableMime()) {
+                    enableMime = opBinding.isEnableMime();
+                }
+                if (jaxwsBinding.isEnableMime() || enableMime) {
                     jm.setMimeEnable(true);
                 }
-                
-                if (jm.isWrapperStyle() && headerType > this.noHEADER
+                if ((jm.isWrapperStyle() && headerType > this.noHEADER)
                     || !jaxwsBinding.isEnableWrapperStyle()
-                    || jm.enableMime() && jm.isWrapperStyle()) {
+                    || (jm.enableMime() && jm.isWrapperStyle())
+                    || !enableWrapperStyle) {
                     // changed wrapper style
 
                     jm.setWrapperStyle(false);
@@ -401,7 +401,6 @@
 
                 } else {
                     processor.processMethod(jm, bop.getOperationInfo());
-
                 }
 
                 if (headerType == this.resultHeader) {

Modified: cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf918/bug2.wsdl
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf918/bug2.wsdl?rev=908597&r1=908596&r2=908597&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf918/bug2.wsdl (original)
+++ cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/cxf918/bug2.wsdl Wed Feb
10 17:38:44 2010
@@ -27,7 +27,7 @@
     
     <!-- customizations with global scope below it shows the default customizations -->
     <jaxws:bindings xmlns:jaxws="http://java.sun.com/xml/ns/jaxws">
-	<jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle>
+	<jaxws:enableWrapperStyle>true</jaxws:enableWrapperStyle>
 	<jaxws:enableAsyncMapping>false</jaxws:enableAsyncMapping>
     </jaxws:bindings>
 



Mime
View raw message