[MOBY-dev] logging ip requests from moby MoSeS genereated service

Martin Senger senger at ebi.ac.uk
Sat Apr 29 21:26:05 UTC 2006


Hi,
> I need to log some data about the use of the webservices generated by
> MoSeS. One of the things is the IP address of the caller. Is there any
> sensible way to do it from the webservice implementing class?
> 
   I have added it there (into org.biomoby.service.BaseService). Now you
can call from your implementation class (because it inherits from the
BaseService via generated skeleton):

   String remoteAddr = getCallerAddr();

   Be aware, however, that it may not return an address on the real
Biomoby client, but of some proxy which is in between. But for that, I am
helpless.

   Cheers,
   Martin

-- 
Martin Senger
   email: martin.senger at gmail.com
   skype: martinsenger





More information about the MOBY-dev mailing list