axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Hawkins <HAWKI...@uk.ibm.com>
Subject Re: Array serialization?
Date Thu, 10 Feb 2005 08:42:14 GMT
Do I assume we need a complex class copy constructor creating then i.e. 
new JIRA ?





Tim Bartley <tbartley@au1.ibm.com> 
10/02/2005 01:09
Please respond to
"Apache AXIS C User List"


To
"Apache AXIS C User List" <axis-c-user@ws.apache.org>
cc

Subject
Re: Array serialization?







Thanks Samisa, 

Yes - this works around the problem. 

Thanks again. I now have a complex array deserialization issue. I'll post 
that in a separate thread. 

Tim
--
IBM Tivoli Access Manager Development
Gold Coast Development Lab, Australia
+61-7-5552-4001 phone
+61-7-5571-0420 fax 

Samisa Abeysinghe <samisa.abeysinghe@gmail.com> wrote on 09/02/2005 
17:27:58:

> I have the gut feel that this happens due to the fact that Complex
> class do not have a copy constructor.
> 
> To verify this, can you please change your code to the following and
> test again please:
> 
>  Complex* data = new Complex[size]; 
> 
>  <initialize data elements> 
> 
>  Complex_Array array; 
>  array.m_Array = data;
>  array.m_Size = size; 
> 
> Thanks,
> 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'musing 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