axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nadira...@apache.org
Subject svn commit: r395138 - /webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java
Date Wed, 19 Apr 2006 05:30:25 GMT
Author: nadiramra
Date: Tue Apr 18 22:30:23 2006
New Revision: 395138

URL: http://svn.apache.org/viewcvs?rev=395138&view=rev
Log:
C support fixes/enhancements.

Modified:
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java?rev=395138&r1=395137&r2=395138&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java
(original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java
Tue Apr 18 22:30:23 2006
@@ -721,7 +721,35 @@
         writer.write("\n");
         
         for (int i = 0; i < attribs.length; i++)
-            if (!(attribs[i].isSimpleType() || attribs[i].getType().isSimpleType()))
+        {
+            if (attribs[i].isSimpleType() || attribs[i].getType().isSimpleType())
+            {
+                // Probably want to do it for hexbinary and base64binary and ?
+                if (attribs[i].isArray())
+                {
+                    writeNewline = true;
+                    
+                    String passedInBaseType;
+                    String baseTypeName = null;
+                    
+                    if (!attribs[i].isSimpleType() && attribs[i].getType().isSimpleType())
+                        baseTypeName = CUtils.getclass4qname(attribs[i].getType().getBaseType());
+                    else
+                        baseTypeName = attribs[i].getTypeName();
+                    
+                    if (attribs[i].isArray())
+                    {
+                        passedInBaseType = "XSDC_ARRAY";
+                        baseTypeName += "_Array";
+                    }
+                    else
+                        passedInBaseType = CUtils.getXSDTypeForBasicType(baseTypeName);
+                                    
+                    writer.write("\tpTemp->" + attribs[i].getParamNameAsMember() 
+                            + " = (" + baseTypeName + "*)axiscAxisNew(" + passedInBaseType
+ ",0);\n");
+                }
+            }
+            else
             {
                 writeNewline = true;
                 
@@ -735,7 +763,8 @@
                     writer.write("\tpTemp->" + attribs[i].getParamName() + " = "
                             + "Axis_Create_" + attribs[i].getTypeName() + "(0,0,0);\n");
                  
                 }
-            }
+            }            
+        }
         
         if (writeNewline)
             writer.write("\n");



Mime
View raw message