cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r681165 - /cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
Date Wed, 30 Jul 2008 18:32:13 GMT
Author: dkulp
Date: Wed Jul 30 11:32:12 2008
New Revision: 681165

URL: http://svn.apache.org/viewvc?rev=681165&view=rev
Log:
Fix code generation failure

Modified:
    cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java

Modified: cxf/trunk/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/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java?rev=681165&r1=681164&r2=681165&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
(original)
+++ cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
Wed Jul 30 11:32:12 2008
@@ -492,37 +492,43 @@
         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 (inputMessage != null) {
+                List<MessagePartInfo> inputParts = inputMessage.getMessageParts();
+                MessagePartInfo inputPart = inputParts.size() > 0 ? inputParts.iterator().next()
: null;
+                List<QName> inputWrapElement = null;
+                if (inputPart != null) {
+                    inputWrapElement = ProcessorUtil.getWrappedElementQNames(context, 
+                                                                             inputPart.getElementQName());
+                }
+                if (inputWrapElement != null) {
+                    for (QName item : inputWrapElement) {
+                        String fullJavaName = dataBinding
+                            .getWrappedElementType(inputPart.getElementQName(), item);
+                        if (StringUtils.isEmpty(fullJavaName)) {
+                            wrapped = false;
+                            break;
+                        }
+                    }                
+                }
+            }
+            if (outputMessage != null) {
+                List<MessagePartInfo> outputParts = outputMessage.getMessageParts();
+                MessagePartInfo outputPart = outputParts.size() > 0 ? outputParts.iterator().next()
: null;
+                List<QName> outputWrapElement = null;
+                if (outputPart != null) {
+                    outputWrapElement = ProcessorUtil.getWrappedElementQNames(context, 
+                                                                              outputPart.getElementQName());
+                }
+                if (outputWrapElement != null) {
+                    for (QName item : outputWrapElement) {
+                        String fullJavaName = dataBinding
+                            .getWrappedElementType(outputPart.getElementQName(), item);
+                        if (StringUtils.isEmpty(fullJavaName)) {
+                            wrapped = false;
+                            break;
+                        }
+                    }
                 }
             }
             if (!wrapped) {



Mime
View raw message