axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamej...@apache.org
Subject svn commit: r350262 - in /webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/Combo_TTest: Type.cpp Type.hpp
Date Thu, 01 Dec 2005 15:23:24 GMT
Author: jamejose
Date: Thu Dec  1 07:23:09 2005
New Revision: 350262

URL: http://svn.apache.org/viewcvs?rev=350262&view=rev
Log:
Updating this Dynamic Test with recent changes in the code

Modified:
    webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/Combo_TTest/Type.cpp
    webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/Combo_TTest/Type.hpp

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/Combo_TTest/Type.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/Combo_TTest/Type.cpp?rev=350262&r1=350261&r2=350262&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/Combo_TTest/Type.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/Combo_TTest/Type.cpp Thu Dec
 1 07:23:09 2005
@@ -49,11 +49,27 @@
 		return AXIS_SUCCESS;
 	}
 
+	bool blnIsNewPrefix = false;
+	if (!bArray)
+	{
+		const AxisChar* sPrefix = pSZ->getNamespacePrefix(Axis_URI_Type, blnIsNewPrefix);
+		if (blnIsNewPrefix)
+		{
+			pSZ->serialize(" xmlns:", sPrefix, "=\"",
+				Axis_URI_Type, "\"", NULL );
+		}
+	}
 	/* first serialize attributes if any*/
 	pSZ->serialize( ">", 0);
 
 	/* then serialize elements if any*/
-	pSZ->serializeBasicArray(param->item, Axis_URI_Type,XSD_INT, "item");
+	pSZ->serializeBasicArray(param->item, NULL,XSD_INT, "item");
+
+	if (!bArray && blnIsNewPrefix)
+	{
+		pSZ->removeNamespacePrefix(Axis_URI_Type);
+	}
+
 	return AXIS_SUCCESS;
 }
 
@@ -62,15 +78,13 @@
  */
 int Axis_DeSerialize_Type(Type* param, IWrapperSoapDeSerializer* pIWSDZ)
 {
-	Axis_Array * array;
-
-	array = pIWSDZ->getBasicArray(XSD_INT, "item",0);
+	Axis_Array * array1 = pIWSDZ->getBasicArray(XSD_INT, "item",0);
 	if(param->item == NULL)
 	{
 		param->item = new xsd__int_Array();
 	}
-	param->item->clone( *array);
-	Axis::AxisDelete((void*) array, XSD_ARRAY);
+	param->item->clone( *array1);
+	Axis::AxisDelete((void*) array1, XSD_ARRAY);
 
 	return pIWSDZ->getStatus();
 }
@@ -82,7 +96,7 @@
 		{
 			Type* pNew = new Type[nSize];
 			size_t i = nSize/2;
-			for (int ii=0; ii<i; ++ii)
+			for (int ii = 0; ii < (int) i; ++ii)
 			{
 				pNew[ii] = pObj[ii];
 				pObj[ii].reset();
@@ -123,23 +137,28 @@
 
 Type::Type()
 {
-	item = NULL;
+	item = new xsd__int_Array();
 	reset();
 }
 
+Type::Type(Type & original)
+{
+	item = new xsd__int_Array(*original.item);
+}
+
 void Type::reset()
 {
 	/*do not allocate memory to any pointer members here
 	 because deserializer will allocate memory anyway. */
-	if ( item != NULL)
-	{
-		item->clear();
-	}
+	item->clear();
 }
 
 Type::~Type()
 {
 	/*delete any pointer and array members here*/
 	if (item!= NULL)
+	{
 		delete item;
+		item = NULL;
+	}
 }

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/Combo_TTest/Type.hpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/Combo_TTest/Type.hpp?rev=350262&r1=350261&r2=350262&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/Combo_TTest/Type.hpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/Combo_TTest/Type.hpp Thu Dec
 1 07:23:09 2005
@@ -32,12 +32,13 @@
 class STORAGE_CLASS_INFO Type
 {
 public:
-	xsd__int_Array * item;
+	class xsd__int_Array * item;
 
 	xsd__int_Array * getitem();
 	void setitem(xsd__int_Array * pInValue);
 
 	Type();
+	Type(Type & original);
 
 	void reset();
 	virtual ~Type();



Mime
View raw message