Fóruns

Início » Liferay Portal » English » 3. Development

Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
Dimitrios Karageorgopoulos
Obtain external client IP from web service
22 de Junho de 2012 05:55
Resposta

Dimitrios Karageorgopoulos

Ranking: New Member

Mensagens: 18

Data de entrada: 1 de Junho de 2012

Mensagens recentes

Dear all,

I have implemented a web service using Service Builder in Liferay 6.0.

I want to obtain the extrnal client's IP addressin my *ServiceImpl class where the implementation of my web service methods reside.

I've seen that PortalUtil has a getHttpServletRequest that can lead to a getRemoteAddr funtion but getHttpServletRequest requires a PorletRequest object as input parameter that I do not know how I can get it from
Andew Jardine
RE: Obtain external client IP from web service
22 de Junho de 2012 18:30
Resposta

Andew Jardine

Ranking: Regular Member

Mensagens: 151

Data de entrada: 22 de Dezembro de 2010

Mensagens recentes

The ServiceContext object has a getRemoteAddr() method on it as well. Can you use that one?
Dimitrios Karageorgopoulos
RE: Obtain external client IP from web service
25 de Junho de 2012 01:41
Resposta

Dimitrios Karageorgopoulos

Ranking: New Member

Mensagens: 18

Data de entrada: 1 de Junho de 2012

Mensagens recentes

Hi Andrew,

do you know how I can get a reference to the ServiceContext from my *ServiceImpl.java where my web services reside?
Dimitrios Karageorgopoulos
RE: Obtain external client IP from web service
1 de Julho de 2012 01:46
Resposta

Dimitrios Karageorgopoulos

Ranking: New Member

Mensagens: 18

Data de entrada: 1 de Junho de 2012

Mensagens recentes

I tried a com.liferay.util.axis.ServletUtil which has a getRequest that returns an HttpServletRequest that has a getRemoteAddr() but did not work .
I got a org.apache.catalina.loader.WebappClassLoader.loadClass exception for com.liferay.util.axis.ServletUtil
Giuseppe Pantaleo
RE: Obtain external client IP from web service
8 de Agosto de 2012 06:21
Resposta

Giuseppe Pantaleo

Ranking: New Member

Mensagens: 15

Data de entrada: 18 de Junho de 2012

Mensagens recentes

Hi Dimitrios,
have you found a solution for this issue?