axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Gentsch (JIRA)" <>
Subject [jira] Commented: (AXIS2C-1534) XML writers handle errors differently, add char offset in case of errors
Date Fri, 04 Feb 2011 20:37:30 GMT


Thomas Gentsch commented on AXIS2C-1534:

OK, I give up. I tried with the libxml2 parser and with that it works.
Here are my latest findings, just in case somebody wants to look into
this further ...


Digging further, now I'm back at the XML writer again. Have found this:
 buffer = (axis2_char_t *) axiom_xml_writer_get_xml(xml_writer, env);
 buffer_size = axiom_xml_writer_get_xml_size(xml_writer, env);
/* TGE */
printf("TGE: http sender: %d bytes\n", buffer_size);
printf("TGE: http sender: '%s'\n", buffer);

  int rc = axutil_stream_write(out_stream, env, buffer, buffer_size);
printf("TGE: http sender stream_write returned %d.\n", rc);

and I get again the truncated XML. In other words, here happens the same
as I had before in my dump() function - the axiom node gets printed into
a buffer, but not completely.

The guththila XML writer prints everything correctly - but not, as I
initially thought, into the socket, but again into another buffer (as
The size of the buffer is correct (975000), however the actual buffer is
TGE: http sender: 975921 bytes
TGE: http sender: '<soapenv:Envelope ... <tns3:num300000000>24<//^M'
TGE: http sender stream_write returned 975921.^M
TGE: axutil_stream_write_socket 17 bytes^M
TGE: axutil_stream_write_socket wrote 17 bytes^M
TGE: axutil_stream_write_socket 36 bytes^M
TGE: axutil_stream_write_socket wrote 36 bytes^M
TGE: axutil_stream_write_socket 49 bytes^M
TGE: axutil_stream_write_socket wrote 49 bytes^M
TGE: axutil_stream_write_socket 50 bytes^M
TGE: axutil_stream_write_socket wrote 50 bytes^M
TGE: axutil_stream_write_socket 24 bytes^M
TGE: axutil_stream_write_socket wrote 24 bytes^M
TGE: axutil_stream_write_socket 2 bytes^M
TGE: axutil_stream_write_socket wrote 2 bytes^M
TGE: axutil_stream_write_socket 245761 bytes^M
TGE: axutil_stream_write_socket wrote 245761 bytes^M
TGE: axutil_stream_write_socket 2 bytes^M
TGE: axutil_stream_write_socket wrote 2 bytes^M

The 245761 is about the length of data actually sent over the wire and
the same as printed as out truncated.

Now, further ... it turned out that while constructing the buffer, the
guththila XML writer finds an empty/illegal prefix:

TGE Guth chars: '1'^M
TGE Guth elem end pfx: ''^M
TGE Guth elem end: 'num300000000'^M

and writes:
TGE: Copying buffer[4](262137): 'num300000000>1</'^M
... 31 3c 2f 00 0d 00 04 3a ...
... ></ rubbish :

Now I tried to understand what's going on in the guththila parser but
give up for now.

The crazy thing is that it works ok for 25000 tags within that stupid
structure and fails 2 times (found another occurence of the same) ...
actually I just notice:
Both cases are the first closing tags in buffers 4 and 5:
TGE: Copying buffer[4](262137): 'num300000000>1</'
TGE: Copying buffer[5](468040): 'num8000000>339386</'

and the previous buffer ends like this:
in both cases

> XML writers handle errors differently, add char offset in case of errors
> ------------------------------------------------------------------------
>                 Key: AXIS2C-1534
>                 URL:
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: xml/om
>    Affects Versions: 1.6.0
>            Reporter: Thomas Gentsch
>            Priority: Minor
>         Attachments: axis2xml.tar.gz
> Have a test prog which reads in an XML doc and prints it put again. With large input
data sizes (in my example ~400k) the output gets truncated.
> Interestingly the behavior is different when using axiom_xml_writer_create() or axiom_xml_writer_create_for_memory().
> With the first
>  - the output is ~380k large
>  - some error appears in the log file
> whereas with the second
>  - the output is only 16k
>  - no error
> Attached are two testprogs - tstxml.cpp and tstxml2.cpp with both the xml writer types.
> The input and output xml files are contained as well, plus the log file mentioned above.

This message is automatically generated by JIRA.
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message