ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nadira...@apache.org
Subject svn commit: r398776 - in /webservices/axis/trunk/c: include/axis/ src/common/ src/soap/ src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/ src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ src/wsdl/org/apache/axis/wsdl/w...
Date Tue, 02 May 2006 02:05:23 GMT
Author: nadiramra
Date: Mon May  1 19:05:19 2006
New Revision: 398776

URL: http://svn.apache.org/viewcvs?rev=398776&view=rev
Log:
Remove boolean from Axis_Delete_xxx since routine can determine if array is size 
is greater than 0.  In addition, add int to Axis_Create_xxxx in order for the 
ability to create arrays.  If value is greater than 0, then array of pointers to 
objects will be created.  Otherwise, singleton object will be created.

Modified:
    webservices/axis/trunk/c/include/axis/AxisWrapperAPI.hpp
    webservices/axis/trunk/c/src/common/ArrayBean.cpp
    webservices/axis/trunk/c/src/common/AxisTrace.h
    webservices/axis/trunk/c/src/common/Param.cpp
    webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp
    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/ArrayParamWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/BeanParamWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ClientStubWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ParmHeaderFileWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/WrapWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/WrapWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/WrapWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java
    webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/WrapWriter.java
    webservices/axis/trunk/c/tests/auto_build/testcases/client/c/AxisBenchClient.c
    webservices/axis/trunk/c/tests/auto_build/testcases/client/c/EnumerationClient.c
    webservices/axis/trunk/c/tests/auto_build/testcases/client/c/RecurseTypesClient.c
    webservices/axis/trunk/c/tests/auto_build/testcases/client/c/SimpleTypeArrayClient.c
    webservices/axis/trunk/c/tests/auto_build/testcases/client/c/SimpleTypeInnerUnboundedClient.c
    webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RecurseTypesClient.cpp

Modified: webservices/axis/trunk/c/include/axis/AxisWrapperAPI.hpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/include/axis/AxisWrapperAPI.hpp?rev=398776&r1=398775&r2=398776&view=diff
==============================================================================
--- webservices/axis/trunk/c/include/axis/AxisWrapperAPI.hpp (original)
+++ webservices/axis/trunk/c/include/axis/AxisWrapperAPI.hpp Mon May  1 19:05:19 2006
@@ -42,17 +42,20 @@
 
 /**
  * @fn AXIS_OBJECT_CREATE_FUNCT
- * Function used to create a custom type. bArray is true if array of 
- * objects to be created. Then nSize is the size of that array.
+ * Function used to create a custom type. If nSize is 0, a singleton object
+ * is created; if nSize is greater than 0, a c-type array of nSize pointers to 
+ * objects are created and returned.
  */
-typedef void* (* AXIS_OBJECT_CREATE_FUNCT)();
+typedef void* (* AXIS_OBJECT_CREATE_FUNCT)(int nSize);
 
 /**
  * @fn AXIS_OBJECT_DELETE_FUNCT
- * Function used to delete a custom type. bArray is true if void* is a 
- * pointer to an array. Then nSize is the size of that array.
+ * Function used to delete a custom type. If nSize is 0, void * points to 
+ * a singleton object; if nSize is greater than 0, then void* points to 
+ * a c-type array of nSize pointers to objects that are to be deleted. 
+ * The function will also delete the c-type array.
  */
