You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Kamlesh kumar <ka...@yahoo.com> on 2006/08/12 04:41:21 UTC

Problems with XMLParserXerces

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 */
            m_Xhandler.freeElement();
            bCanParseMore =
m_pParser->parseNext(m_ScanToken);
            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. I see someone else have
also faced this problem 
http://mail-archives.apache.org/mod_mbox/ws-axis-c-dev/200507.mbox/%3C256180486.1122544765692.JavaMail.jira@ajax.apache.org%3E

Can someone take a look into XMLParserXerces.cpp and
fix this problem ?





__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: Axis C++ 1.6 Final

Posted by Samisa Abeysinghe <sa...@wso2.com>.
Nadir Amra wrote:
> I have never tried putting out a release but will try in October.  If 
> someone else would be kind enough to give it a try, the sooner the better.
>   
If you are interested in cutting out a release, you would have to call 
for a vote for the release, as per the new PMC regulations set forth few 
months back.
So please call a vote.

Thanks,
Samisa...


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


Re: Axis C++ 1.6 Final

Posted by Franz Fehringer <fe...@isogmbh.de>.
It should read John (not Johm) Hawkins.

Franz Fehringer schrieb:
> Hello Nadir,
>
> After several rounds of improving and bug fixing (Johm Hawkins, Adrian 
> Dick and yourself) AXISCPP approaches usability for us.
> But there is one real bummer left, namely AXISCPP-716 (Support for the 
> attribute construct 'use').
> This issue means (among other shortcomings), that it is not possible 
> to detect, whether an optional attribute is present in the response or 
> not.
> I have attached (JIRA) two mails i got from Adrian Dick regarding this 
> problem.
> Would it be possible to look after this issue?
> Given that you made some cleanup in the relevant code recently this 
> one might be feasible for you?
>
> Thanks and best regards
>
> Franz
>
>
> Nadir Amra schrieb:
>> I have never tried putting out a release but will try in October.  If 
>> someone else would be kind enough to give it a try, the sooner the better.
>>
>> Nadir K. Amra
>>
>>
>> Kamlesh kumar <ka...@yahoo.com> wrote on 08/14/2006 11:41:28 AM:
>>
>>   
>>> That's cool. Thanks for providing the complete fix.
>>>
>>> BTW, Can someone tell me when the Axis C++ 1.6 Final
>>> version is going to be released ? 
>>>
>>>     
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>>
>>   
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Re: Axis C++ 1.6 Final

Posted by Nadir Amra <am...@us.ibm.com>.
Just got back from a extended vacation - will look into it although I give 
no gaurantees :-) I just want to get the "easy" stuff out of the way.

Nadir K. Amra


Franz Fehringer <fe...@isogmbh.de> wrote on 09/21/2006 05:17:29 AM:

> Any chance for this issue (hoping not to annoy you)?
> 
> Best regards
> 
> Franz
> 
> 
> Franz Fehringer schrieb: 
> Hello Nadir,
> 
> After several rounds of improving and bug fixing (John Hawkins, 
> Adrian Dick and yourself) AXISCPP approaches usability for us.
> But there is one real bummer left, namely AXISCPP-716 (Support for 
> the attribute construct 'use').
> This issue means (among other shortcomings), that it is not possible
> to detect, whether an optional attribute is present in the response or 
not.
> I have attached (JIRA) two mails i got from Adrian Dick regarding 
> this problem.
> Would it be possible to look after this issue?
> Given that you made some cleanup in the relevant code recently this 
> one might be feasible for you?
> 
> Thanks and best regards
> 
> Franz
> 
> 
> Nadir Amra schrieb: 
> I have never tried putting out a release but will try in October.  If 
> someone else would be kind enough to give it a try, the sooner the 
better.
> 
> Nadir K. Amra
> 
> 
> Kamlesh kumar <ka...@yahoo.com> wrote on 08/14/2006 11:41:28 AM:
> 
> 
> That's cool. Thanks for providing the complete fix.
> 
> BTW, Can someone tell me when the Axis C++ 1.6 Final
> version is going to be released ? 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
> 
> 
> 
> [attachment "feh.vcf" deleted by Nadir Amra/Rochester/IBM] 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-dev-help@ws.apache.org

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


