You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Samisa Abeysinghe <sa...@gmail.com> on 2005/02/09 08:29:12 UTC

Complex array testing [was: Re: Array serialization?]

Do we have a test case to test complex arrays in the test suite?

I had a look and could not find any :(

Samisa...


On Wed, 9 Feb 2005 15:24:15 +1000, Tim Bartley <tb...@au1.ibm.com> wrote:
>  
> I am an Axis C++ newbie so please bare with me ... 
>  
> I am having trouble with serialization of an array parameter on the client
> side. 
>  
> The array is of a complex type. 
>  
> The generated stubs create: 
>  
> typedef struct Complex { 
>         xsd__string value1; 
>         xsd__string value2; 
>         xsd__string value3; 
>         xsd__int value4; 
>         Complex(); 
>         ~Complex(); 
> }; 
>  
> typedef struct Complex_ArrayTag { 
>         Complex** m_Array; 
>         int m_Size; 
> }; 
>  
> I can't find any Axis C++ samples using arrays of complex types. 
>  
> I have code similar to the following to initialize the array. 
>  
> Complex* data = new Complex[size]; 
>  
> <initialize data elements> 
>  
> Complex_Array array; 
> array.m_Array = new Complex*[size]; 
> array.m_Size = size; 
> for (int i = 0; i < size; ++i) { 
>         array.m_Array[i] = &data[i]; 
> } 
>  
> when I step through the generated Axis_Serialize_Complex function the
> "Complex* param" parameter appears to really be a "Complex** param". This
> results in horrible binary data being included in the request which is then
> generally rejected by the server. 
>  
> Am I setting up my Complex_Array incorrectly or is this a bug? I'm using the
> 1.4 stable release on Linux and have just tried this with the new 1.5 alpha
> with the same result. 
>  
> Regarsd, 
>  
> Tim Bartley 
> --
>  IBM Tivoli Access Manager Development
>  Gold Coast Development Lab, Australia
>  +61-7-5552-4001 phone
>  +61-7-5571-0420 fax