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

    Server

    diegomemo

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

      thanks

      P.S.
      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

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

          • 2. Re: Server
            nehring

            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
            www.newparticles.com

            • 3. Re: Server
              diegomemo

              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

              bye.


              PS: Sorry for my bad english.