axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From di...@apache.org
Subject cvs commit: ws-axis/c/tests/auto_build/testcases/client/cpp InOutClient.cpp NestedArraysClient.cpp NestedComplexClient.cpp PrimitiveAndArrayClient.cpp SimpleArrayDocClient.cpp SimpleArrayDoc_TTestClient.cpp SimpleArraysClient.cpp SimpleTypeArrayClient.cpp SimpleTypeArray_TTestClient.cpp
Date Tue, 22 Mar 2005 19:19:04 GMT
dicka       2005/03/22 11:19:04

  Modified:    c/include/axis AxisUserAPI.h AxisUserAPI.hpp
               c/src/common ArrayBean.cpp
               c/src/soap SoapDeSerializer.cpp
               c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal
                        BeanParamWriter.java
               c/tests/auto_build/testcases/client/cpp InOutClient.cpp
                        NestedArraysClient.cpp NestedComplexClient.cpp
                        PrimitiveAndArrayClient.cpp
                        SimpleArrayDocClient.cpp
                        SimpleArrayDoc_TTestClient.cpp
                        SimpleArraysClient.cpp SimpleTypeArrayClient.cpp
                        SimpleTypeArray_TTestClient.cpp
  Log:
  Provide support for arrays of nillable simple types.  Modifying testcases affected by changes.
  
  All changes have been tested on Windows, Linux and AIX.
  
  PR: AXISCPP-575
  Submitted by: Adrian Dick
  
  Revision  Changes    Path
  1.7       +10 -4     ws-axis/c/include/axis/AxisUserAPI.h
  
  Index: AxisUserAPI.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/include/axis/AxisUserAPI.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AxisUserAPI.h	22 Mar 2005 09:55:44 -0000	1.6
  +++ AxisUserAPI.h	22 Mar 2005 19:19:03 -0000	1.7
  @@ -199,6 +199,12 @@
   
   #define AXISC_DEFINED_ARRAY(type) \
       typedef struct {\
  +        type ** m_Array;\
  +        int m_Size;\
  +    } type##_Array;
  +
  +#define AXISC_DEFINED_POINTER_ARRAY(type) \
  +    typedef struct {\
           type * m_Array;\
           int m_Size;\
       } type##_Array;
  @@ -214,7 +220,7 @@
       int m_Size;
   } Axisc_Array;
   
  -AXISC_DEFINED_ARRAY(xsdc__string)
  +AXISC_DEFINED_POINTER_ARRAY(xsdc__string)
   AXISC_DEFINED_ARRAY(xsdc__integer)
   AXISC_DEFINED_ARRAY(xsdc__int)
   AXISC_DEFINED_ARRAY(xsdc__long)
  @@ -223,7 +229,7 @@
   AXISC_DEFINED_ARRAY(xsdc__float)
   AXISC_DEFINED_ARRAY(xsdc__double)
   AXISC_DEFINED_ARRAY(xsdc__boolean)
  -AXISC_DEFINED_ARRAY(xsdc__QName)
  +AXISC_DEFINED_POINTER_ARRAY(xsdc__QName)
   //AXISC_DEFINED_ARRAY(xsdc__NCName)
   AXISC_DEFINED_ARRAY(xsdc__dateTime)
   AXISC_DEFINED_ARRAY(xsdc__unsignedByte)
  @@ -232,8 +238,8 @@
   AXISC_DEFINED_ARRAY(xsdc__unsignedShort)
   AXISC_DEFINED_ARRAY2(xsdc__base64Binary)
   AXISC_DEFINED_ARRAY2(xsdc__hexBinary)
  -AXISC_DEFINED_ARRAY(xsdc__anyURI)
  -AXISC_DEFINED_ARRAY(xsdc__NMTOKEN)
  +AXISC_DEFINED_POINTER_ARRAY(xsdc__anyURI)
  +AXISC_DEFINED_POINTER_ARRAY(xsdc__NMTOKEN)
    
   static const int xsdc_boolean_true = 1;
   static const int xsdc_boolean_false = 0;
  
  
  
  1.6       +11 -4     ws-axis/c/include/axis/AxisUserAPI.hpp
  
  Index: AxisUserAPI.hpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/include/axis/AxisUserAPI.hpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AxisUserAPI.hpp	22 Mar 2005 09:55:44 -0000	1.5
  +++ AxisUserAPI.hpp	22 Mar 2005 19:19:03 -0000	1.6
  @@ -199,6 +199,13 @@
   #define AXIS_DEFINED_ARRAY(type) \
       class type##_Array {\
         public:\
  +        type ** m_Array;\
  +        int m_Size;\
  +    };
  +
  +#define AXIS_DEFINED_POINTER_ARRAY(type) \
  +    class type##_Array {\
  +      public:\
           type * m_Array;\
           int m_Size;\
       };
  @@ -209,7 +216,7 @@
       int m_Size;
   };
   
  -AXIS_DEFINED_ARRAY(xsd__string)
  +AXIS_DEFINED_POINTER_ARRAY(xsd__string)
   AXIS_DEFINED_ARRAY(xsd__integer)
   AXIS_DEFINED_ARRAY(xsd__int)
   AXIS_DEFINED_ARRAY(xsd__long)
  @@ -218,7 +225,7 @@
   AXIS_DEFINED_ARRAY(xsd__float)
   AXIS_DEFINED_ARRAY(xsd__double)
   AXIS_DEFINED_ARRAY(xsd__boolean)
  -AXIS_DEFINED_ARRAY(xsd__QName)
  +AXIS_DEFINED_POINTER_ARRAY(xsd__QName)
   //AXIS_DEFINED_ARRAY(xsd__NCName)
   AXIS_DEFINED_ARRAY(xsd__dateTime)
   AXIS_DEFINED_ARRAY(xsd__unsignedByte)
  @@ -227,8 +234,8 @@
   AXIS_DEFINED_ARRAY(xsd__unsignedShort)
   AXIS_DEFINED_ARRAY(xsd__base64Binary)
   AXIS_DEFINED_ARRAY(xsd__hexBinary)
  -AXIS_DEFINED_ARRAY(xsd__anyURI)
  -AXIS_DEFINED_ARRAY(xsd__NMTOKEN)
  +AXIS_DEFINED_POINTER_ARRAY(xsd__anyURI)
  +AXIS_DEFINED_POINTER_ARRAY(xsd__NMTOKEN)
    
   #define AXIS_OUT_PARAM 
   
  
  
  
  1.37      +21 -32    ws-axis/c/src/common/ArrayBean.cpp
  
  Index: ArrayBean.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/common/ArrayBean.cpp,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- ArrayBean.cpp	2 Mar 2005 09:21:47 -0000	1.36
  +++ ArrayBean.cpp	22 Mar 2005 19:19:04 -0000	1.37
  @@ -246,33 +246,30 @@
               case XSD_BYTE:
               case XSD_UNSIGNEDBYTE:
               {
  -                char* p = (char*)m_value.sta;
  +                char** p = (char**)m_value.sta;
                   for (int ix=0;ix<m_nSize;ix++)
                   {
  -                    pSZ.serializeAsElement(m_ItemName.c_str(), pNamespace, (void*)p, m_type);
  -                    p++;
  +                    pSZ.serializeAsElement(m_ItemName.c_str(), pNamespace, (void*)p[ix],
m_type);
                   }
               }
                   break;
               case XSD_SHORT:
               case XSD_UNSIGNEDSHORT:
               {
  -                short* p = (short*)m_value.sta;
  +                short** p = (short**)m_value.sta;
                   for (int ix=0;ix<m_nSize;ix++)
                   {
  -                    pSZ.serializeAsElement(m_ItemName.c_str(), pNamespace, (void*)p, m_type);
  -                    p++;
  +                    pSZ.serializeAsElement(m_ItemName.c_str(), pNamespace, (void*)p[ix],
m_type);
                   }
               }
                   break;
               case XSD_LONG:
               case XSD_UNSIGNEDLONG:
   			{
  -                LONGLONG* p = (LONGLONG*)m_value.sta;
  +                LONGLONG** p = (LONGLONG**)m_value.sta;
                   for (int ix=0;ix<m_nSize;ix++)
                   {
  -                    pSZ.serializeAsElement(m_ItemName.c_str(), pNamespace, (void*)p, m_type);
  -                    p++;
  +                    pSZ.serializeAsElement(m_ItemName.c_str(), pNamespace, (void*)p[ix],
m_type);
                   }
               }
                   break;
  @@ -280,22 +277,20 @@
               case XSD_INTEGER:
               case XSD_DURATION:		
               {
  -                long* p = (long*)m_value.sta;
  +                long** p = (long**)m_value.sta;
                   for (int ix=0;ix<m_nSize;ix++)
                   {
  -                    pSZ.serializeAsElement(m_ItemName.c_str(), pNamespace, (void*)p, m_type);
  -                    p++;
  +                    pSZ.serializeAsElement(m_ItemName.c_str(), pNamespace, (void*)p[ix],
m_type);
                   }
               }
                   break;
               case XSD_DOUBLE:
               case XSD_DECIMAL:
               {
  -                double* p = (double*)m_value.sta;
  +                double** p = (double**)m_value.sta;
                   for (int ix=0;ix<m_nSize;ix++)
                   {
  -                    pSZ.serializeAsElement(m_ItemName.c_str(), pNamespace, (void*)p, m_type);
  -                    p++;
  +                    pSZ.serializeAsElement(m_ItemName.c_str(), pNamespace, (void*)p[ix],
m_type);
                   }
               }
                   break;
  @@ -308,11 +303,10 @@
               case XSD_DAY:
               case XSD_MONTH:
               {
  -                tm* p = (tm*)m_value.sta;
  +                tm** p = (tm**)m_value.sta;
                   for (int ix=0;ix<m_nSize;ix++)
                   {
  -                    pSZ.serializeAsElement(m_ItemName.c_str(), pNamespace, (void*)p, m_type);
  -                    p++;
  +                    pSZ.serializeAsElement(m_ItemName.c_str(), pNamespace, (void*)p[ix],
m_type);
                   }
               }
                   break;
  @@ -320,21 +314,19 @@
               case XSD_UNSIGNEDINT:
               case XSD_BOOLEAN:
               {
  -                int* p = (int*)m_value.sta;
  +                int** p = (int**)m_value.sta;
                   for (int ix=0;ix<m_nSize;ix++)
                   {
  -                    pSZ.serializeAsElement(m_ItemName.c_str(), pNamespace, (void*)p, m_type);
  -                    p++;
  +                    pSZ.serializeAsElement(m_ItemName.c_str(), pNamespace, (void*)p[ix],
m_type);
                   }
               }
                   break;
               case XSD_FLOAT:
               {
  -                float* p = (float*)m_value.sta;
  +                float** p = (float**)m_value.sta;
                   for (int ix=0;ix<m_nSize;ix++)
                   {
  -                    pSZ.serializeAsElement(m_ItemName.c_str(), pNamespace, (void*)p, m_type);
  -                    p++;
  +                    pSZ.serializeAsElement(m_ItemName.c_str(), pNamespace, (void*)p[ix],
m_type);
                   }
               }
                   break;
  @@ -346,28 +338,25 @@
                   AxisChar** p = (AxisChar**)m_value.sta;
                   for (int ix=0;ix<m_nSize;ix++)
                   {
  -                    pSZ.serializeAsElement(m_ItemName.c_str(), pNamespace, (void*)*p, m_type);
  -                    p++;
  +                    pSZ.serializeAsElement(m_ItemName.c_str(), pNamespace, (void*)p[ix],
m_type);
                   }
               }
                   break;
               case XSD_HEXBINARY:
               {
  -                xsd__hexBinary* p = (xsd__hexBinary*)m_value.sta;
  +                xsd__hexBinary** p = (xsd__hexBinary**)m_value.sta;
                   for (int ix=0;ix<m_nSize;ix++)
                   {
  -                    pSZ.serializeAsElement(m_ItemName.c_str(), pNamespace, (void*)p, m_type);
  -                    p++;
  +                    pSZ.serializeAsElement(m_ItemName.c_str(), pNamespace, (void*)p[ix],
m_type);
                   }
               }
                   break;
               case XSD_BASE64BINARY:
               {
  -                xsd__base64Binary* p = (xsd__base64Binary*)m_value.sta;
  +                xsd__base64Binary** p = (xsd__base64Binary**)m_value.sta;
                   for (int ix=0;ix<m_nSize;ix++)
                   {
  -                    pSZ.serializeAsElement(m_ItemName.c_str(), pNamespace, (void*)p, m_type);
  -                    p++;
  +                    pSZ.serializeAsElement(m_ItemName.c_str(), pNamespace, (void*)p[ix],
m_type);
                   }
               }
               default:
  
  
  
  1.156     +31 -31    ws-axis/c/src/soap/SoapDeSerializer.cpp
  
  Index: SoapDeSerializer.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/SoapDeSerializer.cpp,v
  retrieving revision 1.155
  retrieving revision 1.156
  diff -u -r1.155 -r1.156
  --- SoapDeSerializer.cpp	18 Mar 2005 10:52:25 -0000	1.155
  +++ SoapDeSerializer.cpp	22 Mar 2005 19:19:04 -0000	1.156
  @@ -1040,7 +1040,7 @@
   #define INIT_VALUE_XSDBINARY
   
   #define DESERIALIZE_ENCODED_ARRAY_BLOCK(cpp_type, conv_func) \
  -Array.m_Array = new cpp_type[Array.m_Size];\
  +Array.m_Array = new cpp_type*[Array.m_Size];\
   if (!Array.m_Array)\
   {\
       Array.m_Size = 0;\
  @@ -1055,14 +1055,14 @@
       if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))\
       {\
           cpp_type* pr = conv_func(m_pNode->m_pchNameOrValue); \
  -        ((cpp_type*)Array.m_Array)[nIndex] = *pr;\
  +        ((cpp_type**)Array.m_Array)[nIndex] = pr;\
           delete pr;\
           m_pNode = m_pParser->next(); /* skip end element node too */\
           continue;\
       }\
       /* error : unexpected element type or end of stream */\
       m_nStatus = AXIS_FAIL;\
  -    delete [] (cpp_type*)Array.m_Array;\
  +    delete [] (cpp_type**)Array.m_Array;\
       Array.m_Array = 0;\
       Array.m_Size = 0;\
       return Array;\
  @@ -1101,7 +1101,7 @@
   return Array;
   
   #define DESERIALIZE_LITERAL_ARRAY_BLOCK(cpp_type, conv_func) \
  -            Array.m_Array = new cpp_type[INITIAL_ARRAY_SIZE];\
  +            Array.m_Array = new cpp_type*[INITIAL_ARRAY_SIZE];\
               if (!Array.m_Array) return Array;\
               Array.m_Size = INITIAL_ARRAY_SIZE;\
               while(true)\
  @@ -1116,7 +1116,7 @@
                       if (!m_pNode)\
                       {\
                           m_nStatus = AXIS_FAIL;\
  -                        delete [] (cpp_type*)Array.m_Array;\
  +                        delete [] (cpp_type**)Array.m_Array;\
                           Array.m_Array = 0;\
                           Array.m_Size = 0;\
                           return Array;\
  @@ -1126,8 +1126,8 @@
                           m_pNode = m_pParser->next(true); /* charactor node */\
                           if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))\
                           {\
  -                            ((cpp_type*)(Array.m_Array))[nIndex] = \
  -                            *(conv_func(m_pNode->m_pchNameOrValue));\
  +                            ((cpp_type**)(Array.m_Array))[nIndex] = \
  +                            conv_func(m_pNode->m_pchNameOrValue);\
                               m_pNode = m_pParser->next(); \
                               /* skip end element node too */\
                               m_pNode = NULL; \
  @@ -1153,7 +1153,7 @@
                       /* if we come here it is an error situation */\
                       m_nStatus = AXIS_FAIL;\
                       m_pNode = NULL;\
  -                    delete [] (cpp_type*)Array.m_Array;\
  +                    delete [] (cpp_type**)Array.m_Array;\
                       Array.m_Array = 0;\
                       Array.m_Size = 0;\
                       return Array;\
  @@ -1161,14 +1161,14 @@
                   /* if we come here that means the array allocated is */\
                   /* not enough. So double it */\
                   void *tmp=Array.m_Array;\
  -                Array.m_Array = new cpp_type[Array.m_Size*2];\
  +                Array.m_Array = new cpp_type*[Array.m_Size*2];\
                   if (!Array.m_Array) \
                   {\
                       Array.m_Size = 0;\
                       return Array;\
                   }\
  -                memcpy(Array.m_Array,tmp,Array.m_Size*sizeof(cpp_type));\
  -                delete [] (cpp_type*)tmp;\
  +                memcpy(Array.m_Array,tmp,Array.m_Size*sizeof(cpp_type*));\
  +                delete [] (cpp_type**)tmp;\
                   Array.m_Size *= 2;\
                   /*Array.m_RealSize = Array.m_Size;*/\
               }\
  @@ -1344,7 +1344,7 @@
   		    case XSD_DURATION:
   		    	DESERIALIZE_ENCODED_ARRAY_BLOCK (xsd__duration, CONV_STRTODURATION)
   		    case XSD_BOOLEAN:
  -				Array.m_Array = new long[Array.m_Size];
  +				Array.m_Array = new long*[Array.m_Size];
   		
   				if (!Array.m_Array)
   				{
  @@ -1362,15 +1362,15 @@
   				    if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
   				    {
   				    	Boolean booleanDeserializer;
  -				    	((long *) Array.m_Array)[nIndex] =
  -				    		*(booleanDeserializer.deserializeBoolean(m_pNode->m_pchNameOrValue));
  +				    	((long **) Array.m_Array)[nIndex] =
  +				    		(long *)booleanDeserializer.deserializeBoolean(m_pNode->m_pchNameOrValue);
   						m_pNode = m_pParser->next ();	/* skip end element node too */
   			
   						continue;
   				    }
   				    /* error : unexpected element type or end of stream */
   				    m_nStatus = AXIS_FAIL;
  -				    delete[](long *) Array.m_Array;
  +				    delete[](long **) Array.m_Array;
   				    Array.m_Array = 0;
   				    Array.m_Size = 0;
   				}
  @@ -1398,7 +1398,7 @@
   		case XSD_UNSIGNEDBYTE:
   			DESERIALIZE_LITERAL_ARRAY_BLOCK (xsd__unsignedByte, CONV_STRTOUNSIGNEDBYTE)
   		case XSD_LONG:
  -            Array.m_Array = new xsd__long[INITIAL_ARRAY_SIZE];
  +            Array.m_Array = new xsd__long*[INITIAL_ARRAY_SIZE];
               if (!Array.m_Array) return Array;
               Array.m_Size = INITIAL_ARRAY_SIZE;
               while(true)
  @@ -1413,7 +1413,7 @@
                       if (!m_pNode)
                       {
                           m_nStatus = AXIS_FAIL;
  -                        delete [] (xsd__long*)Array.m_Array;
  +                        delete [] (xsd__long**)Array.m_Array;
                           Array.m_Array = 0;
                           Array.m_Size = 0;
                           return Array;
  @@ -1423,8 +1423,8 @@
                           m_pNode = m_pParser->next(true); /* charactor node */
                           if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
                           {
  -                            ((xsd__long*)(Array.m_Array))[nIndex] = 
  -                            *(CONV_STRTOLONG(m_pNode->m_pchNameOrValue));
  +                            ((xsd__long**)(Array.m_Array))[nIndex] = 
  +                            CONV_STRTOLONG(m_pNode->m_pchNameOrValue);
                               m_pNode = m_pParser->next(); 
                               /* skip end element node too */
                               m_pNode = NULL; 
  @@ -1450,7 +1450,7 @@
                       /* if we come here it is an error situation */
                       m_nStatus = AXIS_FAIL;
                       m_pNode = NULL;
  -                    delete [] (xsd__long*)Array.m_Array;
  +                    delete [] (xsd__long**)Array.m_Array;
                       Array.m_Array = 0;
                       Array.m_Size = 0;
                       return Array;
  @@ -1458,14 +1458,14 @@
                   /* if we come here that means the array allocated is */
                   /* not enough. So double it */
                   void *tmp=Array.m_Array;
  -                Array.m_Array = new xsd__long[Array.m_Size*2];
  +                Array.m_Array = new xsd__long*[Array.m_Size*2];
                   if (!Array.m_Array) 
                   {
                       Array.m_Size = 0;
                       return Array;
                   }
  -                memcpy(Array.m_Array,tmp,Array.m_Size*sizeof(xsd__long));
  -                delete [] (xsd__long*)tmp;
  +                memcpy(Array.m_Array,tmp,Array.m_Size*sizeof(xsd__long*));
  +                delete [] (xsd__long**)tmp;
                   Array.m_Size *= 2;
               }
               break;
  @@ -1505,7 +1505,7 @@
   	// can have any of the following values '0', '1', 'false' or 'true', special,
   	// non-standard processing is required.  Thus the standard macro has had to be
   	// expanded and extended to cover the additional tests, unique to this type.
  -		      Array.m_Array = new long[INITIAL_ARRAY_SIZE];
  +		      Array.m_Array = new long*[INITIAL_ARRAY_SIZE];
   	
   		    if (!Array.m_Array)
   		    {
  @@ -1529,7 +1529,7 @@
   			    if (!m_pNode)
   			    {
   				m_nStatus = AXIS_FAIL;
  -				delete[](long *) Array.m_Array;
  +				delete[](long **) Array.m_Array;
   				Array.m_Array = 0;
   				Array.m_Size = 0;
   				return Array;
  @@ -1542,8 +1542,8 @@
   				if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type))
   				{
   				    Boolean booleanDeserializer;
  -				    ((long *) Array.m_Array)[nIndex] =
  -				   		*(booleanDeserializer.deserializeBoolean(m_pNode->m_pchNameOrValue));
  +				    ((long **) Array.m_Array)[nIndex] =
  +				   		(long *)booleanDeserializer.deserializeBoolean(m_pNode->m_pchNameOrValue);
   	
   				    m_pNode = m_pParser->next ();
   				    /* skip end element node too */
  @@ -1570,7 +1570,7 @@
   			    /* if we come here it is an error situation */
   			    m_nStatus = AXIS_FAIL;
   			    m_pNode = NULL;
  -			    delete[](long *) Array.m_Array;
  +			    delete[](long **) Array.m_Array;
   			    Array.m_Array = 0;
   			    Array.m_Size = 0;
   			    return Array;
  @@ -1578,7 +1578,7 @@
   			/* if we come here that means the array allocated is */
   			/* not enough. So double it */
   			void *tmp = Array.m_Array;
  -			Array.m_Array = new long[Array.m_Size * 2];
  +			Array.m_Array = new long*[Array.m_Size * 2];
   	
   			if (!Array.m_Array)
   			{
  @@ -1586,8 +1586,8 @@
   			    return Array;
   			}
   	
  -			memcpy (Array.m_Array, tmp, Array.m_Size * sizeof (long));
  -			delete[](long *) tmp;
  +			memcpy (Array.m_Array, tmp, Array.m_Size * sizeof (long*));
  +			delete[](long **) tmp;
   			Array.m_Size *= 2;
   			/*Array.m_RealSize = Array.m_Size; */
   		    }
  
  
  
  1.60      +14 -2     ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/BeanParamWriter.java
  
  Index: BeanParamWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/BeanParamWriter.java,v
  retrieving revision 1.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- BeanParamWriter.java	17 Mar 2005 14:43:48 -0000	1.59
  +++ BeanParamWriter.java	22 Mar 2005 19:19:04 -0000	1.60
  @@ -324,8 +324,20 @@
   				if ( attribs[i].isSimpleType())
   				{
   					writer.write("\tarray = pIWSDZ->getBasicArray("+CUtils.getXSDTypeForBasicType(attribs[i].getTypeName())+
", \""+attribs[i].getParamNameAsSOAPElement()+"\",0);\n");
  -//					writer.write("\tparam->"+attribs[i].getParamNameAsMember()+" = ("+CUtils.getBasicArrayNameforType(attribs[i].getTypeName())+"&)array;\n");
				
  -					writer.write("\tparam->"+attribs[i].getParamNameAsMember()+".m_Array = ("+attribs[i].getTypeName()+"*)new
"+attribs[i].getTypeName()+"[array.m_Size];\n");
  +//					writer.write("\tparam->"+attribs[i].getParamNameAsMember()+" = ("+CUtils.getBasicArrayNameforType(attribs[i].getTypeName())+"&)array;\n");
  +					String typename = attribs[i].getTypeName();
  +					if (typename.equals("xsd__string")
  +							|| typename.equals("xsd__anyURI")
  +							|| typename.equals("xsd__QName")
  +							|| typename.equals("xsd__notation")
  +							|| typename.equals("xsd__NMTOKEN"))
  +					{
  +						writer.write("\tparam->"+attribs[i].getParamNameAsMember()+".m_Array = ("+attribs[i].getTypeName()+"*)new
"+attribs[i].getTypeName()+"[array.m_Size];\n");
  +					}
  +					else
  +					{
  +						writer.write("\tparam->"+attribs[i].getParamNameAsMember()+".m_Array = ("+attribs[i].getTypeName()+"**)new
"+attribs[i].getTypeName()+"*[array.m_Size];\n");
  +					}
   					writer.write("\tparam->"+attribs[i].getParamNameAsMember()+".m_Size = array.m_Size;\n\n");
   					writer.write("\tmemcpy( param->"+attribs[i].getParamNameAsMember()+".m_Array, array.m_Array,
sizeof( "+attribs[i].getTypeName()+") * array.m_Size);\n");
   				}
  
  
  
  1.4       +31 -10    ws-axis/c/tests/auto_build/testcases/client/cpp/InOutClient.cpp
  
  Index: InOutClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/client/cpp/InOutClient.cpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- InOutClient.cpp	22 Mar 2005 16:07:02 -0000	1.3
  +++ InOutClient.cpp	22 Mar 2005 19:19:04 -0000	1.4
  @@ -17,6 +17,18 @@
   #include <axis/AxisException.hpp>
   #include <iostream>
   
  +#ifdef WIN32
  +  // Bug in MS Visual C++ 6.0. Fixed in Visual C++ .Net version.
  +  // Cannot print an __int64 number with cout without this overloading
  +  std::ostream& operator<<(std::ostream& os, __int64 i )
  +  {
  +    char buf[20];
  +    sprintf(buf,"%I64d", i );
  +    os << buf;
  +    return os;
  +  }
  +#endif
  +
   #define ARRAYSIZE 2
   
   int main(int argc, char* argv[])
  @@ -54,12 +66,16 @@
   		ws.multiParametersNoReturn("Hey dude", 69, (xsd__double)17.19);
   		cout << "multiParametersNoReturn returned" << endl;
   
  +        xsd__int * arrayOfInt = new xsd__int[3];
   		xsd__int_Array intArray;
  -		intArray.m_Array = new xsd__int[3];
  +		intArray.m_Array = new xsd__int*[3];
   		intArray.m_Size = 3;
  -		intArray.m_Array[0]=37;
  -		intArray.m_Array[1]=0;
  -		intArray.m_Array[2]=43;
  +        arrayOfInt[0] = 37;
  +		intArray.m_Array[0] = &arrayOfInt[0];
  +        arrayOfInt[1] = 0;
  +		intArray.m_Array[1]=&arrayOfInt[1];
  +        arrayOfInt[2] = 43;
  +		intArray.m_Array[2]=&arrayOfInt[2];
   
   		xsd__string_Array stringArray;
   		stringArray.m_Array = new xsd__string[3];
  @@ -100,18 +116,23 @@
   		 * Removed from WSDL for time being.
   		 */
   
  -        int_in.m_Array = new xsd__int[ARRAYSIZE];
  +        xsd__int * arrayOfInt2 = new xsd__int[ARRAYSIZE];
  +        int_in.m_Array = new xsd__int*[ARRAYSIZE];
           int_in.m_Size = ARRAYSIZE;
  -        for (int x=0; x<ARRAYSIZE; x++)
  +        int x = 0;
  +        for (x=0; x<ARRAYSIZE; x++)
           {
  -            int_in.m_Array[x] = x+1;
  +            arrayOfInt2[x] = x+1;
  +            int_in.m_Array[x] = &arrayOfInt2[x];
           }
   
  -        double_in.m_Array = new xsd__double[ARRAYSIZE];
  +        xsd__double * arrayOfDouble = new xsd__double[ARRAYSIZE];
  +        double_in.m_Array = new xsd__double*[ARRAYSIZE];
           double_in.m_Size = ARRAYSIZE;
  -        for (int x=0; x<ARRAYSIZE; x++)
  +        for (x=0; x<ARRAYSIZE; x++)
           {
  -            double_in.m_Array[x] = (xsd__double)x+71.15656;
  +            arrayOfDouble[x] = (xsd__double)x+71.15656;
  +            double_in.m_Array[x] = &arrayOfDouble[x];
           }
   
           string_in.m_Array = new xsd__string[ARRAYSIZE];
  
  
  
  1.2       +24 -12    ws-axis/c/tests/auto_build/testcases/client/cpp/NestedArraysClient.cpp
  
  Index: NestedArraysClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/client/cpp/NestedArraysClient.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- NestedArraysClient.cpp	21 Mar 2005 14:52:34 -0000	1.1
  +++ NestedArraysClient.cpp	22 Mar 2005 19:19:04 -0000	1.2
  @@ -31,25 +31,37 @@
   		ArrayOfArrayOf_xsd_int_Array parentArray;
   
   		/* Set xsd__int_Array into ArrayOf_xsd_int */
  -		baseArray1.item.m_Array = new xsd__int[ARRAYSIZE];
  +        xsd__int * baseArray1Vales = new xsd__int[ARRAYSIZE];
  +		baseArray1.item.m_Array = new xsd__int*[ARRAYSIZE];
   		baseArray1.item.m_Size = ARRAYSIZE;
  -		baseArray1.item.m_Array[0] = 1;
  -		baseArray1.item.m_Array[1] = 2;
  +        baseArray1Vales[0] = 1;
  +		baseArray1.item.m_Array[0] = &baseArray1Vales[0];
  +        baseArray1Vales[1] = 2;
  +		baseArray1.item.m_Array[1] = &baseArray1Vales[1];
   
  -		baseArray2.item.m_Array = new xsd__int[ARRAYSIZE];
  +        xsd__int * baseArray2Vales = new xsd__int[ARRAYSIZE];
  +		baseArray2.item.m_Array = new xsd__int*[ARRAYSIZE];
   		baseArray2.item.m_Size = ARRAYSIZE;
  -		baseArray2.item.m_Array[0] = 3;
  -		baseArray2.item.m_Array[1] = 4;
  +        baseArray2Vales[0] = 3;
  +		baseArray2.item.m_Array[0] = &baseArray2Vales[0];
  +        baseArray2Vales[1] = 4;
  +		baseArray2.item.m_Array[1] = &baseArray2Vales[1];
   
  -		baseArray3.item.m_Array = new xsd__int[ARRAYSIZE];
  +        xsd__int * baseArray3Vales = new xsd__int[ARRAYSIZE];
  +		baseArray3.item.m_Array = new xsd__int*[ARRAYSIZE];
   		baseArray3.item.m_Size = ARRAYSIZE;
  -		baseArray3.item.m_Array[0] = 5;
  -		baseArray3.item.m_Array[1] = 6;
  +        baseArray3Vales[0] = 5;
  +		baseArray3.item.m_Array[0] = &baseArray3Vales[0];
  +        baseArray3Vales[1] = 6;
  +		baseArray3.item.m_Array[1] = &baseArray3Vales[1];
   
  -		baseArray4.item.m_Array = new xsd__int[ARRAYSIZE];
  +        xsd__int * baseArray4Vales = new xsd__int[ARRAYSIZE];
  +		baseArray4.item.m_Array = new xsd__int*[ARRAYSIZE];
   		baseArray4.item.m_Size = ARRAYSIZE;
  -		baseArray4.item.m_Array[0] = 7;
  -		baseArray4.item.m_Array[1] = 8;
  +        baseArray4Vales[0] = 7;
  +		baseArray4.item.m_Array[0] = &baseArray4Vales[0];
  +        baseArray4Vales[1] = 8;
  +		baseArray4.item.m_Array[1] = &baseArray4Vales[1];
   
   		/* Set ArrayOf_xsd_int_Array into ArrayOfArrayOf_xsd_int */
   		subArray1.item.m_Array = new ArrayOf_xsd_int[ARRAYSIZE];
  
  
  
  1.2       +10 -7     ws-axis/c/tests/auto_build/testcases/client/cpp/NestedComplexClient.cpp
  
  Index: NestedComplexClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/client/cpp/NestedComplexClient.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- NestedComplexClient.cpp	21 Mar 2005 14:52:35 -0000	1.1
  +++ NestedComplexClient.cpp	22 Mar 2005 19:19:04 -0000	1.2
  @@ -55,10 +55,13 @@
   		strArray.m_Array[0] = "Apache";
   		strArray.m_Array[1] = "Axis C++";
   
  +        xsd__int * arrayOfInt = new xsd__int[ARRAYSIZE];
   		intArray.m_Size = ARRAYSIZE;
  -		intArray.m_Array = new xsd__int[ARRAYSIZE];
  -		intArray.m_Array[0] = 6;
  -		intArray.m_Array[1] = 7;
  +		intArray.m_Array = new xsd__int*[ARRAYSIZE];
  +        arrayOfInt[0] = 6;
  +		intArray.m_Array[0] = &arrayOfInt[0];
  +        arrayOfInt[1] = 7;
  +		intArray.m_Array[1] = &arrayOfInt[1];
   
   		simpleArrays.stringArray = strArray;
   		simpleArrays.intArray = intArray;
  @@ -82,14 +85,14 @@
   		cout << response->complexType1Array.m_Array[0]->ct1_int << endl;
   		cout << response->complexType1Array.m_Array[0]->simpleArrays->stringArray.m_Array[0]
<< " ";
   		cout << response->complexType1Array.m_Array[0]->simpleArrays->stringArray.m_Array[1]
<< endl;
  -		cout << response->complexType1Array.m_Array[0]->simpleArrays->intArray.m_Array[0]
<< " ";
  -		cout << response->complexType1Array.m_Array[0]->simpleArrays->intArray.m_Array[1]
<< endl;
  +		cout << *(response->complexType1Array.m_Array[0]->simpleArrays->intArray.m_Array[0])
<< " ";
  +		cout << *(response->complexType1Array.m_Array[0]->simpleArrays->intArray.m_Array[1])
<< endl;
   		cout << response->complexType1Array.m_Array[1]->ct1_string << endl;
   		cout << response->complexType1Array.m_Array[1]->ct1_int << endl;
   		cout << response->complexType1Array.m_Array[1]->simpleArrays->stringArray.m_Array[0]
<< " ";
   		cout << response->complexType1Array.m_Array[1]->simpleArrays->stringArray.m_Array[1]
<< endl;
  -		cout << response->complexType1Array.m_Array[1]->simpleArrays->intArray.m_Array[0]
<< " ";
  -		cout << response->complexType1Array.m_Array[1]->simpleArrays->intArray.m_Array[1]
<< endl;
  +		cout << *(response->complexType1Array.m_Array[1]->simpleArrays->intArray.m_Array[0])
<< " ";
  +		cout << *(response->complexType1Array.m_Array[1]->simpleArrays->intArray.m_Array[1])
<< endl;
   
   	}
   	catch(AxisException& e)
  
  
  
  1.2       +10 -7     ws-axis/c/tests/auto_build/testcases/client/cpp/PrimitiveAndArrayClient.cpp
  
  Index: PrimitiveAndArrayClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/client/cpp/PrimitiveAndArrayClient.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PrimitiveAndArrayClient.cpp	21 Mar 2005 14:52:35 -0000	1.1
  +++ PrimitiveAndArrayClient.cpp	22 Mar 2005 19:19:04 -0000	1.2
  @@ -23,19 +23,22 @@
   
   		single=37;
   
  +        xsd__int * arrayOfInt = new xsd__int[ARRAYSIZE];
   		intArray.m_Size = ARRAYSIZE;
  -		intArray.m_Array = new xsd__int[ARRAYSIZE];
  -		intArray.m_Array[0] = 6;
  -		intArray.m_Array[1] = 7;
  +		intArray.m_Array = new xsd__int*[ARRAYSIZE];
  +		arrayOfInt[0] = 6;
  +        intArray.m_Array[0] = &arrayOfInt[0];
  +        arrayOfInt[1] = 7;
  +		intArray.m_Array[1] = &arrayOfInt[1];
   
   		response = ws->sendPrimitiveAndArray(single, intArray);
  -		cout << response->returnInt << " " << response->returnArray.m_Array[0]
<< " " << response->returnArray.m_Array[1] << endl;
  +		cout << response->returnInt << " " << *(response->returnArray.m_Array[0])
<< " " << *(response->returnArray.m_Array[1]) << endl;
   
   		single=43;
  -		intArray.m_Array[0] = 13;
  -		intArray.m_Array[1] = 17;
  +        arrayOfInt[0] = 13;
  +        arrayOfInt[1] = 17;
   		response = ws->sendArrayAndPrimitive(intArray, single);
  -		cout << response->returnInt << " " << response->returnArray.m_Array[0]
<< " " << response->returnArray.m_Array[1] << endl;
  +		cout << response->returnInt << " " << *(response->returnArray.m_Array[0])
<< " " << *(response->returnArray.m_Array[1]) << endl;
   
   		delete ws;
   	}
  
  
  
  1.8       +4 -2      ws-axis/c/tests/auto_build/testcases/client/cpp/SimpleArrayDocClient.cpp
  
  Index: SimpleArrayDocClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/client/cpp/SimpleArrayDocClient.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SimpleArrayDocClient.cpp	18 Mar 2005 20:07:41 -0000	1.7
  +++ SimpleArrayDocClient.cpp	22 Mar 2005 19:19:04 -0000	1.8
  @@ -29,11 +29,13 @@
   		ArrayTestPortType ws(endpoint);
   		//testing echoIntArray
   		IntArrayType arrin;
  -		arrin.intItem.m_Array = new int[ARRAYSIZE];
  +		arrin.intItem.m_Array = new int*[ARRAYSIZE];
  +        int * intArray = new int[ARRAYSIZE];
   		arrin.intItem.m_Size = ARRAYSIZE;
   		for (x=0;x<ARRAYSIZE;x++)
   		{
  -			arrin.intItem.m_Array[x] = x;
  +            intArray[x] = x;
  +			arrin.intItem.m_Array[x] = &intArray[x];
   		}
   		cout << "invoking echoIntArray..."<<endl;
   		if (ws.echoIntArray(&arrin)->intItem.m_Array != NULL)
  
  
  
  1.3       +4 -2      ws-axis/c/tests/auto_build/testcases/client/cpp/SimpleArrayDoc_TTestClient.cpp
  
  Index: SimpleArrayDoc_TTestClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/client/cpp/SimpleArrayDoc_TTestClient.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SimpleArrayDoc_TTestClient.cpp	18 Mar 2005 20:07:41 -0000	1.2
  +++ SimpleArrayDoc_TTestClient.cpp	22 Mar 2005 19:19:04 -0000	1.3
  @@ -52,11 +52,13 @@
   				ArrayTestPortType ws(endpoint);
   				//testing echoIntArray
   				IntArrayType arrin;
  -				arrin.intItem.m_Array = new int[ARRAYSIZE];
  +				arrin.intItem.m_Array = new int*[ARRAYSIZE];
  +                int * intArray = new int[ARRAYSIZE];
   				arrin.intItem.m_Size = ARRAYSIZE;
   				for (x=0;x<ARRAYSIZE;x++)
   				{
  -					arrin.intItem.m_Array[x] = x;
  +                    intArray[x] = x;
  +					arrin.intItem.m_Array[x] = &intArray[x];
   				}
   				if (ws.echoIntArray(&arrin)->intItem.m_Array != NULL)
   					cout << "successful "<<endl;
  
  
  
  1.5       +25 -15    ws-axis/c/tests/auto_build/testcases/client/cpp/SimpleArraysClient.cpp
  
  Index: SimpleArraysClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/client/cpp/SimpleArraysClient.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SimpleArraysClient.cpp	18 Mar 2005 20:07:41 -0000	1.4
  +++ SimpleArraysClient.cpp	22 Mar 2005 19:19:04 -0000	1.5
  @@ -44,17 +44,19 @@
   
   
   		/* Test a boolean array */
  -		boolean_in.m_Array = new xsd__boolean[ARRAYSIZE];
  +		boolean_in.m_Array = new xsd__boolean*[ARRAYSIZE];
  +        xsd__boolean * booleanArray = new xsd__boolean[ARRAYSIZE];
   		boolean_in.m_Size = ARRAYSIZE;
           int x = 0;
   		for (x=0; x<ARRAYSIZE; x++)
   		{
  -			boolean_in.m_Array[x] = (xsd__boolean)x;
  +            booleanArray[x] = (xsd__boolean)x;
  +			boolean_in.m_Array[x] = &booleanArray[x];
   		}
   		cout << "invoking echoBooleanArray..."<<endl;
   		boolean_out = ws.echoBooleanArray(boolean_in);
   		if(boolean_out.m_Size > 0)
  -			if(boolean_out.m_Array[0] == (xsd__boolean)0)
  +			if(*(boolean_out.m_Array[0]) == (xsd__boolean)0)
   				cout << "successful "<<endl;
   			else
   				cout << "failed "<<endl;		
  @@ -97,16 +99,18 @@
   			cout << "failed "<<endl;		
                   */
   		/* Test an int array */
  -		int_in.m_Array = new xsd__int[ARRAYSIZE];
  +		int_in.m_Array = new xsd__int*[ARRAYSIZE];
  +        xsd__int * intArray = new xsd__int[ARRAYSIZE];
   		int_in.m_Size = ARRAYSIZE;
   		for (x=0; x<ARRAYSIZE; x++)
   		{
  -			int_in.m_Array[x] = x+1;
  +            intArray[x] = x+1;
  +			int_in.m_Array[x] = &intArray[x];
   		}
   		cout << "invoking echoIntArray..."<<endl;
   		int_out = ws.echoIntArray(int_in);
   		if(int_out.m_Size > 0)
  -			if(int_out.m_Array[0] == 1)
  +			if(*(int_out.m_Array[0]) == 1)
   				cout << "successful "<<endl;
   			else
   				cout << "failed "<<endl;		
  @@ -114,16 +118,18 @@
   			cout << "failed "<<endl;
   
   		/* Test a long array */
  -		long_in.m_Array = new xsd__long[ARRAYSIZE];
  +		long_in.m_Array = new xsd__long*[ARRAYSIZE];
  +        xsd__long * longArray = new xsd__long[ARRAYSIZE];
   		long_in.m_Size = ARRAYSIZE;
   		for (x=0; x<ARRAYSIZE; x++)
   		{
  -			long_in.m_Array[x] = (xsd__long)x+200001;
  +            longArray[x] = (xsd__long) x+ 200001;
  +			long_in.m_Array[x] = &longArray[x];
   		}
   		cout << "invoking echoLongArray..."<<endl;
   		long_out = ws.echoLongArray(long_in);
   		if(long_out.m_Size > 0)
  -			if(long_out.m_Array[0] == (xsd__long)200001)
  +			if(*(long_out.m_Array[0]) == (xsd__long)200001)
   				cout << "successful "<<endl;
   			else
   				cout << "failed "<<endl;		
  @@ -132,16 +138,18 @@
   
   
   		/* Test a float array */
  -		float_in.m_Array = new xsd__float[ARRAYSIZE];
  +		float_in.m_Array = new xsd__float*[ARRAYSIZE];
  +        xsd__float * floatArray = new xsd__float[ARRAYSIZE];
   		float_in.m_Size = ARRAYSIZE;
   		for (x=0; x<ARRAYSIZE; x++)
   		{
  -			float_in.m_Array[x] = (xsd__float)x+11.111;
  +            floatArray[x] = (xsd__float) x+ 11.111;
  +			float_in.m_Array[x] = &floatArray[x];
   		}
   		cout << "invoking echoFloatArray..."<<endl;
   		float_out = ws.echoFloatArray(float_in);
   		if(float_out.m_Size > 0)
  -			if(float_out.m_Array[0] == (xsd__float)11.111)
  +			if(*(float_out.m_Array[0]) == (xsd__float)11.111)
   				cout << "successful "<<endl;
   			else
   				cout << "failed "<<endl;		
  @@ -149,16 +157,18 @@
   			cout << "failed "<<endl;		
   
   		/* Test a double array */
  -		double_in.m_Array = new xsd__double[ARRAYSIZE];
  +		double_in.m_Array = new xsd__double*[ARRAYSIZE];
  +        xsd__double * doubleArray = new xsd__double[ARRAYSIZE];
   		double_in.m_Size = ARRAYSIZE;
   		for (x=0; x<ARRAYSIZE; x++)
   		{
  -			double_in.m_Array[x] = (xsd__double)x+71.15656;
  +            doubleArray[x] = (xsd__double)x+71.15656;
  +			double_in.m_Array[x] = &doubleArray[x];
   		}
   		cout << "invoking echoDoubleArray..."<<endl;
   		double_out = ws.echoDoubleArray(double_in);
   		if(double_out.m_Size > 0)
  -			if(double_out.m_Array[0] == (xsd__double)71.15656)
  +			if(*(double_out.m_Array[0]) == (xsd__double)71.15656)
   				cout << "successful "<<endl;
   			else
   				cout << "failed "<<endl;		
  
  
  
  1.7       +3 -2      ws-axis/c/tests/auto_build/testcases/client/cpp/SimpleTypeArrayClient.cpp
  
  Index: SimpleTypeArrayClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/client/cpp/SimpleTypeArrayClient.cpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- SimpleTypeArrayClient.cpp	18 Mar 2005 20:07:41 -0000	1.6
  +++ SimpleTypeArrayClient.cpp	22 Mar 2005 19:19:04 -0000	1.7
  @@ -42,11 +42,12 @@
       int entries[100];
       int i;
   
  -    array_input.m_Array = entries;
  +    array_input.m_Array = new int*[100];
       array_input.m_Size  = 100;
   
       for ( i = 0; i < 100; i++ ) {
         entries[i] = i;
  +      array_input.m_Array[i] = &entries[i];
       }
   
       input = new Type();
  @@ -55,7 +56,7 @@
       output = ws->getInput(input);
   
       for ( i = 0; i < 100; i++ ) {
  -      cout << "item [" << i << "] = " << output->item.m_Array[i]
<< endl;
  +      cout << "item [" << i << "] = " << *(output->item.m_Array[i])
<< endl;
       }
       returnValue = 0; // Success
   
  
  
  
  1.3       +3 -2      ws-axis/c/tests/auto_build/testcases/client/cpp/SimpleTypeArray_TTestClient.cpp
  
  Index: SimpleTypeArray_TTestClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/client/cpp/SimpleTypeArray_TTestClient.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SimpleTypeArray_TTestClient.cpp	18 Mar 2005 20:07:41 -0000	1.2
  +++ SimpleTypeArray_TTestClient.cpp	22 Mar 2005 19:19:04 -0000	1.3
  @@ -54,11 +54,12 @@
   				int entries[100];
   				int i;
   
  -				array_input.m_Array = entries;
  +				array_input.m_Array = new int*[100];
   				array_input.m_Size  = 100;
   
   				for ( i = 0; i < 100; i++ ) {
   				entries[i] = i;
  +                    array_input.m_Array[i] = &entries[i];
   				}
   
   				input = new Type();
  @@ -66,7 +67,7 @@
   
   				output = ws->getInput(input);
   				i=0;				
  -				cout << "item [" << i << "] = " << output->item.m_Array[i]
<< endl;			
  +				cout << "item [" << i << "] = " << *(output->item.m_Array[i])
<< endl;			
   				delete ws;
   				bSuccess = true;
           }
  
  
  

Mime
View raw message