cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r782753 - in /cxf/branches/2.1.x-fixes: ./ tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/
Date Mon, 08 Jun 2009 19:54:21 GMT
Author: dkulp
Date: Mon Jun  8 19:54:20 2009
New Revision: 782753

URL: http://svn.apache.org/viewvc?rev=782753&view=rev
Log:
Merged revisions 782735 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.2.x-fixes

................
  r782735 | dkulp | 2009-06-08 15:26:21 -0400 (Mon, 08 Jun 2009) | 10 lines
  
  Merged revisions 782729 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r782729 | dkulp | 2009-06-08 15:16:46 -0400 (Mon, 08 Jun 2009) | 2 lines
    
    [CXF-2271] Fix problem where autoNameResolution isn't working for
    unwrapped operation parts.
  ........
................

Modified:
    cxf/branches/2.1.x-fixes/   (props changed)
    cxf/branches/2.1.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
    cxf/branches/2.1.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/WrapperStyleNameCollisionValidator.java

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jun  8 19:54:20 2009
@@ -1,2 +1,2 @@
-/cxf/branches/2.2.x-fixes:743446,753380,753397,753421,754585,755365,757499,757859,757899,757935,757951,758195,758303,758308,758378,758690,758910,759890,759961,759963-759964,759966,760029,760073,760150,760171,760178,760198,760212,760456,760468,760582,760938,761094,761113,761120,761317,761759,761789,762393,762518,762567,763200,763272,763495,763854,763931,763942,763953,764033-764034,764581,764599-764606,764887,765357,766013,766058,766100-766101,766763,766770,766860,766962-766963,767159,767191,767927,771416,772143,772402,772658,772714,773009-773010,773027,773049,773146,773581,773691,773693,774446-774496,774558,774760,774851,774979,775423,776024-776025,776218,776429,776459,777189,777224,777243,777481,777505,777572,777580,780033,780184,780213,780421,780664,780800,780902,780911,781497,781841,782733
-/cxf/trunk:782181,782728
+/cxf/branches/2.2.x-fixes:743446,753380,753397,753421,754585,755365,757499,757859,757899,757935,757951,758195,758303,758308,758378,758690,758910,759890,759961,759963-759964,759966,760029,760073,760150,760171,760178,760198,760212,760456,760468,760582,760938,761094,761113,761120,761317,761759,761789,762393,762518,762567,763200,763272,763495,763854,763931,763942,763953,764033-764034,764581,764599-764606,764887,765357,766013,766058,766100-766101,766763,766770,766860,766962-766963,767159,767191,767927,771416,772143,772402,772658,772714,773009-773010,773027,773049,773146,773581,773691,773693,774446-774496,774558,774760,774851,774979,775423,776024-776025,776218,776429,776459,777189,777224,777243,777481,777505,777572,777580,780033,780184,780213,780421,780664,780800,780902,780911,781497,781841,782733,782735
+/cxf/trunk:782181,782728-782729

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

Modified: cxf/branches/2.1.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java?rev=782753&r1=782752&r2=782753&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
(original)
+++ cxf/branches/2.1.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
Mon Jun  8 19:54:20 2009
@@ -114,7 +114,8 @@
         String name = parameter.getName();
         int count = 0;
         while (method.getParameter(parameter.getName()) != null
-            && context.optionSet(ToolConstants.CFG_AUTORESOLVE)) {
+            && context.optionSet(ToolConstants.CFG_AUTORESOLVE)
+            && parameter.getStyle() != JavaType.Style.INOUT) {
             parameter.setName(name + (++count));
         }
         
