ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nadira...@apache.org
Subject svn commit: r399075 - in /webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c: ArrayParamHeaderWriter.java ParmHeaderFileWriter.java
Date Tue, 02 May 2006 22:59:22 GMT
Author: nadiramra
Date: Tue May  2 15:59:20 2006
New Revision: 399075

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

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

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ArrayParamHeaderWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ArrayParamHeaderWriter.java?rev=399075&r1=399074&r2=399075&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ArrayParamHeaderWriter.java
(original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ArrayParamHeaderWriter.java
Tue May  2 15:59:20 2006
@@ -120,11 +120,24 @@
     {
         try
         {
-            writer.write("typedef struct " + classname + "Tag {\n");
-            writer.write("\tstruct " + attribs[0].getTypeName()
-                        + "Tag ** m_Array;\n\tint m_Size;\n\tAXISC_XSDTYPE m_Type;\n} "
-                        + classname + ";\n");   
             writer.write("\n");
+            writer.write("/* ************************************************************
*/\n");
+            writer.write("/* --- Array type                                           ---
*/\n");
+            writer.write("/* ************************************************************
*/\n");
+            writer.write("\n");                
+            
+            writer.write("typedef struct " + classname + "Tag {\n"
+                       + "   struct " + attribs[0].getTypeName() + "Tag **   m_Array;\n"
+                       + "   int   m_Size;\n"
+                       + "   AXISC_XSDTYPE   m_Type;\n"
+                       + "} " + classname + ";\n"); 
+            
+            writer.write("\n");
+            writer.write("/* ************************************************************
*/\n");
+            writer.write("/* --- Functions to create/delete array type                ---
*/\n");
+            writer.write("/* ************************************************************
*/\n");
+            writer.write("\n");                
+
             this.writeConstructors();
             this.writeDestructors();
         }
@@ -138,12 +151,6 @@
     {
         try
         {
-            writer.write("\n");
-            writer.write("/* ************************************************************
*/\n");
-            writer.write("/* --- Function to create custom type                       ---
*/\n");
-            writer.write("/* ************************************************************
*/\n");
-            writer.write("\n");                
-
             this.writer.write("extern void* Axis_Create_" + classname + "(int nSize);\n");
         }
         catch (IOException e)

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParmHeaderFileWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParmHeaderFileWriter.java?rev=399075&r1=399074&r2=399075&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParmHeaderFileWriter.java
(original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParmHeaderFileWriter.java
Tue May  2 15:59:20 2006
@@ -73,12 +73,19 @@
             else
             {
                 writePreprocessorStatements();
+
                 this.writer.write("\n#ifdef __cplusplus\n extern \"C\" {\n#endif\n\n");
+
+                writer.write("\n");
+                writer.write("/* ************************************************************
*/\n");
+                writer.write("/* --- Custom type                                        
 --- */\n");
+                writer.write("/* ************************************************************
*/\n");
+                writer.write("\n");                
+                
                 this.writer.write("typedef struct " + classname + "Tag {\n");
-                this.writer.write("\n");
                 writeAttributes();
-                this.writer.write("\n");
                 this.writer.write("} " + classname + ";\n\n");
+                
                 writeFunctionPrototypes();
                 this.writer.write("\n#ifdef __cplusplus\n }\n#endif\n");
             }
@@ -234,7 +241,7 @@
         try
         {
             for (int i = 0; i < attribs.length; i++)
-            {
+            {  
                 attribs[i].setParamName( CUtils.sanitiseAttributeName( classname, attribs[i].getParamName()));
                 
                 if (isElementNillable(i) 
@@ -245,11 +252,10 @@
                     if(attribs[i].isAnyType())
                     {
                         anyCounter += 1;
-                        writer.write(
-                                  getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
-                                + " * " + attribs[i].getParamName()
-                                + Integer.toString(anyCounter)
-                                + ";\n");
+                        writer.write("\t"
+                                +  getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
+                                + " *  " + attribs[i].getParamName()
+                                + Integer.toString(anyCounter) + ";\n");
                     }
                     else if( attribs[i].isArray())
                     {
@@ -257,50 +263,45 @@
                         if (!paramName.endsWith("*"))
                             paramName += " *";
 
-                        writer.write(paramName + " " + attribs[i].getParamName() + ";\n");
+                        writer.write("\t" + paramName + "  " + attribs[i].getParamName()
+ ";\n");
                     }
                     else if(attribs[i].getChoiceElement() && !isElementNillable(i))
-                        writer.write(
-                               getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
-                             + " " + attribs[i].getParamName()
-                             + ";\n");
+                        writer.write("\t"
+                             + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
+                             + "  " + attribs[i].getParamName() + ";\n");
                     else
-                        writer.write(
-                                   getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
-                                 + " * " + attribs[i].getParamName()
-                                 + ";\n");
+                        writer.write("\t"
+                                 + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
+                                 + " *  " + attribs[i].getParamName() + ";\n");
                 } 
                 else if(attribs[i].getAllElement() || attribs[i].getChoiceElement() )
                 {
-                    writer.write(
-                               getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
-                             + " " + attribs[i].getParamName()
-                             + ";\n");
+                    writer.write("\t"
+                             + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
+                             + "  " + attribs[i].getParamName() + ";\n");
                 }
                 else if(attribs[i].isAnyType())
                 {
                     anyCounter += 1;
-                    writer.write(
-                              getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
-                            + " " + attribs[i].getParamName()
-                            + Integer.toString(anyCounter)
-                            + ";\n");
+                    writer.write("\t"
+                            + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
+                            + "  " + attribs[i].getParamName()
+                            + Integer.toString(anyCounter) + ";\n");
                 }                   
                 else
                 {
-                    writer.write(
-                                  getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
-                                + " " + attribs[i].getParamNameWithoutSymbols()
-                                + ";\n");
+                    writer.write("\t"
+                                + getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])
+                                + "  " + attribs[i].getParamNameWithoutSymbols() + ";\n");
                 }
             }
             
             if (extensionBaseAttrib != null &&
                 getCorrectParmNameConsideringArraysAndComplexTypes(extensionBaseAttrib) !=
null)
             {
-                writer.write(
-                               getCorrectParmNameConsideringArraysAndComplexTypes(extensionBaseAttrib)
-                             + " "
+                writer.write("\t"
+                             + getCorrectParmNameConsideringArraysAndComplexTypes(extensionBaseAttrib)
+                             + "  "
                              + extensionBaseAttrib.getParamNameWithoutSymbols() + ";\n");
             }            
         }
@@ -390,7 +391,7 @@
                 writer.write("\n");
                 writer.write("/* ************************************************************
*/\n");
                 writer.write("/* --- Functions to create/delete, serialize/deserialize  
 --- */\n");
-                writer.write("/* --- custom types                                       
 --- */\n");
+                writer.write("/* --- custom type                                        
 --- */\n");
                 writer.write("/* ************************************************************
*/\n");
                 writer.write("\n");                
             }



Mime
View raw message