title: Getting "HttpServletRequest" in soapMessageContext - Axis Handler
body: <p>I am trying to get "HttpServletRequest" in an AxisHandler's "handleMessage" method.
  My AxisHandler implements "SOAPHandler" as seen below code..</p>
  
  <p>I need to get "HttpServletRequest" in "InBoundDirection", but it returns "null".</p>
  
  <p>How can I get "HttpServletRequest" in "InBoundDirection" of SOAPHandler ?</p>
  
  <p>Thank you..</p>
  
  <pre><code>@Override
  public boolean handleMessage(SOAPMessageContext soapMessageContext) {
      boolean direction = ((Boolean) soapMessageContext.get(SOAPMessageContext.MESSAGE_OUTBOUND_PROPERTY)).booleanValue();        
      if (direction) {
          System.out.println("direction = outbound");
      } else {
          System.out.println("direction = inbound");
          HttpServletRequest servletReq=(HttpServletRequest) soapMessageContext.get(MessageContext.SERVLET_REQUEST);
          // BECAUSE servletReq is null the following line returns a "nullPointerException"
          System.out.println(servletReq.getRemoteHost()); 
      }
      return true;
  }
  </code></pre>