3 Replies Latest reply on Jun 30, 2004 5:27 AM by diegomemo


    diegomemo Newbie

      I've to exctract the HTTP Header for the message send to client.
      How can i do it?


      this is a my service:

      public class testHelloWorld
      public testHelloWorld() {


      public String getHelloWorldMessage(String name){
      return "Hello world to " + name;

        • 1. Re: Server
          Thomas Diesler Master

          You will have to provide your own pivot point handler, replacing HTTPSender

          • 2. Re: Server
            Lance Nehring Newbie

            You can get the MessageContext from Axis and then get the HttpServletRequest from that context.

            For example, to get the remote host from within a Axis SOAP service, I do something like this:

            MessageContext msgctx = AxisEngine.getCurrentMessageContext();
            HttpServletRequest req = (HttpServletRequest) msgctx.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);
            String remoteHost = req.getRemoteHost();

            Best regards,
            Lance Nehring

            • 3. Re: Server
              diegomemo Newbie

              Thank you... that's ok...you save my life... but if you are in localhost the istructin: getRemoteHost() return the localhost.
              You can useing : getHeader("User-Agent")

              thanks you very much


              PS: Sorry for my bad english.