cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r682964 - in /cxf/branches/2.0.x-fixes: ./ tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
Date Tue, 05 Aug 2008 21:34:14 GMT
Author: dkulp
Date: Tue Aug  5 14:34:12 2008
New Revision: 682964

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

........
  r681060 | dkulp | 2008-07-30 10:13:38 -0400 (Wed, 30 Jul 2008) | 2 lines
  
  Double check that we really can map all the wrapped parameters to classes.   If not, fallback
to bare mode.
........

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

Propchange: cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug  5 14:34:12 2008
@@ -1 +1 @@
-/cxf/trunk:673548,674485,674547,674551,674562,674601,674649,674764,674887,675644,675653,677048,677385,678004,678009,678559,678629,678808,678852,678891,678893,679248,679597,680435
+/cxf/trunk:673548,674485,674547,674551,674562,674601,674649,674764,674887,675644,675653,677048,677385,678004,678009,678559,678629,678808,678852,678891,678893,679248,679597,680435,681060

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

Modified: cxf/branches/2.0.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.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java?rev=682964&r1=682963&r2=682964&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
(original)
+++ cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
Tue Aug  5 14:34:12 2008
@@ -478,6 +478,48 @@
     private void buildParamModelsWithoutOrdering(JavaMethod method,
                                                  MessageInfo inputMessage,
                                                  MessageInfo outputMessage) throws ToolException
{
+        boolean wrapped = method.isWrapperStyle();
+        if (wrapped) {
+            //check if really can be wrapper style....
+            List<MessagePartInfo> outputParts = outputMessage.getMessageParts();
+            List<MessagePartInfo> inputParts = inputMessage.getMessageParts();
+
+            MessagePartInfo inputPart = inputParts.size() > 0 ? inputParts.iterator().next()
: null;
+            MessagePartInfo outputPart = outputParts.size() > 0 ? outputParts.iterator().next()
: null;
+
+            List<QName> inputWrapElement = null;
+            List<QName> outputWrapElement = null;
+
+            if (inputPart != null) {
+                inputWrapElement = ProcessorUtil.getWrappedElementQNames(context, 
+                                                                         inputPart.getElementQName());
+            }
+            if (outputPart != null) {
+                outputWrapElement = ProcessorUtil.getWrappedElementQNames(context, 
+                                                                          outputPart.getElementQName());
+            }
+            for (QName item : inputWrapElement) {
+                String fullJavaName = this.dataBinding.getWrappedElementType(inputPart.getElementQName(),
+                                                                             item);
+                if (StringUtils.isEmpty(fullJavaName)) {
+                    wrapped = false;
+                    break;
+                }
+            }
+            for (QName item : outputWrapElement) {
+                String fullJavaName = this.dataBinding.getWrappedElementType(outputPart.getElementQName(),
+                                                                             item);
+                if (StringUtils.isEmpty(fullJavaName)) {
+                    wrapped = false;
+                    break;
+                }
+            }
+            if (!wrapped) {
+                //could not map one of the parameters to a java type, need to drop down to
bare style
+                method.setWrapperStyle(false);
+            }
+        }
+        
         if (inputMessage != null) {
             if (method.isWrapperStyle()) {
                 processWrappedInput(method, inputMessage);



Mime
View raw message