axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Blecken" <cblec...@macrovision.com>
Subject RE: Complex array testing [was: Re: Array serialization?]
Date Wed, 09 Feb 2005 07:39:41 GMT
In the ant tests cases there is the FourLevelTestDoc test.
It comes close to this case (but maybe not close enough).

Carsten

-----Original Message-----
From: Samisa Abeysinghe [mailto:samisa.abeysinghe@gmail.com]
Sent: Tuesday, February 08, 2005 11:29 PM
To: Apache AXIS C User List
Subject: 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 <tbartley@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

Mime
View raw message