[SoapRMI] xpp potential cleanup/reset problem
CHEN,SHIH-CHANG (HP-NewJersey,ex2)
shih-chang_chen_at_hp.com
Fri, 26 Jul 2002 16:27:21 -0400
Hi,
I am using xpp3_1_08a inside a Servlet to do SOAP processing.
I found that if I keep a reference to a parser instance in
the Servlet for reuse, I get following error very often(but not always).
org.xmlpull.v1.XmlPullParserException: already reached end document
(position: END_DOCUMENT seen </SOAP:Body></SOAP:Envelope>... @1:433)
at org.xmlpull.mxp1.MXParser.parseEpilog(MXParser.java:1374)
at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1282)
at org.xmlpull.mxp1.MXParser.next(MXParser.java:1047)
If I create a parser for each request, this problem goes away,
but performance degrades a little bit (3%). From the javadoc,
I learned that xpp parser should be reusable. Whenever we set
a new source to the parser, it also resets the parser. Do I need
to do any thing for that ?
Many thanks,
-chen