Win a copy of React Cookbook: Recipes for Mastering the React Framework this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Frits Walraven
  • Himai Minh

Problems reading the request.inputStream()

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi to all!
I have this question on how to process some information of a SOAP message before it reaches the AxisServlet.
I have a Struts applicacion that can fire a web service, some client in some other computer and platform (.NET) executes this web service as usual.
In my struts action, if everything goes alright, i forward the request to axisServlet and execute my webservice.
But, i want to handle the soap message before forwading to the axis servlet, cause i want to check some soap message params.
The problem is that when i get the message from the request:

Message requestMsg = new Message(request.getInputStream(),false, ...)

And the I do something like getting the SOAP Part:


I am consuming the inputStream from the request, so if everything is ok, and then forwading to the axis servlet I get the following error:

faultString: org.xml.sax.SAXParseException: Premature end of file.

Which simply means that the inputStream is not closed, but it is locked and has no "available" bytes to read, so is very much the same like having no soap message, throwing that SAX exception because there is no a xml to read actually.
How coud i solve this issue? or is there any othr way to preprocess the soap message in my action?

TY very much!!!
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
See whether you can use Axis Handler ??
Quick! Before anybody notices! Cover it up with this tiny ad:
the value of filler advertising in 2021
    Bookmark Topic Watch Topic
  • New Topic