留言板
custom service
Hi,
I would like connect this portlet with a mobile app with a framework. I have a portlet that using jdbc standard not service builder, so i can t use service builder.
Is it possible to create a service that is not tied to a local service but on logical "custom" (custom service?) and authenticate with the public service?.
i would like to extend the functionality of the portlet that if i expose a class i can call them as a web service "automatically" by the standard path Liferay API / jsonws / portlet / ...
Regards
Michele
I would like connect this portlet with a mobile app with a framework. I have a portlet that using jdbc standard not service builder, so i can t use service builder.
Is it possible to create a service that is not tied to a local service but on logical "custom" (custom service?) and authenticate with the public service?.
i would like to extend the functionality of the portlet that if i expose a class i can call them as a web service "automatically" by the standard path Liferay API / jsonws / portlet / ...
Regards
Michele
Hi Michele,
Hmm... you're really making you life more difficult than you need to with this approach. Out of curiosity, why do you have an non-service builder implementation?
Having said that, one idea that comes to mind might be to use a struts action hook. You can create this hook such that a particular URL will invoke your action, and provided you don't make it part of the auth.public.paths accessing the url will require credentials. You can pass credentials as part of accessing this URL of course (I've done this before using curl for example). You hook then could access your JAR that contains the service that you use with your external JDBC implementation. You portlet would, I assume, access the same jar. It does mean, if you haven't already, splitting out the classes that do the actual JDBC work into a separate library (something SB does for you automatically).
That might be something to try -- though I am always curious to know why people opt out of SB, so please share if you have time
Hmm... you're really making you life more difficult than you need to with this approach. Out of curiosity, why do you have an non-service builder implementation?
Having said that, one idea that comes to mind might be to use a struts action hook. You can create this hook such that a particular URL will invoke your action, and provided you don't make it part of the auth.public.paths accessing the url will require credentials. You can pass credentials as part of accessing this URL of course (I've done this before using curl for example). You hook then could access your JAR that contains the service that you use with your external JDBC implementation. You portlet would, I assume, access the same jar. It does mean, if you haven't already, splitting out the classes that do the actual JDBC work into a separate library (something SB does for you automatically).
That might be something to try -- though I am always curious to know why people opt out of SB, so please share if you have time
Andrew Jardine:
Hi Michele,
Hmm... you're really making you life more difficult than you need to with this approach. Out of curiosity, why do you have an non-service builder implementation?
:-) Only because it was a old portlet. The "backend" of the portlet is a mantis outside, then does not use the service of Liferay to access the data (because they are on another D but jdbc standard.
Is there an option to turn it into a Service Builder portlet but continue to use the external database? This is possible with SB -- you just need to specify a data-source attribute at the entity level and provide some configurations to tell it where and how to connect to the external data store.