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 Atanacio Reyes <ar...@yahoo.com> on 2012/07/20 22:58:07 UTC

serialization problem with large xml documents

Dear axis2c users:

Maybe this problem has to do with the library libxml2, particularly with the structure xmlBuffer.
I have the following code:

axiom_node_serialize(om_node, env, om_output);
buffer = (axis2_char_t *) axiom_xml_writer_get_xml(xml_writer, env);
printf( "size of buffer=%d, actual size=%d\n", 

             axiom_xml_writer_get_xml_size(xml_writer, env), strlen(buffer) );

the output is:
size of buffer=27558, actual size=16396.

Does not include the serialized xml document, but to see the sizes is that it is incomplete.

this problem has to do with large xml documents (> 27300 bytes).

thank you all.


Atanacio Reyes

Re: AW: serialization problem with large xml documents

Posted by Atanacio Reyes <ar...@yahoo.com>.
Hi:
   I'm using a g++ compiler in a Pentium 4 Computer over Linux 2.6.32-41, I guess the pointer size are determined by the architecture. I don't use far nor near pointers in my code.

Atanacio.



________________________________
 From: Stadelmann Josef <jo...@axa-winterthur.ch>
To: Apache AXIS C User List <c-...@axis.apache.org>; Atanacio Reyes <ar...@yahoo.com> 
Sent: Monday, July 23, 2012 1:37 AM
Subject: AW: serialization problem with large xml documents
 

Dear Atanacio
 
Check your Code and make sure all pointer are at least 32 bit pointers. 
Often you have just problems when one of the many pointers is of a 16 bit size.
Pointer Size matters and are important when larger buffers come to play.
 
Josef 
 
Von:Atanacio Reyes [mailto:areyesv@yahoo.com] 
Gesendet: Freitag, 20. Juli 2012 22:58
An: Apache AXIS C User List
Betreff: serialization problem with large xml documents
 
Dear axis2c users:
 
Maybe this problem has to do with the library libxml2, particularly with the structure xmlBuffer.
I have the following code:
 
axiom_node_serialize(om_node, env, om_output);
buffer = (axis2_char_t *) axiom_xml_writer_get_xml(xml_writer, env);
printf( "size of buffer=%d, actual size=%d\n", 
             axiom_xml_writer_get_xml_size(xml_writer, env), strlen(buffer) );
 
the output is:
size of buffer=27558, actual size=16396.
 
Does not include the serialized xml document, but to see the sizes is that it is incomplete.
 
this problem has to do with large xml documents (> 27300 bytes).
 
thank you all.
 
Atanacio Reyes

Re: AW: serialization problem with large xml documents

Posted by Thomas Gentsch <tg...@e-tge.de>.
Hi Atanacio + all,

when reading this I vaguely remembered that I had a problem similar to
yours ... I looked through my mail and found this:
=====
From: 	Thomas Gentsch <tg...@e-tge.de>
To: 	Apache AXIS C User List <c-...@axis.apache.org>
Subject: 	Re: XML reader/writer buffer size problem?
Date: 	02/04/2011 01:21:50 PM
=====
Look for that thread for the complete info. Essentially:
- I found that XML structures are messed up between server and client
- happens with large docs (in my case ~500k)
- happens with Axis2C 1.6
- happens with Guththila XML library (default) but NOT with libxml2
So, if you did not rebuild the sources yourself, you are probably using
libguththila, in my case replacing it with libxml2 (what I wanted to do
anyway) helped.

Rgds,
  tge

On Mon, 2012-07-23 at 10:37 +0200, Stadelmann Josef wrote:
> Dear Atanacio
> 
>  
> 
> Check your Code and make sure all pointer are at least 32 bit
> pointers. 
> 
> Often you have just problems when one of the many pointers is of a 16
> bit size.
> 
> Pointer Size matters and are important when larger buffers come to
> play.
> 
>  
> 
> Josef 
> 
>  
> 
> Von: Atanacio Reyes [mailto:areyesv@yahoo.com] 
> Gesendet: Freitag, 20. Juli 2012 22:58
> An: Apache AXIS C User List
> Betreff: serialization problem with large xml documents
> 
> 
>  
> 
> Dear axis2c users:
> 
> 
>  
> 
> 
> Maybe this problem has to do with the library libxml2, particularly
> with the structure xmlBuffer.
> I have the following code:
> 
> 
>  
> 
> 
> axiom_node_serialize(om_node, env, om_output);
> buffer = (axis2_char_t *) axiom_xml_writer_get_xml(xml_writer, env);
> printf( "size of buffer=%d, actual size=%d\n", 
> 
> 
>              axiom_xml_writer_get_xml_size(xml_writer, env),
> strlen(buffer) );
> 
> 
>  
> 
> 
> the output is:
> 
> 
> size of buffer=27558, actual size=16396.
> 
> 
>  
> 
> 
> Does not include the serialized xml document, but to see the sizes is
> that it is incomplete.
> 
> 
>  
> 
> 
> this problem has to do with large xml documents (> 27300 bytes).
> 
> 
>  
> 
> 
> thank you all.
> 
> 
>  
> 
> 
> Atanacio Reyes
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: c-user-unsubscribe@axis.apache.org
For additional commands, e-mail: c-user-help@axis.apache.org


AW: serialization problem with large xml documents

Posted by Stadelmann Josef <jo...@axa-winterthur.ch>.
Dear Atanacio

 

Check your Code and make sure all pointer are at least 32 bit pointers. 

Often you have just problems when one of the many pointers is of a 16
bit size.

Pointer Size matters and are important when larger buffers come to play.

 

Josef 

 

Von: Atanacio Reyes [mailto:areyesv@yahoo.com] 
Gesendet: Freitag, 20. Juli 2012 22:58
An: Apache AXIS C User List
Betreff: serialization problem with large xml documents

 

Dear axis2c users:

 

Maybe this problem has to do with the library libxml2, particularly with
the structure xmlBuffer.
I have the following code:

 

axiom_node_serialize(om_node, env, om_output);
buffer = (axis2_char_t *) axiom_xml_writer_get_xml(xml_writer, env);
printf( "size of buffer=%d, actual size=%d\n", 

             axiom_xml_writer_get_xml_size(xml_writer, env),
strlen(buffer) );

 

the output is:

size of buffer=27558, actual size=16396.

 

Does not include the serialized xml document, but to see the sizes is
that it is incomplete.

 

this problem has to do with large xml documents (> 27300 bytes).

 

thank you all.

 

Atanacio Reyes