@@ -363,13 +364,23 @@
             if (outputWrapElement.size() > 1) {
                 for (QName inElement : inputWrapElement) {
                     if (isSameWrapperChild(inElement, outElement)) {
-                        JavaParameter  jp = getParameterFromQName(outputPart.getElementQName(),
outElement,
-                                                                  JavaType.Style.INOUT, outputPart);
+                        JavaParameter jpIn = null;
+                        for (JavaParameter j : method.getParameters()) {
+                            if (inElement.equals(j.getQName())) {
+                                jpIn = j;
+                            }
+                        }
+                        JavaParameter jp = getParameterFromQName(outputPart.getElementQName(),
outElement,
+                                                                 JavaType.Style.INOUT, outputPart);
                         if (!qualified) {
                             jp.setTargetNamespace("");
                         }
+                        if (!jpIn.getClassName().equals(jp.getClassName())) {
+                            jp.setStyle(JavaType.Style.OUT);
+                        } 
                         addParameter(method, jp);
                         sameWrapperChild = true;
+
                         if (method.getReturn() == null) {
                             addVoidReturn(method);
                         }
@@ -406,11 +417,21 @@
             if (inputWrapElement != null) {
                 for (QName inElement : inputWrapElement) {
                     if (isSameWrapperChild(inElement, outElement)) {
-                        JavaParameter  jp = getParameterFromQName(outputPart.getElementQName(),
outElement,
-                                                                  JavaType.Style.INOUT, outputPart);
+                        
+                        JavaParameter jpIn = null;
+                        for (JavaParameter j : method.getParameters()) {
+                            if (inElement.equals(j.getQName())) {
+                                jpIn = j;
+                            }
+                        }
+                        JavaParameter jp = getParameterFromQName(outputPart.getElementQName(),
outElement,
+                                                                 JavaType.Style.INOUT, outputPart);
                         if (!qualified) {
                             jp.setTargetNamespace("");
                         }
+                        if (!jpIn.getClassName().equals(jp.getClassName())) {
+                            jp.setStyle(JavaType.Style.OUT);
+                        }
                         addParameter(method, jp);
                         sameWrapperChild = true;
                         break;

Modified: cxf/branches/2.1.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/WrapperStyleNameCollisionValidator.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/WrapperStyleNameCollisionValidator.java?rev=782753&r1=782752&r2=782753&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/WrapperStyleNameCollisionValidator.java
(original)
+++ cxf/branches/2.1.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/WrapperStyleNameCollisionValidator.java
Mon Jun  8 19:54:20 2009
@@ -31,6 +31,7 @@
 import org.apache.cxf.service.model.MessagePartInfo;
 import org.apache.cxf.service.model.OperationInfo;
 import org.apache.cxf.service.model.ServiceInfo;
+import org.apache.cxf.tools.common.ToolConstants;
 import org.apache.cxf.tools.common.ToolContext;
 import org.apache.cxf.tools.validator.ServiceValidator;
 import org.apache.cxf.tools.wsdlto.frontend.jaxws.customization.JAXWSBinding;
@@ -66,6 +67,8 @@
 
     private boolean isValidOperation(OperationInfo operation) {
         ToolContext context = service.getProperty(ToolContext.class.getName(), ToolContext.class);
+        
+        boolean c = context.optionSet(ToolConstants.CFG_AUTORESOLVE);
 
         boolean valid = false;
         if (operation.getUnwrappedOperation() == null) {
@@ -101,27 +104,13 @@
             && operation.getOutput().getMessageParts().size() == 1) {
             output = operation.getOutput().getMessageParts().iterator().next();
         }
-
-        Map<QName, QName> names = new HashMap<QName, QName>();
-        if (input != null) {
-            for (WrapperElement element : ProcessorUtil.getWrappedElement(context, input.getElementQName()))
{
-                if (names.containsKey(element.getElementName())
-                    &&  (names.get(element.getElementName()) == element.getSchemaTypeName()
-                        || names.get(element.getElementName()).equals(element.getSchemaTypeName())))
{
-                    handleErrors(names.get(element.getElementName()), element);
-                    return false;
-                } else {
-                    names.put(element.getElementName(), element.getSchemaTypeName());
-                }
-            }
-        }
-
-        if (output != null) {
-            List<WrapperElement> els = ProcessorUtil.getWrappedElement(context, output.getElementQName());
-            if (els.size() > 1) {
-                for (WrapperElement element : els) {
+        if (!c) {
+            Map<QName, QName> names = new HashMap<QName, QName>();
+            if (input != null) {
+                for (WrapperElement element : ProcessorUtil.getWrappedElement(context, 
+                                                                              input.getElementQName()))
{
                     if (names.containsKey(element.getElementName())
-                        &&  !(names.get(element.getElementName()) == element.getSchemaTypeName()
+                        &&  (names.get(element.getElementName()) == element.getSchemaTypeName()
                             || names.get(element.getElementName()).equals(element.getSchemaTypeName())))
{
                         handleErrors(names.get(element.getElementName()), element);
                         return false;
@@ -130,6 +119,22 @@
                     }
                 }
             }
+    
+            if (output != null) {
+                List<WrapperElement> els = ProcessorUtil.getWrappedElement(context,
output.getElementQName());
+                if (els.size() > 1) {
+                    for (WrapperElement element : els) {
+                        if (names.containsKey(element.getElementName())
+                            &&  !(names.get(element.getElementName()) == element.getSchemaTypeName()
+                                || names.get(element.getElementName()).equals(element.getSchemaTypeName())))
{
+                            handleErrors(names.get(element.getElementName()), element);
+                            return false;
+                        } else {
+                            names.put(element.getElementName(), element.getSchemaTypeName());
+                        }
+                    }
+                }
+            }
         }
         return true;
     }



Mime
View raw message