-typedef void (* AXIS_OBJECT_DELETE_FUNCT)(void*, bool bArray, int nSize);
+typedef void (* AXIS_OBJECT_DELETE_FUNCT)(void*, int nSize);
 
 /**
  * @fn AXIS_SERIALIZE_FUNCT

Modified: webservices/axis/trunk/c/src/common/ArrayBean.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/common/ArrayBean.cpp?rev=398776&r1=398775&r2=398776&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/common/ArrayBean.cpp (original)
+++ webservices/axis/trunk/c/src/common/ArrayBean.cpp Mon May  1 19:05:19 2006
@@ -46,8 +46,8 @@
             {
                 if (AxisEngine::m_bServer)
                 {
-					TRACE_OBJECT_DELETE_FUNCT_ENTRY(m_value.cta->pDelFunct, m_value.cta->pObject,
true, m_nSize);
-                    m_value.cta->pDelFunct(m_value.cta->pObject, true, m_nSize);
+					TRACE_OBJECT_DELETE_FUNCT_ENTRY(m_value.cta->pDelFunct, m_value.cta->pObject,
 m_nSize);
+                    m_value.cta->pDelFunct(m_value.cta->pObject, m_nSize);
 					TRACE_OBJECT_DELETE_FUNCT_EXIT(m_value.cta->pDelFunct);
                 }
                 // make sure that the ComplexObjectHandler's destructor does 

Modified: webservices/axis/trunk/c/src/common/AxisTrace.h
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/common/AxisTrace.h?rev=398776&r1=398775&r2=398776&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/common/AxisTrace.h (original)
+++ webservices/axis/trunk/c/src/common/AxisTrace.h Mon May  1 19:05:19 2006
@@ -296,12 +296,14 @@
 };
 
 #ifdef ENABLE_AXISTRACE
-#define TRACE_OBJECT_CREATE_FUNCT_ENTRY(funct) \
+#define TRACE_OBJECT_CREATE_FUNCT_ENTRY(funct, size) \
 { \
 	if (axiscpp::AxisTrace::isTraceOn()) \
 	{ \
-		axiscpp::AxisTrace::traceEntry(NULL, "AXIS_OBJECT_CREATE_FUNCT", (void*)(funct), 0); \
-	} \
+        int traceSize = size; \
+		axiscpp::AxisTrace::traceEntry(NULL, "AXIS_OBJECT_CREATE_FUNCT", (void*)(funct), 1, \
+            TRACETYPE_INT, 1, (void*)&traceSize); \
+    } \
 }
 
 #define TRACE_OBJECT_CREATE_FUNCT_EXIT(funct, arr) \
@@ -326,16 +328,14 @@
 			TRACETYPE_INT, 1, (void*)&(size)); \
 }
 
-#define TRACE_OBJECT_DELETE_FUNCT_ENTRY(funct, arr, bArr, size) \
+#define TRACE_OBJECT_DELETE_FUNCT_ENTRY(funct, arr, size) \
 { \
 	if (axiscpp::AxisTrace::isTraceOn()) \
 	{ \
 		void *traceArr = arr; \
-		bool traceBArr = bArr; \
 		int traceSize = size; \
-		axiscpp::AxisTrace::traceEntry(NULL, "AXIS_OBJECT_DELETE_FUNCT", (void*)(funct), 3, \
+		axiscpp::AxisTrace::traceEntry(NULL, "AXIS_OBJECT_DELETE_FUNCT", (void*)(funct), 2, \
 			TRACETYPE_POINTER, 1, (void*)&traceArr, \
-			TRACETYPE_BOOL, 0, (void*)&traceBArr, \
 			TRACETYPE_INT, 0, (void*)&traceSize); \
 	} \
 }
@@ -387,11 +387,11 @@
 }
 
 #else
-#define TRACE_OBJECT_CREATE_FUNCT_ENTRY(funct)
+#define TRACE_OBJECT_CREATE_FUNCT_ENTRY(funct, size)
 #define TRACE_OBJECT_CREATE_FUNCT_EXIT(funct, arr)
 #define TRACE_OBJECT_SIZE_FUNCT_ENTRY(funct)
 #define TRACE_OBJECT_SIZE_FUNCT_EXIT(funct, size)
-#define TRACE_OBJECT_DELETE_FUNCT_ENTRY(funct, arr, bArr, size)
+#define TRACE_OBJECT_DELETE_FUNCT_ENTRY(funct, arr, size)
 #define TRACE_OBJECT_DELETE_FUNCT_EXIT(funct)
 #define TRACE_DESERIALIZE_FUNCT_ENTRY(funct, item, that)
 #define TRACE_DESERIALIZE_FUNCT_EXIT(funct, status)

Modified: webservices/axis/trunk/c/src/common/Param.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/common/Param.cpp?rev=398776&r1=398775&r2=398776&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/common/Param.cpp (original)
+++ webservices/axis/trunk/c/src/common/Param.cpp Mon May  1 19:05:19 2006
@@ -273,8 +273,8 @@
     {
         if (pObject && pDelFunct)
         {
-            TRACE_OBJECT_DELETE_FUNCT_ENTRY(pDelFunct, pObject, false, 0);
-            pDelFunct(pObject, false, 0);
+            TRACE_OBJECT_DELETE_FUNCT_ENTRY(pDelFunct, pObject, 0);
+            pDelFunct(pObject, 0);
             TRACE_OBJECT_DELETE_FUNCT_EXIT(pDelFunct);
         }
     }

Modified: webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp?rev=398776&r1=398775&r2=398776&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp (original)
+++ webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp Mon May  1 19:05:19 2006
@@ -781,8 +781,8 @@
         if (!m_pNode)
             return NULL;
         /* type  can be checked here */
