Return-Path: Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 92284 invoked by uid 500); 15 Aug 2003 20:17:56 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 92273 invoked from network); 15 Aug 2003 20:17:56 -0000 Message-ID: <20030815201801.57062.qmail@web80704.mail.yahoo.com> Date: Fri, 15 Aug 2003 13:18:01 -0700 (PDT) From: Justin Avaya Subject: Re: client Ip address To: axis-user@ws.apache.org, balajidl@yahoo.com MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-450406449-1060978681=:56975" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N --0-450406449-1060978681=:56975 Content-Type: text/plain; charset=us-ascii Hi, I am writing a simple RPC using JAVA and then using AXIS. I am not sure where to implement the request handler that Vladmir suggested. I tried adding it to the RPC method itself [I am sure it is wrong but it was giving me null] Looking forward for your help. package exportbean; import javax.xml.rpc.handler.MessageContext; import javax.servlet.*; import javax.servlet.http.*; public class Animal { public String walk() { return "Animal is walking"; } } Vladimir & justin, The HandlerUtil.MC_HTTP_SERVLETREQUEST is notworking, its returning null value(for me)..the HTTPConstants.MC_HTTP_SERVLETREQUEST is workingfine. --- Vladimir Umansky wrote: >> You can get it through MessageContext:> > handleRequest(MessageContext context) {> > ......> // HttpServletRequest may not be available> HttpServletRequest req = null;> > // get it from Axis> if>(context.containsProperty(HandlerUtil.MC_HTTP_SERVLETREQUEST))> {> req = (HttpServletRequest)>context.getProperty(HandlerUtil.MC_HTTP_SERVLETREQUEST);> }> > .......> if ( req != null ) {> req.getRemoteAddr();> req.getRemoteHost();> }> > > > --- Justin Avaya wrote:> > Hi, > > I am writing a simple Java program and using> Apache> > Axis to generate the web service. I am writing the> > server. I need to capture the IP address of the> > client who is trying to connect to me to log him> in> > my database. In a servelt I would use the request> > object. How do I do it here.> > > > Thank you for your help.> > regards,> > Subbiah> > > __________________________________> Do you Yahoo!?> Yahoo! SiteBuilder - Free, easy-to-use web site> design software> http://sitebuilder.yahoo.com http://search.yahoo.com.au - Yahoo! Search- Looking for more? Try the new Yahoo! Search --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software --0-450406449-1060978681=:56975 Content-Type: text/html; charset=us-ascii
Hi,
I am writing a simple RPC using JAVA and then using AXIS. 
I am not sure where to implement the request handler that Vladmir suggested.
I tried adding it to the RPC method itself [I am sure it is wrong but it was giving me null]
Looking forward for your help.
package exportbean;
import javax.xml.rpc.handler.MessageContext;
import javax.servlet.*;
import javax.servlet.http.*;
public class Animal {
    public String walk() {
 return "Animal is walking";
    }
}
 

 
Vladimir & justin,
 The HandlerUtil.MC_HTTP_SERVLETREQUEST is not
working, its returning null value(for me)..
the HTTPConstants.MC_HTTP_SERVLETREQUEST is working
fine.

 --- Vladimir Umansky <vladumansky@yahoo.com> wrote: >

> You can get it through MessageContext:
> 
> handleRequest(MessageContext context) {
> 
> ......
>         // HttpServletRequest may not be available
>         HttpServletRequest req = null;
> 
>         // get it from Axis
>         if
>
(context.containsProperty(HandlerUtil.MC_HTTP_SERVLETREQUEST))
> {
>             req = (HttpServletRequest)
>
context.getProperty(HandlerUtil.MC_HTTP_SERVLETREQUEST);
>         }
> 
> .......
>         if ( req != null ) {
>             req.getRemoteAddr();
>             req.getRemoteHost();
>         }
> 
> 
> 
> --- Justin Avaya <justavaya@hotmail.com> wrote:
> > Hi, 
> > I am writing a simple Java program and using
> Apache
> > Axis to generate the web service. I am writing the
> > server. I need to capture the IP address of the
> > client who is trying to connect to me to log him
> in
> > my database. In a servelt I would use the request
> > object. How do I do it here.
> > 
> > Thank you for your help.
> > regards,
> > Subbiah
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> http://sitebuilder.yahoo.com 

http://search.yahoo.com.au - Yahoo! Search
- Looking for more? Try the new Yahoo! Search


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software --0-450406449-1060978681=:56975--