private MessageContext createMessageContext(AxisEngine engine,HttpServletRequest req,HttpServletResponse res,Component component){
  MessageContext msgContext=new MessageContext(engine);
  String requestPath=getRequestPath(req);
  if (isDebug) {
    log.debug("MessageContext:" + msgContext);
    log.debug("HEADER_CONTENT_TYPE:" + req.getHeader(HTTPConstants.HEADER_CONTENT_TYPE));
    log.debug("HEADER_CONTENT_LOCATION:" + req.getHeader(HTTPConstants.HEADER_CONTENT_LOCATION));
    log.debug("Constants.MC_HOME_DIR:" + String.valueOf(homeDir));
    log.debug("Constants.MC_RELATIVE_PATH:" + requestPath);
    log.debug("HTTPConstants.MC_HTTP_SERVLETLOCATION:" + String.valueOf(webInfPath));
    log.debug("HTTPConstants.MC_HTTP_SERVLETPATHINFO:" + req.getPathInfo());
    log.debug("HTTPConstants.HEADER_AUTHORIZATION:" + req.getHeader(HTTPConstants.HEADER_AUTHORIZATION));
    log.debug("Constants.MC_REMOTE_ADDR:" + req.getRemoteAddr());
    log.debug("configPath:" + String.valueOf(webInfPath));
  }
  msgContext.setTransportName("http");
  msgContext.setProperty(Constants.MC_HOME_DIR,homeDir);
  msgContext.setProperty(Constants.MC_RELATIVE_PATH,requestPath);
  msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLET,this);
  msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST,req);
  msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETRESPONSE,res);
  msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETLOCATION,webInfPath);
  msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETPATHINFO,req.getPathInfo());
  msgContext.setProperty(HTTPConstants.HEADER_AUTHORIZATION,req.getHeader(HTTPConstants.HEADER_AUTHORIZATION));
  msgContext.setProperty(lucee.runtime.net.rpc.server.Constants.COMPONENT,component);
  msgContext.setProperty(Constants.MC_REMOTE_ADDR,req.getRemoteAddr());
  ServletEndpointContextImpl sec=new ServletEndpointContextImpl();
  msgContext.setProperty(Constants.MC_SERVLET_ENDPOINT_CONTEXT,sec);
  String realpath=context.getRealPath(requestPath);
  if (realpath != null) {
    msgContext.setProperty(Constants.MC_REALPATH,realpath);
  }
  msgContext.setProperty(Constants.MC_CONFIGPATH,webInfPath);
  return msgContext;
}

private MessageContext createMessageContext ( AxisEngine engine , HttpServletRequest req , HttpServletResponse res , Component component ) { MessageContext msgContext = new MessageContext ( engine ) ; String requestPath = getRequestPath ( req ) ; if ( isDebug ) { log . debug ( "MessageContext:" + msgContext ) ; log . debug ( "HEADER_CONTENT_TYPE:" + req . getHeader ( HTTPConstants . HEADER_CONTENT_TYPE ) ) ; log . debug ( "HEADER_CONTENT_LOCATION:" + req . getHeader ( HTTPConstants . HEADER_CONTENT_LOCATION ) ) ; log . debug ( "Constants.MC_HOME_DIR:" + String . valueOf ( homeDir ) ) ; log . debug ( "Constants.MC_RELATIVE_PATH:" + requestPath ) ; log . debug ( "HTTPConstants.MC_HTTP_SERVLETLOCATION:" + String . valueOf ( webInfPath ) ) ; log . debug ( "HTTPConstants.MC_HTTP_SERVLETPATHINFO:" + req . getPathInfo ( ) ) ; log . debug ( "HTTPConstants.HEADER_AUTHORIZATION:" + req . getHeader ( HTTPConstants . HEADER_AUTHORIZATION ) ) ; log . debug ( "Constants.MC_REMOTE_ADDR:" + req . getRemoteAddr ( ) ) ; log . debug ( "configPath:" + String . valueOf ( webInfPath ) ) ; } msgContext . setTransportName ( "http" ) ; msgContext . setProperty ( Constants . MC_HOME_DIR , homeDir ) ; msgContext . setProperty ( Constants . MC_RELATIVE_PATH , requestPath ) ; msgContext . setProperty ( HTTPConstants . MC_HTTP_SERVLET , this ) ; msgContext . setProperty ( HTTPConstants . MC_HTTP_SERVLETREQUEST , req ) ; msgContext . setProperty ( HTTPConstants . MC_HTTP_SERVLETRESPONSE , res ) ; msgContext . setProperty ( HTTPConstants . MC_HTTP_SERVLETLOCATION , webInfPath ) ; msgContext . setProperty ( HTTPConstants . MC_HTTP_SERVLETPATHINFO , req . getPathInfo ( ) ) ; msgContext . setProperty ( HTTPConstants . HEADER_AUTHORIZATION , req . getHeader ( HTTPConstants . HEADER_AUTHORIZATION ) ) ; msgContext . setProperty ( lucee . runtime . net . rpc . server . Constants . COMPONENT , component ) ; msgContext . setProperty ( Constants . MC_REMOTE_ADDR , req . getRemoteAddr ( ) ) ; ServletEndpointContextImpl sec = new ServletEndpointContextImpl ( ) ; msgContext . setProperty ( Constants . MC_SERVLET_ENDPOINT_CONTEXT , sec ) ; String realpath = context . getRealPath ( requestPath ) ; if ( realpath != null ) { msgContext . setProperty ( Constants . MC_REALPATH , realpath ) ; } msgContext . setProperty ( Constants . MC_CONFIGPATH , webInfPath ) ; return msgContext ; }
place the request message in the messagcontext object - notice that we just leave it as a ' servletrequest ' object and let the message processing routine convert it - we don ' t do it since we don ' t know how it ' s going to be used - perhaps it might not even need to be parsed .