-        TRACE_OBJECT_CREATE_FUNCT_ENTRY(pCreFunct);
-        void *pObject = ((AXIS_OBJECT_CREATE_FUNCT) pCreFunct) ();
+        TRACE_OBJECT_CREATE_FUNCT_ENTRY(pCreFunct, 0);
+        void *pObject = ((AXIS_OBJECT_CREATE_FUNCT) pCreFunct) (0);
         TRACE_OBJECT_CREATE_FUNCT_EXIT(pCreFunct, pObject);
         if (pObject && pDZFunct)
         {
@@ -808,8 +808,8 @@
             }
             else
             {
-                TRACE_OBJECT_DELETE_FUNCT_ENTRY(pDelFunct, pObject, false, 0);
-                ((AXIS_OBJECT_DELETE_FUNCT) pDelFunct) (pObject, false, 0);
+                TRACE_OBJECT_DELETE_FUNCT_ENTRY(pDelFunct, pObject, 0);
+                ((AXIS_OBJECT_DELETE_FUNCT) pDelFunct) (pObject, 0);
                 TRACE_OBJECT_DELETE_FUNCT_EXIT(pDelFunct);
             }
         }
@@ -853,8 +853,8 @@
             
             m_pNode = NULL;    /* node identified and used */
     
-            TRACE_OBJECT_CREATE_FUNCT_ENTRY(pCreFunct);
-            void *pObject = ((AXIS_OBJECT_CREATE_FUNCT) pCreFunct)();
+            TRACE_OBJECT_CREATE_FUNCT_ENTRY(pCreFunct, 0);
+            void *pObject = ((AXIS_OBJECT_CREATE_FUNCT) pCreFunct)(0);
             TRACE_OBJECT_CREATE_FUNCT_EXIT(pCreFunct, pObject);
     
             if (pObject && pDZFunct)
@@ -870,8 +870,8 @@
                 }
                 else
                 {
-                    TRACE_OBJECT_DELETE_FUNCT_ENTRY(pDelFunct, pObject, false, 0);
-                    ((AXIS_OBJECT_DELETE_FUNCT) pDelFunct) (pObject, false, 0);
+                    TRACE_OBJECT_DELETE_FUNCT_ENTRY(pDelFunct, pObject, 0);
+                    ((AXIS_OBJECT_DELETE_FUNCT) pDelFunct) (pObject, 0);
                     TRACE_OBJECT_DELETE_FUNCT_EXIT(pDelFunct);
                 }
             }
@@ -946,8 +946,8 @@
     if (RPC_ENCODED == m_nStyle)
     {
         /* type  can be checked here */
-        TRACE_OBJECT_CREATE_FUNCT_ENTRY(pCreFunct);
-        void *pObject = ((AXIS_OBJECT_CREATE_FUNCT) pCreFunct) ();
+        TRACE_OBJECT_CREATE_FUNCT_ENTRY(pCreFunct,0);
+        void *pObject = ((AXIS_OBJECT_CREATE_FUNCT) pCreFunct) (0);
         TRACE_OBJECT_CREATE_FUNCT_EXIT(pCreFunct, pObject);
     
         if (pObject && pDZFunct)
@@ -974,8 +974,8 @@
             }
             else
             {
-                TRACE_OBJECT_DELETE_FUNCT_ENTRY(pDelFunct, pObject, false, 0);
-                ((AXIS_OBJECT_DELETE_FUNCT) pDelFunct) (pObject, false, 0);
+                TRACE_OBJECT_DELETE_FUNCT_ENTRY(pDelFunct, pObject, 0);
+                ((AXIS_OBJECT_DELETE_FUNCT) pDelFunct) (pObject, 0);
                 TRACE_OBJECT_DELETE_FUNCT_EXIT(pDelFunct);
             }
         }
@@ -1004,8 +1004,8 @@
         }
         m_pNode = NULL;    /* node identified and used */
 
-        TRACE_OBJECT_CREATE_FUNCT_ENTRY(pCreFunct);
-        void *pObject = ((AXIS_OBJECT_CREATE_FUNCT) pCreFunct)();
+        TRACE_OBJECT_CREATE_FUNCT_ENTRY(pCreFunct,0);
+        void *pObject = ((AXIS_OBJECT_CREATE_FUNCT) pCreFunct)(0);
         TRACE_OBJECT_CREATE_FUNCT_EXIT(pCreFunct, pObject);
 
         if (pObject && pDZFunct)
