Consuming Liferay Remote Spring HttpInvoker [RESOLVED]

thumbnail
Rishi Dev Gupta,修改在14 年前。 Expert 帖子: 255 加入日期: 08-11-23 最近的帖子
Hi all

I need to consume liferay remote services exposed using spring httpinvoker

I am getting this error
org.apache.jasper.JasperException: org.springframework.remoting.RemoteAccessException: Could not access HTTP invoker remote service at [http://localhost:8080/tunnel-web/secure/spring/com_liferay_portal_service_spring_UserService-http]; nested exception is java.io.IOException: Did not receive successful HTTP response: status code = 401, status message = [Unauthorized]
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:491)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


Any idea what i am missing here

I am using liferay 6 community
thumbnail
jelmer kuperus,修改在14 年前。 Liferay Legend 帖子: 1191 加入日期: 10-3-10 最近的帖子
You need to supply the correct username and password to access the services via basic authentication

See : http://www.liferay.com/community/forums/-/message_boards/message/5504664
thumbnail
Rishi Dev Gupta,修改在14 年前。 Expert 帖子: 255 加入日期: 08-11-23 最近的帖子
thanks jk, the approach worked, i can go with it...

but is there a option to do this thing using spring bean xml definitions
thumbnail
jelmer kuperus,修改在14 年前。 Liferay Legend 帖子: 1191 加入日期: 10-3-10 最近的帖子
Sure, just make the SimpleHttpInvokerRequestExecutor subclass into it's own class and wire it up in xml
thumbnail
Rishi Dev Gupta,修改在14 年前。 Expert 帖子: 255 加入日期: 08-11-23 最近的帖子
gret got it working
thumbnail
Masroor Khan,修改在14 年前。 Regular Member 帖子: 124 加入日期: 08-9-9 最近的帖子
Hi,

Is there any possibilities to invoke our custom services through Liferay Remote Spring HttpInvoker.



Regards,

Masroor Khan