[opencms-dev] OpenCms 6: Retrieve content from OpenCms outside the application scope
opencms at biberbeatz.de
opencms at biberbeatz.de
Mon Sep 26 11:06:46 CEST 2005
Hi list,
I have some questions to a scenario which hast been discussed quite a
long time ago and was based on the OpenCms 5 version.
I have a web application (portlet) running on a different server than
the OpenCms is running and I want to retrieve content from the
OpenCms VFS (only read). The content is maintained through OpenCms. I
found some scenarios in the list how this could be achieved but I
need some more details.
Anyone out there that developed kind of solution?
The main problem is: Accessing the CmsObject:
As far as I know, can the CmsObject only be accessed as long as the
other application is in the same application scope and is not
serializable. Are there any new possibilities in version 6 now, e.g.
providing a API which is remote accessible?
http://mail.opencms.org/pipermail/opencms-dev/2004q3/012175.html
Following soloutions might solve this problem (some are based on
solutioins provided by the mailinglist):
1) Implementing a web service via RPC or SOAP:
Provide a web service that act as a server on OpenCms side that is
started e.g. via the OpenCms servlet. Therefore the web service has
access to the CmsObject because it is in the same application scope.
This web service has to be called by the portlet handing over the
specific content url and returns the content that was requested by
the portlet.
That's the theory.
Does anyone ever implemented and can provide me some more details how
to implement kind of a web service? Maybe some code examples?
Someone on the list implemented such a solutiuon:
http://mail.opencms.org/pipermail/opencms-dev/2003q4/007887.html
2) Create a portlet including the OpenCms libraries:
I was thinking about the following solution:
- Create a portlet including the Opencms libraries
- Create database connection to the OpenCms database (the same way
OpenCms does)
- Create an instance of the CmsObject
- Use all functions of the OpenCms API
Is such a solution possible and did anyone ever developed such a
solution?
The open question for me is how to achieve the "connection". I was
looking into the CmsShell code and the Servletcode but did not find
how to make OpenCms accessible via API without the servlet.
What steps have to be done in the portlet?
3) Use e.g. EJB to store data
Write code that stores the needed objects and data e.g. in an EJB to
make it remote accessible.
http://mail.opencms.org/pipermail/opencms-dev/2003q4/007981.html
I would like to know which solution you would advise or maybe you
have another solution I have not thought of.
Thanks in advcance.
Best regards,
Jan
More information about the opencms-dev
mailing list