Hi Ulf,
managed to get the personId using the following:-
protected void simulateLogin(HttpServletRequest request)throws Exception
{
InputStream inStream=request.getInputStream();
InputStreamReader reader = new InputStreamReader(inStream);
BufferedReader bReader = new BufferedReader(reader);
String soapBody=bReader.readLine();
String personId =getMessageValue("personId",soapBody);
}
but after calling the above I pass the soap req/resp to the Axis2 engine as follows:-
RequestDispatcher dispatcher = request.getRequestDispatcher(requestURI);
dispatcher.forward(request, response);
This usually works ok, but since I have called simulateLogin I get the following error:-
org.apache.axis2.AxisFault: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog at [row,col {unknown-source}]: [1,0] on server
Do I need to clone the HttpServletRequest going into simulateLogin due to it doing a read
I have tried writting the following to clone HttpServletRequest but this did not work
class CustomRequestWrapper implements Cloneable
{
private HttpServletRequest request=null;
public CustomRequestWrapper(HttpServletRequest request)
{this.request=request;}
public CustomRequestWrapper(){ }
public HttpServletRequest getHttpServletRequest(){
return request;
}
public Object clone()
{
CustomRequestWrapper clone = new CustomRequestWrapper();
clone.request=request;
return clone;
}
}
Any ideas