@@ -1021,8 +1021,8 @@
             }
             else
             {
-                TRACE_OBJECT_DELETE_FUNCT_ENTRY(pDelFunct, pObject, false, 0);
-                ((AXIS_OBJECT_DELETE_FUNCT) pDelFunct) (pObject, false, 0);
+                TRACE_OBJECT_DELETE_FUNCT_ENTRY(pDelFunct, pObject, 0);
+                ((AXIS_OBJECT_DELETE_FUNCT) pDelFunct) (pObject, 0);
                 TRACE_OBJECT_DELETE_FUNCT_EXIT(pDelFunct);
             }
         }

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=398776&r1=398775&r2=398776&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
Mon May  1 19:05:19 2006
@@ -138,7 +138,7 @@
     {
         try
         {
-            this.writer.write("extern void* Axis_Create_" + classname + "(void);\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/ArrayParamWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ArrayParamWriter.java?rev=398776&r1=398775&r2=398776&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ArrayParamWriter.java
(original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ArrayParamWriter.java
Mon May  1 19:05:19 2006
@@ -141,7 +141,7 @@
     {
         try
         {
-            writer.write("extern void* Axis_Create_" + classname + "(void)\n");
+            writer.write("extern void* Axis_Create_" + classname + "(int nSize)\n");
             writer.write("{\n");
             
             // Begin function body
@@ -183,7 +183,7 @@
             writer.write("\t/* Reclaim memory resources of array elements, if it exists */\n");
             writer.write("\tif (param->m_Array && param->m_Size > 0)\n");
             writer.write("\t\tAxis_Delete_" +  attribs[0].getTypeName() 
-                    + "((" + attribs[0].getTypeName() + " *)param->m_Array, 1, param->m_Size);\n");
+                    + "((" + attribs[0].getTypeName() + " *)param->m_Array, param->m_Size);\n");
             writer.write("\n");
             
             writer.write("\t/* Reclaim array data type memory resources */\n");

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=398776&r1=398775&r2=398776&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
Mon May  1 19:05:19 2006
@@ -714,7 +714,7 @@
         writer.write(" * This static method to allocate a " + classname + " type of object\n");
         writer.write(" */\n");
         
-        writer.write("void* Axis_Create_" + classname + "(void)\n{\n");
+        writer.write("void* Axis_Create_" + classname + "(int nSize)\n{\n");
         
         writer.write("\t" + classname + "* pTemp = (" + classname + " *)malloc(sizeof(" +
classname + "));\n");
         writer.write("\tmemset(pTemp, 0, sizeof(" + classname + "));\n");
@@ -756,12 +756,12 @@
                 if (attribs[i].isArray())
                 {
                     writer.write("\tpTemp->" + attribs[i].getParamName() + " = "
-                            + "Axis_Create_" + attribs[i].getTypeName() + "_Array();\n");
+                            + "Axis_Create_" + attribs[i].getTypeName() + "_Array(0);\n");
                 }
                 else
                 {
                     writer.write("\tpTemp->" + attribs[i].getParamName() + " = "
-                            + "Axis_Create_" + attribs[i].getTypeName() + "();\n");     
             
+                            + "Axis_Create_" + attribs[i].getTypeName() + "(0);\n");    
              
                 }
             }            
         }
@@ -782,7 +782,7 @@
         writer.write(" */\n");
 
         writer.write("void Axis_Delete_" + classname
-                + "(" + classname + "* param, AxiscBool bArray, int nSize)\n");
+                + "(" + classname + "* param, int nSize)\n");
         
         writer.write("{\n");
         writer.write("\t/* If NULL, just return */\n");
@@ -791,19 +791,16 @@
         writer.write("\n");
         
         writer.write("\t/* Reclaim memory resources (recursion is used to reclaim arrays)
*/\n");
-        writer.write("\tif (bArray)\n");
+        writer.write("\tif (nSize > 0)\n");
         writer.write("\t{\n");
-        writer.write("\t\tif (nSize > 0)\n");
+        writer.write("\t\tint count;\n");
+        writer.write("\t\t" + classname + " **paramArray = (" + classname + " **)param;\n");
+        writer.write("\t\tfor (count = 0 ; count < nSize ; count++ )\n");
         writer.write("\t\t{\n");
-        writer.write("\t\t\tint count;\n");
-        writer.write("\t\t\t" + classname + " **paramArray = (" + classname + " **)param;\n");
-        writer.write("\t\t\tfor (count = 0 ; count < nSize ; count++ )\n");
+        writer.write("\t\t\tif (paramArray[count])\n");
         writer.write("\t\t\t{\n");
-        writer.write("\t\t\t\tif (paramArray[count])\n");
-        writer.write("\t\t\t\t{\n");
-        writer.write("\t\t\t\t\tAxis_Delete_" + classname + "(paramArray[count],0,0);\n");
-        writer.write("\t\t\t\t\tparamArray[count] = NULL;\n");
-        writer.write("\t\t\t\t}\n");
+        writer.write("\t\t\t\tAxis_Delete_" + classname + "(paramArray[count],0);\n");
+        writer.write("\t\t\t\tparamArray[count] = NULL;\n");
         writer.write("\t\t\t}\n");
         writer.write("\t\t}\n");
         writer.write("\t}\n");

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ClientStubWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ClientStubWriter.java?rev=398776&r1=398775&r2=398776&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ClientStubWriter.java
(original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/ClientStubWriter.java
Mon May  1 19:05:19 2006
@@ -620,9 +620,9 @@
                 typeName = itr.next().toString();
                 writer.write("extern int Axis_DeSerialize_" + typeName
                         + "(" + typeName  + "* param, IWrapperSoapDeSerializer* pDZ);\n");
-                writer.write("extern void* Axis_Create_" + typeName + "(void);\n");
+                writer.write("extern void* Axis_Create_" + typeName + "(int nSize);\n");
                 writer.write("extern void Axis_Delete_" + typeName + "("
-                        + typeName + "* param, bool bArray, int nSize);\n");
+                        + typeName + "* param, int nSize);\n");
                 writer.write("extern int Axis_Serialize_" + typeName + "("
                         + typeName + "* param, IWrapperSoapSerializer* pSZ, bool bArray);\n");
                 writer.write("extern int Axis_GetSize_" + typeName + "(void);\n\n");

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=398776&r1=398775&r2=398776&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
Mon May  1 19:05:19 2006
@@ -389,9 +389,9 @@
                 typeName = itr.next().toString();
                 this.writer.write("extern int Axis_DeSerialize_" + typeName
                              + "(" + typeName + "* param, AXISCHANDLE pDZ);\n");
-                this.writer.write("extern void* Axis_Create_" + typeName + "(void);\n");
+                this.writer.write("extern void* Axis_Create_" + typeName + "(int nSize);\n");
                 this.writer.write("extern void Axis_Delete_" + typeName
-                             + "(" + typeName + "* param, AxiscBool bArray, int nSize);\n");
+                             + "(" + typeName + "* param, int nSize);\n");
                 this.writer.write("extern int Axis_Serialize_" + typeName
                              + "(" + typeName + "* param, AXISCHANDLE pSZ, AxiscBool bArray);\n");
                 this.writer.write("extern int Axis_GetSize_" + typeName + "(void);\n\n");

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/WrapWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/WrapWriter.java?rev=398776&r1=398775&r2=398776&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/WrapWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/WrapWriter.java Mon May
 1 19:05:19 2006
