cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject svn commit: r514640 - /incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/internal/ParameterProcessor.java
Date Mon, 05 Mar 2007 10:40:27 GMT
Author: mmao
Date: Mon Mar  5 02:40:26 2007
New Revision: 514640

URL: http://svn.apache.org/viewvc?view=rev&rev=514640
Log:
Fix the build
  * string empty dose not mean it is null

Modified:
    incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/internal/ParameterProcessor.java

Modified: incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/internal/ParameterProcessor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/internal/ParameterProcessor.java?view=diff&rev=514640&r1=514639&r2=514640
==============================================================================
--- incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/internal/ParameterProcessor.java
(original)
+++ incubator/cxf/trunk/tools/wsdl2java/src/main/java/org/apache/cxf/tools/wsdl2java/processor/internal/ParameterProcessor.java
Mon Mar  5 02:40:26 2007
@@ -43,6 +43,7 @@
 import com.sun.codemodel.JType;
 import com.sun.tools.xjc.api.Property;
 
+import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.tools.common.ToolConstants;
 import org.apache.cxf.tools.common.ToolContext;
@@ -157,9 +158,6 @@
         webParamAnnotation.addArgument("name", name);
         if (method.getSoapStyle() == SOAPBinding.Style.DOCUMENT
             || parameter.isHeader()) {
-            if (parameter.getTypeReference() != null) {
-                targetNamespace = parameter.getTypeReference().tagName.getNamespaceURI();
-            }
             webParamAnnotation.addArgument("targetNamespace", targetNamespace);
         }
 
@@ -440,7 +438,7 @@
     private JavaParameter getParameterFromProperty(Property property, JavaType.Style style,
Part part) {
         JType t = property.type();
         String targetNamespace = property.elementName().getNamespaceURI();
-        if (targetNamespace == null) {
+        if (StringUtils.isEmpty(targetNamespace)) {
             targetNamespace = ProcessorUtil.resolvePartNamespace(part);
         }
         JavaParameter parameter = new JavaParameter(property.name(), t.fullName(), targetNamespace);
@@ -457,7 +455,7 @@
     private JavaReturn getReturnFromProperty(Property property, Part part) {
         JType t = property.type();
         String targetNamespace = property.elementName().getNamespaceURI();
-        if (targetNamespace == null) {
+        if (StringUtils.isEmpty(targetNamespace)) {
             targetNamespace = ProcessorUtil.resolvePartNamespace(part);
         }
         JavaReturn returnType = new JavaReturn(property.name(), t.fullName(), targetNamespace);



Mime
View raw message