axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "nadir amra (JIRA)" <>
Subject [jira] Commented: (AXISCPP-770) const AnyElement* XMLParserXerces::next(bool isCharData) crashes
Date Sat, 12 Aug 2006 04:54:14 GMT
    [ ] 
nadir amra commented on AXISCPP-770:

Adding note on the forum by Kamlesh kumar <> related to this:

The current implementation of XMLParserXerces ignores
the  value returned by the parseNext() call, this
causes the program to crash the next time parseNext()
is called. 

Here is a sample code inside the peek function
illustrating the problem. 

AnyElement* elem = m_Xhandler.getAnyElement();
        while (CHARACTER_ELEMENT == elem->m_type) /
        { /* ignorable white space */
            bCanParseMore =
            elem = m_Xhandler.getAnyElement();

It has two problems one it ignores the value of
bCanParseMore and secondly it doesn't check if elem is
null or not before entering the while loop again. 

Ideally, once the parser returns a value of
false(indicating the end of stream) we shouldn't be
calling parseNext() function. I think it would be
better to have a class member variable called
m_bCanParseMore which we check before making any call
to parseNext function. This would avoid the problem.

I run into this situation more often as I am using the
SoapDeSerializer API directly.

> const AnyElement* XMLParserXerces::next(bool isCharData) crashes
> ----------------------------------------------------------------
>                 Key: AXISCPP-770
>                 URL:
>             Project: Axis-C++
>          Issue Type: Bug
>          Components: Parser Library - Xerces
>    Affects Versions: 1.5 Final
>         Environment: linux 2.6.11
>            Reporter: jose
> The function const AnyElement* XMLParserXerces::next(bool isCharData) of XMLParserXerces.cpp
crashes on the next line:
>                 bCanParseMore = m_pParser->parseNext(m_ScanToken);
> I have tested with xerces 2.2 and with xerces 2.6 and the problem continues.
> If I HTTP GET the Web Services List via http://localhost:8080/axis/ the parser works
fine for the server.wsdd file, but when I
> call the web service example Calculator and the engine tries to parse the soap request
in process(), then crashes.
> P.D.: Please, migrate to stable xerces 2.6

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


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

View raw message