@@ -707,13 +707,13 @@
                         + typeName
                         + "* param, IWrapperSoapDeSerializer* pDZ);\n");
                 writer.write(
-                    "extern void* Axis_Create_" + typeName + "(void);\n");
+                    "extern void* Axis_Create_" + typeName + "(int nSize);\n");
                 writer.write(
                     "extern void Axis_Delete_"
                         + typeName
                         + "("
                         + typeName
-                        + "* param, bool bArray, int nSize);\n");
+                        + "* param, int nSize);\n");
                 writer.write(
                     "extern int Axis_Serialize_"
                         + typeName

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/WrapWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/WrapWriter.java?rev=398776&r1=398775&r2=398776&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/WrapWriter.java
(original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/WrapWriter.java
Mon May  1 19:05:19 2006
@@ -556,10 +556,10 @@
                     "extern int Axis_DeSerialize_" + typeName
                         + "(" + typeName + "* param, IWrapperSoapDeSerializer* pDZ);\n");
                 writer.write(
-                    "extern void* Axis_Create_" + typeName + "(void);\n");
+                    "extern void* Axis_Create_" + typeName + "(int nSize);\n");
                 writer.write(
                     "extern void Axis_Delete_" + typeName
-                        + "(" + typeName + "* param, bool bArray, int nSize);\n");
+                        + "(" + typeName + "* param, int nSize);\n");
                 writer.write(
                     "extern int Axis_Serialize_" + typeName
                         + "(" + typeName + "* param, IWrapperSoapSerializer* pSZ, bool bArray);\n");

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java?rev=398776&r1=398775&r2=398776&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java
(original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/BeanParamWriter.java
Mon May  1 19:05:19 2006
@@ -83,9 +83,9 @@
                 {
                     writer.write("extern int Axis_DeSerialize_" + typeName
                             + "(" + typeName + "* param, IWrapperSoapDeSerializer* pDZ);\n");
-                    writer.write("extern void* Axis_Create_" + typeName + "();\n");
+                    writer.write("extern void* Axis_Create_" + typeName + "(int nSize);\n");
                     writer.write("extern void Axis_Delete_" + typeName + "("
-                            + typeName + "* param, bool bArray = false, int nSize=0);\n");
+                            + typeName + "* param, int nSize=0);\n");
                     writer.write("extern int Axis_Serialize_" + typeName + "("
                             + typeName + "* param, IWrapperSoapSerializer* pSZ, bool bArray
= false);\n");
                     writer.write("extern int Axis_GetSize_" + typeName + "();\n\n");
@@ -94,9 +94,9 @@
                 {
                     writer.write("int Axis_DeSerialize_" + typeName + "("
                             + typeName + "* param, IWrapperSoapDeSerializer* pDZ);\n");
-                    writer.write("void* Axis_Create_" + typeName + "();\n");
+                    writer.write("void* Axis_Create_" + typeName + "(int nSize);\n");
                     writer.write("void Axis_Delete_" + typeName + "("
-                            + typeName + "* param, bool bArray, int nSize);\n");
+                            + typeName + "* param, int nSize);\n");
                     writer.write("int Axis_Serialize_" + typeName
                                     + "(" + typeName
                                     + "* param, IWrapperSoapSerializer* pSZ, bool bArray);\n");
@@ -1109,9 +1109,17 @@
 
     private void writeCreateGlobalMethod() throws IOException
     {
-        writer.write("void* Axis_Create_" + classname + "()\n");
+        writer.write("void* Axis_Create_" + classname + "(int nSize)\n");
         writer.write("{\n");
-        writer.write("\treturn new " + classname + ";\n");
+        writer.write("\tif (nSize > 0)\n");
+        writer.write("\t{\n");
+        writer.write("\t\t" + classname + "** pNew = new " + classname + "* [nSize];\n");
+        writer.write("\t\tfor (int i=0; i < nSize; ++i)\n");
+        writer.write("\t\t\tpNew[i] = new " + classname + ";\n");
+        writer.write("\t\treturn pNew;\n");
+        writer.write("\t}\n");
+        writer.write("\telse\n");
+        writer.write("\t\treturn new " + classname + ";\n");
         writer.write("}\n");
         writer.write("\n");
     }
@@ -1121,23 +1129,25 @@
         writer.write("/*\n");
         writer.write(" * This static method delete a " + classname + " type of object\n");
         writer.write(" */\n");
-        writer.write("void Axis_Delete_" + classname + "(" + classname
-                + "* param, bool bArray = false, int nSize=0)\n");
+        writer.write("void Axis_Delete_" + classname + "(" + classname + "* param, int nSize=0)\n");
         writer.write("{\n");
-        writer.write("\t/* If array, only objects in array are reclaimed, not array */\n");
-        writer.write("\tif (bArray)\n");
+        
+        writer.write("\t/* If null just return */\n");
+        writer.write("\tif (!param)\n");
+        writer.write("\t\treturn;\n\n");
+        
+        writer.write("\t/* Reclaim array objects if array */\n");
+        writer.write("\tif (nSize > 0)\n");
         writer.write("\t{\n");
-        writer.write("\t\tif (nSize > 0)\n");
+        writer.write("\t\tfor (int count = 0 ; count < nSize ; count++ )\n");
         writer.write("\t\t{\n");
-        writer.write("\t\t\tfor (int count = 0 ; count < nSize ; count++ )\n");
+        writer.write("\t\t\tif ( (( " + classname + " ** ) param)[count])\n");
         writer.write("\t\t\t{\n");
-        writer.write("\t\t\t\tif ( (( " + classname + " ** ) param)[count])\n");
-        writer.write("\t\t\t\t{\n");
-        writer.write("\t\t\t\t\tdelete (( " + classname + " ** ) param)[count];\n");
-        writer.write("\t\t\t\t\t(( " + classname + " ** ) param)[count] = NULL;\n");
-        writer.write("\t\t\t\t}\n");
+        writer.write("\t\t\t\tdelete (( " + classname + " ** ) param)[count];\n");
+        writer.write("\t\t\t\t(( " + classname + " ** ) param)[count] = NULL;\n");
         writer.write("\t\t\t}\n");
         writer.write("\t\t}\n");
+        writer.write("\t\tdelete [] ( " + classname + " ** ) param;\n");
         writer.write("\t}\n");
         writer.write("\telse\n");
         writer.write("\t\tdelete param;\n");

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubWriter.java?rev=398776&r1=398775&r2=398776&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubWriter.java
(original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubWriter.java
Mon May  1 19:05:19 2006
@@ -964,9 +964,9 @@
                 typeName = itr.next().toString();
                 writer.write("extern int Axis_DeSerialize_" + typeName + "("
                         + typeName + "* param, IWrapperSoapDeSerializer* pDZ);\n");
-                writer.write("extern void* Axis_Create_" + typeName + "();\n");
+                writer.write("extern void* Axis_Create_" + typeName + "(int nSize);\n");
                 writer.write("extern void Axis_Delete_" + typeName + "("
-                        + typeName  + "* param, bool bArray = false, int nSize=0);\n");
+                        + typeName  + "* param, int nSize=0);\n");
                 writer.write("extern int Axis_Serialize_" + typeName
                                 + "(" + typeName
                                 + "* param, IWrapperSoapSerializer* pSZ, bool bArray = false);\n");

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/WrapWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/WrapWriter.java?rev=398776&r1=398775&r2=398776&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/WrapWriter.java (original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/WrapWriter.java Mon
May  1 19:05:19 2006
@@ -900,9 +900,9 @@
                 typeName = itr.next().toString();
                 writer.write("extern int Axis_DeSerialize_" + typeName
                         + "(" + typeName + "* param, IWrapperSoapDeSerializer* pDZ);\n");
-                writer.write("extern void* Axis_Create_" + typeName + "();\n");
+                writer.write("extern void* Axis_Create_" + typeName + "(int nSize);\n");
                 writer.write("extern void Axis_Delete_" + typeName
-                        + "(" + typeName + "* param, bool bArray = false, int nSize=0);\n");
+                        + "(" + typeName + "* param, int nSize=0);\n");
                 writer.write("extern int Axis_Serialize_" + typeName
                         + "(" + typeName + "* param, IWrapperSoapSerializer* pSZ, bool bArray
= false);\n");
                 writer.write("extern int Axis_GetSize_" + typeName + "();\n\n");

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java?rev=398776&r1=398775&r2=398776&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java
(original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java
Mon May  1 19:05:19 2006
@@ -1145,9 +1145,9 @@
                 typeName = itr.next ().toString ();
                 writer.write ("extern int Axis_DeSerialize_" + typeName
                           + "(" + typeName + "* param, IWrapperSoapDeSerializer* pDZ);\n");
-                writer.write ("extern void* Axis_Create_" + typeName + "();\n");
+                writer.write ("extern void* Axis_Create_" + typeName + "(int nSize);\n");
                 writer.write ("extern void Axis_Delete_" + typeName + "(" +
-                          typeName + "* param, bool bArray = false, int nSize=0);\n");
+                          typeName + "* param, int nSize=0);\n");
                 writer.write ("extern int Axis_Serialize_" + typeName + "(" +
                           typeName + "* param, IWrapperSoapSerializer* pSZ, bool bArray =
false);\n");
                 writer.write ("extern int Axis_GetSize_" + typeName + "();\n\n");

Modified: webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/WrapWriter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/WrapWriter.java?rev=398776&r1=398775&r2=398776&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/WrapWriter.java
(original)
+++ webservices/axis/trunk/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/WrapWriter.java
Mon May  1 19:05:19 2006
@@ -697,9 +697,9 @@
                 typeName = itr.next().toString();
                 writer.write("extern int Axis_DeSerialize_" + typeName + "("
                         + typeName + "* param, IWrapperSoapDeSerializer* pDZ);\n");
-                writer.write("extern void* Axis_Create_" + typeName + "();\n");
+                writer.write("extern void* Axis_Create_" + typeName + "(int nSize);\n");
                 writer.write("extern void Axis_Delete_" + typeName + "("
-                        + typeName + "* param, bool bArray = false, int nSize=0);\n");
+                        + typeName + "* param, int nSize=0);\n");
                 writer.write("extern int Axis_Serialize_" + typeName + "("
                         + typeName + "* param, IWrapperSoapSerializer* pSZ, bool bArray =
false);\n");
                 writer.write("extern int Axis_GetSize_" + typeName + "();\n\n");

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/c/AxisBenchClient.c
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/c/AxisBenchClient.c?rev=398776&r1=398775&r2=398776&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/c/AxisBenchClient.c (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/c/AxisBenchClient.c Mon May
 1 19:05:19 2006
@@ -60,7 +60,7 @@
 
     ppBBDT = (BenchBasicDataType **)malloc(sizeof(BenchBasicDataType *) * 100);
 
-    input = Axis_Create_BenchDataType();
+    input = Axis_Create_BenchDataType(0);
     input->count = 100;
 
     ll = 10000;
@@ -75,7 +75,7 @@
 
     for( i = 0; i < input->count ; i++)
     {
-        BenchBasicDataType *type = Axis_Create_BenchBasicDataType();
+        BenchBasicDataType *type = Axis_Create_BenchBasicDataType(0);
 
         type->StringType = "StringType";
         type->IntegerType = 10 * (i + 1);
@@ -116,7 +116,7 @@
     {
         if (output)
         {
-            Axis_Delete_BenchDataType(output,0,0);
+            Axis_Delete_BenchDataType(output,0);
             output = NULL;
         }
 
@@ -136,7 +136,7 @@
         ppBBDT[i]->Base64BinaryType.__ptr=NULL;
         ppBBDT[i]->HexBinary.__ptr=NULL;
 
-        Axis_Delete_BenchBasicDataType(ppBBDT[i],0,0);
+        Axis_Delete_BenchBasicDataType(ppBBDT[i],0);
     }
 
     if (ppBBDT)
@@ -200,8 +200,8 @@
         }
     }
 
