Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problems reading the request.inputStream()

 
Ricuzzo Ric
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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:

requestMsg.getSOAPPart();

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!!!
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See whether you can use Axis Handler ??
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic