axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nadira...@apache.org
Subject svn commit: r714056 - in /webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info: Type.java WSDLInfo.java
Date Fri, 14 Nov 2008 16:17:00 GMT
Author: nadiramra
Date: Fri Nov 14 08:16:59 2008
New Revision: 714056

URL: http://svn.apache.org/viewvc?rev=714056&view=rev
Log:
AXISCPP-1060 xsd:anyType as input or output with -wunwrapped generated bad code

Modified:
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/Type.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WSDLInfo.java

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/Type.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/Type.java?rev=714056&r1=714055&r2=714056&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/Type.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/Type.java Fri Nov
14 08:16:59 2008
@@ -336,6 +336,14 @@
     /**
      * @return boolean
      */
+    public boolean isPrimitiveType()
+    {
+        return CUtils.isPrimitiveType(name);
+    }
+    
+    /**
+     * @return boolean
+     */
     public boolean isSimpleType()
     {
         return isSimpleType;

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WSDLInfo.java
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WSDLInfo.java?rev=714056&r1=714055&r2=714056&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WSDLInfo.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WSDLInfo.java Fri
Nov 14 08:16:59 2008
@@ -1452,8 +1452,10 @@
         }
         else
         { 
-            // If input element does not contain any sub-elements or attributes, we ignore.
-            if (elementNames.hasNext() 
+            // If input element is complex and does not contain any sub-elements or attributes,
we ignore.
+            if (type.isSimpleType() 
+                    || type.isPrimitiveType()
+                    || elementNames.hasNext() 
                     || (attributes != null && attributes.hasNext()))
             {
                 String elementName;
@@ -1468,7 +1470,12 @@
                 pinfo.setType(type);
                 type.setIsUnwrappedInputType(true);
                 pinfo.setParamName(elementName, c_typeMap);
-                pinfo.setElementName(type.getName());
+                
+                if (!elementNames.hasNext() && type.isSimpleType())
+                    pinfo.setElementName(element.getQName());
+                else
+                    pinfo.setElementName(type.getName());
+                
                 pinfo.setAnyElement(type.isAnyElement());
     
                 // Let us be nice and uppercase the first character in type name, 
@@ -1552,6 +1559,9 @@
         String minfo_nm = minfo.getMethodname();
         String type_nm  = type.getLanguageSpecificName();
         
+        if (CUtils.isPrimitiveType(type_nm))
+            return type_nm;
+        
         String newName = CUtils.capitalizeFirstCharacter(type_nm);
 
         if (!minfo_nm.equals(newName))



Mime
View raw message