You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Prashanth Narayanan <pr...@yahoo.com> on 2002/05/07 00:55:22 UTC

hostname of client : it works : now, the real issue ...

thanks jonathan and virender - it works like a charm:

now for the actual problem :-)
i am trying to implement some form of security for a
webservice i created. a basic way is to check the
hostname and restrict it to trusted urls. but this is
not always practical because we want trusted users to
connect from anywhere.
a username and password? alas, without ssl, the
simplicity of text-only xml turns out to be its
drawback! how do you send authentication information
for webservices? is private/public key and an arbit
algorithm the only way to go?
please help ...
thanks again,
prash.

--- Jonathan Chawke <j_...@hotmail.com> wrote:
> Sorry, Hotmail ran away with itself before I
> finished the previous mail. The 
> previous mail should have read:
> 
> Yes, you can use the SOAPContext object to access
> the container's HTTP 
> request object
> [javax.servlet.http.HttpServletRequest].
> You can then call getRemoteHost() to get the remote
> hostname (or the IP 
> address if the name cannot be determined).
> See
> http://xml.apache.org/soap/faq/faq_chawke.html#Q2_38
> and 
>
http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/ServletRequest.html#getRemoteHost()
> Hope that helps,
> Jonathan.
> 
> 
> 
> >From: "Jonathan Chawke" <j_...@hotmail.com>
> >Reply-To: soap-user@xml.apache.org
> >To: soap-user@xml.apache.org
> >Subject: Re: hostname of client machine?
> >Date: Mon, 06 May 2002 09:36:10 +0100
> >
> >Yes, you can use the SOAPContext object to access
> the conHTTP request
> >object. See
>
>http://xml.apache.org/soap/faq/faq_chawke.html#Q2_38
> >Hope that helps,
> >Jonathan.
> >
> >>From: Prashanth Narayanan <pr...@yahoo.com>
> >>Reply-To: soap-user@xml.apache.org
> >>To: soap-user@xml.apache.org
> >>Subject: hostname of client machine?
> >>Date: Sun, 5 May 2002 20:12:12 -0700 (PDT)
> >>
> >>hi all,
> >>   is there any way to find the hostname of the
> machine
> >>that is making the request to a webservice? iam
> using
> >>apache2.2 on iplanet 6.0sp4.
> >>   thanks,
> >>   prash.
> >>
> >>__________________________________________________
> >>Do You Yahoo!?
> >>Yahoo! Health - your guide to health and wellness
> >>http://health.yahoo.com
> >
> >
> >
> >
>
>_________________________________________________________________
> >Chat with friends online, try MSN Messenger:
> http://messenger.msn.com
> >
> 
> 
> 
> 
>
_________________________________________________________________
> Send and receive Hotmail on your mobile device:
> http://mobile.msn.com
> 


=====
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Prashanth L.Narayanan
Baton Rouge International, Inc.
Day: 408.342.3616
http://www.prash.net

__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com