Re: Axis C++ 1.6 Final

Posted by Franz Fehringer <fe...@isogmbh.de>.
Any chance for this issue (hoping not to annoy you)?

Best regards

Franz


Franz Fehringer schrieb:
> Hello Nadir,
>
> After several rounds of improving and bug fixing (John Hawkins, Adrian 
> Dick and yourself) AXISCPP approaches usability for us.
> But there is one real bummer left, namely AXISCPP-716 (Support for the 
> attribute construct 'use').
> This issue means (among other shortcomings), that it is not possible 
> to detect, whether an optional attribute is present in the response or 
> not.
> I have attached (JIRA) two mails i got from Adrian Dick regarding this 
> problem.
> Would it be possible to look after this issue?
> Given that you made some cleanup in the relevant code recently this 
> one might be feasible for you?
>
> Thanks and best regards
>
> Franz
>
>
> Nadir Amra schrieb:
>> I have never tried putting out a release but will try in October.  If 
>> someone else would be kind enough to give it a try, the sooner the better.
>>
>> Nadir K. Amra
>>
>>
>> Kamlesh kumar <ka...@yahoo.com> wrote on 08/14/2006 11:41:28 AM:
>>
>>   
>>> That's cool. Thanks for providing the complete fix.
>>>
>>> BTW, Can someone tell me when the Axis C++ 1.6 Final
>>> version is going to be released ? 
>>>
>>>     
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>>
>>   
>


Re: Axis C++ 1.6 Final

Posted by Nadir Amra <am...@us.ibm.com>.
I can take  a look at it but will not be able to for at least another 
month since I am going on vacation. 

Nadir K. Amra


Franz Fehringer <fe...@isogmbh.de> wrote on 08/15/2006 04:20:06 AM:

> Hello Nadir,
> 
> After several rounds of improving and bug fixing (Johm Hawkins, 
> Adrian Dick and yourself) AXISCPP approaches usability for us.
> But there is one real bummer left, namely AXISCPP-716 (Support for 
> the attribute construct 'use').
> This issue means (among other shortcomings), that it is not possible
> to detect, whether an optional attribute is present in the response or 
not.
> I have attached (JIRA) two mails i got from Adrian Dick regarding 
> this problem.
> Would it be possible to look after this issue?
> Given that you made some cleanup in the relevant code recently this 
> one might be feasible for you?
> 
> Thanks and best regards
> 
> Franz
> 
> 

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


Re: Axis C++ 1.6 Final

Posted by Franz Fehringer <fe...@isogmbh.de>.
Hello Nadir,

After several rounds of improving and bug fixing (Johm Hawkins, Adrian 
Dick and yourself) AXISCPP approaches usability for us.
But there is one real bummer left, namely AXISCPP-716 (Support for the 
attribute construct 'use').
This issue means (among other shortcomings), that it is not possible to 
detect, whether an optional attribute is present in the response or not.
I have attached (JIRA) two mails i got from Adrian Dick regarding this 
problem.
Would it be possible to look after this issue?
Given that you made some cleanup in the relevant code recently this one 
might be feasible for you?

Thanks and best regards

Franz


Nadir Amra schrieb:
> I have never tried putting out a release but will try in October.  If 
> someone else would be kind enough to give it a try, the sooner the better.
>
> Nadir K. Amra
>
>
> Kamlesh kumar <ka...@yahoo.com> wrote on 08/14/2006 11:41:28 AM:
>
>   
>> That's cool. Thanks for providing the complete fix.
>>
>> BTW, Can someone tell me when the Axis C++ 1.6 Final
>> version is going to be released ? 
>>
>>     
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>
>   


Axis C++ 1.6 Final

Posted by Nadir Amra <am...@us.ibm.com>.
I have never tried putting out a release but will try in October.  If 
someone else would be kind enough to give it a try, the sooner the better.