-    Axis_Delete_BenchDataType (input,0,0);
-    Axis_Delete_BenchDataType (output,0,0);
+    Axis_Delete_BenchDataType (input,0);
+    Axis_Delete_BenchDataType (output,0);
 
     printf( "---------------------- TEST COMPLETE -----------------------------\n" );
 

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/c/EnumerationClient.c
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/c/EnumerationClient.c?rev=398776&r1=398775&r2=398776&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/c/EnumerationClient.c (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/c/EnumerationClient.c Mon May
 1 19:05:19 2006
@@ -42,7 +42,7 @@
 
     ws = get_EnumerationWS_stub(endpoint);
 
-    input = (Type1*)Axis_Create_Type1();
+    input = (Type1*)Axis_Create_Type1(0);
 
     NEWCOPY(input->enum_string,"one");
     NEWCOPY(input->att_enum_string,"one");
@@ -68,8 +68,8 @@
         returnValue = 0; /* Success */
     }
 
-    Axis_Delete_Type1(input,0,0);
-    Axis_Delete_Type1(result,0,0);
+    Axis_Delete_Type1(input,0);
+    Axis_Delete_Type1(result,0);
 
     destroy_EnumerationWS_stub(ws);
 

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/c/RecurseTypesClient.c
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/c/RecurseTypesClient.c?rev=398776&r1=398775&r2=398776&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/c/RecurseTypesClient.c (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/c/RecurseTypesClient.c Mon
May  1 19:05:19 2006
@@ -41,7 +41,7 @@
 
     ws = get_RecurseTypesWS_stub(endpoint);
 
-    input = (Type1 *)Axis_Create_Type1();
+    input = (Type1 *)Axis_Create_Type1(0);
     input->att_kind = axiscAxisNew(XSDC_STRING,strlen(Kind_CHEQUE) + 1);
     strcpy(input->att_kind, Kind_CHEQUE);
     input->kind = axiscAxisNew(XSDC_STRING,strlen("Check In") + 1);
@@ -52,7 +52,7 @@
 
     for ( i = 0; i < 10; i++ )
     {
-        array[i]=Axis_Create_Type1();
+        array[i]=Axis_Create_Type1(0);
         array[i]->kind = axiscAxisNew(XSDC_STRING,strlen("Sample") + 1);
         strcpy(array[i]->kind, "Sample");
         array[i]->index = 0;
@@ -79,7 +79,7 @@
         for ( i = 0; i < outputSize; i++ )
             printf("\tKind [%d] = %s\n", i, outArray[i]->kind);
 
-        Axis_Delete_Type1((Type1 *)array, 1, 10);
+        Axis_Delete_Type1((Type1 *)array, 10);
 
         /* TODO need to free resources */
 

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/c/SimpleTypeArrayClient.c
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/c/SimpleTypeArrayClient.c?rev=398776&r1=398775&r2=398776&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/c/SimpleTypeArrayClient.c (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/c/SimpleTypeArrayClient.c Mon
May  1 19:05:19 2006
@@ -48,7 +48,7 @@
     array_input.m_Size  = 100;
     array_input.m_Type  = XSDC_INT;
 
-    input = Axis_Create_Type();
+    input = Axis_Create_Type(0);
     input->item = &array_input;
 
     ws = get_SimpleTypeArrayWS_stub(endpoint);
@@ -67,8 +67,8 @@
 
     input->item = NULL;
 
-    Axis_Delete_Type(input,0,0);
-    Axis_Delete_Type(output,0,0);
+    Axis_Delete_Type(input,0);
+    Axis_Delete_Type(output,0);
 
     destroy_SimpleTypeArrayWS_stub(ws);
 

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/c/SimpleTypeInnerUnboundedClient.c
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/c/SimpleTypeInnerUnboundedClient.c?rev=398776&r1=398775&r2=398776&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/c/SimpleTypeInnerUnboundedClient.c
(original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/c/SimpleTypeInnerUnboundedClient.c
Mon May  1 19:05:19 2006
@@ -47,7 +47,7 @@
 
     ws = get_SimpleTypeInnerUnboundedWS_stub(endpoint);
 
-    input =  (Type1*)Axis_Create_Type1();
+    input =  (Type1*)Axis_Create_Type1(0);
 
     input->enum_int=axiscAxisNew(XSDC_INT, 0);
     *input->enum_int = ENUMTYPEINT_1;

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RecurseTypesClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RecurseTypesClient.cpp?rev=398776&r1=398775&r2=398776&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RecurseTypesClient.cpp
(original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RecurseTypesClient.cpp
Mon May  1 19:05:19 2006
@@ -37,8 +37,6 @@
 void shift_args(int i, int *argc, char *argv[]);
 void setLogOptions(const char *output_filename);
 
-extern void* Axis_Create_Type1(Type1 *Obj, bool bArray = false, int nSize=0);
-
 int main(int argc, char* argv[])
 { 
   RecurseTypesWS *ws;



Mime
View raw message