Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
ramakanth reddy
Webservice in Liferay
May 9, 2013 8:11 AM
Answer

ramakanth reddy

Rank: Junior Member

Posts: 28

Join Date: April 17, 2013

Recent Posts

Hi All

I need to write a seperate application which connects to external Database(not Liferay Demoticon and expose a web service class which can be called in Liferay,so could you please suggest the best apporach to acheive this in Liferay or Liferay has any build-in feature for this.


Regards
Ramakanth
Prakash Khanchandani
RE: Webservice in Liferay
May 9, 2013 8:43 AM
Answer

Prakash Khanchandani

Rank: Expert

Posts: 329

Join Date: February 10, 2011

Recent Posts

Tell me if I have understood it correctly:

1) You want to create an application which will host a web-service. That expose few methods via web-service.
2) Now this web-application is different from liferay (ofcourse) and connects to a different database other than Liferay database.
3) You want to also create a web-service client in Liferay which would consume this web-service from the web-application.

So you need help in creating a web-service client in liferay which would consume the web-service of the web-application?
David H Nebinger
RE: Webservice in Liferay
May 9, 2013 9:34 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11046

Join Date: September 1, 2006

Recent Posts

ramakanth reddy:
I need to write a seperate application which connects to external Database(not Liferay Demoticon and expose a web service class which can be called in Liferay,so could you please suggest the best apporach to acheive this in Liferay or Liferay has any build-in feature for this.


Yep, it's called Service Builder. You can hook up to an external database, you can enable remote service on your entity, and you'll end up with a complete liferay-compatible web service layer that exposes your entities.
ramakanth reddy
RE: Webservice in Liferay
May 9, 2013 8:22 PM
Answer

ramakanth reddy

Rank: Junior Member

Posts: 28

Join Date: April 17, 2013

Recent Posts

Hi Prakash

Thanks for your reply,

Yes you are right,as per my requirement all external database connections logic's should be written in separate application and expose them via web service.

So here external application will be Web service producer and Liferay will be web service consumer,so does Liferay has any support for this or do i need to achieve on my own.

Regards
Ramakanth
Prakash Khanchandani
RE: Webservice in Liferay
May 13, 2013 12:05 AM
Answer

Prakash Khanchandani

Rank: Expert

Posts: 329

Join Date: February 10, 2011

Recent Posts

I think David's suggestion won't work for you since you want it the other way round i.e. having database connection to be handled by an external application instead of connecting through liferay.

So as far as I know you liferay does not have any built-in support to create Web-service clients or consumer, so in short you have to achieve it on your own.