Nadir K. Amra


Kamlesh kumar <ka...@yahoo.com> wrote on 08/14/2006 11:41:28 AM:

> That's cool. Thanks for providing the complete fix.
> 
> BTW, Can someone tell me when the Axis C++ 1.6 Final
> version is going to be released ? 
> 



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


Re: Problems with XMLParserXerces

Posted by Kamlesh kumar <ka...@yahoo.com>.
That's cool. Thanks for providing the complete fix.

BTW, Can someone tell me when the Axis C++ 1.6 Final
version is going to be released ? 


--- Nadir Amra <am...@us.ibm.com> wrote:

> A more complete fix has been implemented, including
> a new method, 
> canParseMore() in the abstract base class that may
> be utilized in the 
> future. Basically bCanParseMore is saved in the
> class so that it is kept 
> across invocations...
> 
> Nadir K. Amra
> 
> 
> Kamlesh kumar <ka...@yahoo.com> wrote on
> 08/12/2006 01:38:42 PM:
> 
> > Hey,
> >   Thanks for providing the fix. Its better than
> before
> > but I see that there might still be some issues
> with
> > the new code. The problem is that the previous
> value
> > of bCanParseMore is lost when the next time
> someone
> > invokes next() function on XMLParserXerces and so
> it
> > can cause the program to crash. (Currently, we
> assume
> > that  its always ok to call the m_pParser->next
> the
> > first time, however its not a safe assumption.
> There
> > are places in SoapDeSerializer where in we ignore
> the
> > return value of next and so no way of knowing that
> we
> > have reached the end of stream)
> > 
> > If we have bCanParseMore as a class member
> variable
> > then we can avoid this issue. This value can be
> > initialized with the return value of
> > m_parser->parseFirst.
> > 
> > Let me know if I am not clear and I can try to
> provide
> > more details.
> > 
> > Thanks
> > -Kamlesh
> > 
> > 
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: Problems with XMLParserXerces

Posted by Nadir Amra <am...@us.ibm.com>.
A more complete fix has been implemented, including a new method, 
canParseMore() in the abstract base class that may be utilized in the 
future. Basically bCanParseMore is saved in the class so that it is kept 
across invocations...

Nadir K. Amra


Kamlesh kumar <ka...@yahoo.com> wrote on 08/12/2006 01:38:42 PM:

> Hey,
>   Thanks for providing the fix. Its better than before
> but I see that there might still be some issues with
> the new code. The problem is that the previous value
> of bCanParseMore is lost when the next time someone
> invokes next() function on XMLParserXerces and so it
> can cause the program to crash. (Currently, we assume
> that  its always ok to call the m_pParser->next the
> first time, however its not a safe assumption. There
> are places in SoapDeSerializer where in we ignore the
> return value of next and so no way of knowing that we
> have reached the end of stream)
> 
> If we have bCanParseMore as a class member variable
> then we can avoid this issue. This value can be
> initialized with the return value of
> m_parser->parseFirst.
> 
> Let me know if I am not clear and I can try to provide
> more details.
> 
> Thanks
> -Kamlesh
> 
> 


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


Re: Problems with XMLParserXerces

Posted by Nadir Amra <am...@us.ibm.com>.
Yes, I think I just took the easy way out :-)  I did recognize the fact 
that we should have the variable around as a state variable. Let me look 
into this a little more. 

Nadir K. Amra


Kamlesh kumar <ka...@yahoo.com> wrote on 08/12/2006 01:38:42 PM:

> Hey,
>   Thanks for providing the fix. Its better than before
> but I see that there might still be some issues with
> the new code. The problem is that the previous value
> of bCanParseMore is lost when the next time someone
> invokes next() function on XMLParserXerces and so it
> can cause the program to crash. (Currently, we assume
> that  its always ok to call the m_pParser->next the
> first time, however its not a safe assumption. There
> are places in SoapDeSerializer where in we ignore the
> return value of next and so no way of knowing that we
> have reached the end of stream)
> 
> If we have bCanParseMore as a class member variable
> then we can avoid this issue. This value can be
> initialized with the return value of
> m_parser->parseFirst.
> 
> Let me know if I am not clear and I can try to provide
> more details.
> 
> Thanks
> -Kamlesh
> 
> 
> 
> 
> 
> 
> 
> --- Nadir Amra <am...@us.ibm.com> wrote:
> 
> > I have fixed this problem.  See  AXISCPP-770  for
> > details.  Please try and 
> > see if your problem persists by downloading code and
> > testing.
> > 
> > Nadir K. Amra
> > 
> > 
> > Kamlesh kumar <ka...@yahoo.com> wrote on
> > 08/11/2006 09:41:21 PM:
> > 
> > > 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 */
> > >             m_Xhandler.freeElement();
> > >             bCanParseMore =
> > > m_pParser->parseNext(m_ScanToken);
> > >             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. I see someone else
> > have
> > > also faced this problem 
> > >
> >
> http://mail-archives.apache.org/mod_mbox/ws-axis-c-dev/200507.mbox/%
> > >
> >
> 3C256180486.1122544765692.JavaMail.jira@ajax.apache.org%3E
> > > 
> > > Can someone take a look into XMLParserXerces.cpp
> > and
> > > fix this problem ?
> > > 
> > 
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > axis-c-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail:
> > axis-c-dev-help@ws.apache.org
> > 
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
> 


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


Re: Problems with XMLParserXerces

Posted by Kamlesh kumar <ka...@yahoo.com>.
Hey,
  Thanks for providing the fix. Its better than before
but I see that there might still be some issues with
the new code. The problem is that the previous value
of bCanParseMore is lost when the next time someone
invokes next() function on XMLParserXerces and so it
can cause the program to crash. (Currently, we assume
that  its always ok to call the m_pParser->next the
first time, however its not a safe assumption. There
are places in SoapDeSerializer where in we ignore the
return value of next and so no way of knowing that we
have reached the end of stream)

If we have bCanParseMore as a class member variable
then we can avoid this issue. This value can be
initialized with the return value of
m_parser->parseFirst.

Let me know if I am not clear and I can try to provide
more details.

Thanks
-Kamlesh


 
 



--- Nadir Amra <am...@us.ibm.com> wrote:

> I have fixed this problem.  See  AXISCPP-770  for
> details.  Please try and 
> see if your problem persists by downloading code and
> testing.
> 
> Nadir K. Amra
> 
> 
> Kamlesh kumar <ka...@yahoo.com> wrote on
> 08/11/2006 09:41:21 PM:
> 
> > 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 */
> >             m_Xhandler.freeElement();
> >             bCanParseMore =
> > m_pParser->parseNext(m_ScanToken);
> >             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. I see someone else
> have
> > also faced this problem 
> >
>
http://mail-archives.apache.org/mod_mbox/ws-axis-c-dev/200507.mbox/%
> >
>
3C256180486.1122544765692.JavaMail.jira@ajax.apache.org%3E
> > 
> > Can someone take a look into XMLParserXerces.cpp
> and
> > fix this problem ?
> > 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail:
> axis-c-dev-help@ws.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: Problems with XMLParserXerces

Posted by Nadir Amra <am...@us.ibm.com>.
I have fixed this problem.  See  AXISCPP-770  for details.  Please try and 
see if your problem persists by downloading code and testing.

Nadir K. Amra


Kamlesh kumar <ka...@yahoo.com> wrote on 08/11/2006 09:41:21 PM:

> 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 */
>             m_Xhandler.freeElement();
>             bCanParseMore =
> m_pParser->parseNext(m_ScanToken);
>             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. I see someone else have
> also faced this problem 
> http://mail-archives.apache.org/mod_mbox/ws-axis-c-dev/200507.mbox/%
> 3C256180486.1122544765692.JavaMail.jira@ajax.apache.org%3E
> 
> Can someone take a look into XMLParserXerces.cpp and
> fix this problem ?
> 


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