Hi,
When I use XmlObject.Factory.parse(InputStream is) to read the request object's
InputStream for request type application/xml I sporadically get errors as
attempting to read from a closed stream. This problem happens directly when I
read it from a spring controller or via cxf.
To fix this I had to parse the inputstream to a string and then construct the
xmlobject from the string. By default the cxf xmlbeans provider reads the
stream directly and cannot be used as such.
To test this:
public ModelAndView handleRequest(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException, Exception {
XmlObject.Factor.parse(request.getInputStream());
}
Try hitting the webpage multiple times and you will the exception.
Any suggestions?
Thanks,
Suire.