On Wed, 2010-09-15 at 10:22 +0100, Florian Müller wrote:
> I hope I have some answers for you.
Thanks! That seems to fix most my problems :)
> We still use the tools that were available when we started OpenCMIS
> (Maven 2 and jaxws-rt 2.1.7). Since we didn't run into any problem with
> that we had never changed it. Also Maven 3 doesn't seem to be widely
> used yet. We may should start a discussion moving to jaxws-rt 2.2 but I
> don't think will adopt Maven 3 anytime soon.
It's worth noting that the current Eclipse Maven plugin already uses
version 3 internally, and that even if you don't adopt Maven 3 for
*building* OpenCMIS yourself, this will prevent anyone easily *using*
OpenCMIS within their Maven 3 environment/projects. And not only is it
a problem for me as a user of OpenCMIS, but then my software won't
automatically build for my users either :( Your call though.
> There is no (official) way to get a URL that returns the document
> content for a simple reason: It doesn't work with the Web Services
> binding. With the Web Services binding there is always a Web Services
> wrapper around the content. There is no plain content URL by definition
> and it might not even be transported via HTTP.
>
> If you are only using the AtomPub binding there are two ways to achieve
> what you want.
> 1) You can get the content URL from OpenCMIS' internal binding cache.
> It's not supported, it's not a public API and it might change in the
> future. If you still want to do that, please contact me and I will send
> you a code snippet that gets you the URL.
I take it this implies you don't care to create a supported public API
for AtomPub users? :(
I tried to sniff around and see if I could figure out (1) myself.
Looking at how the atompub.ObjectServiceImpl.getContentStream()
retrieves content, that made me want to try something like:
public static final String getDocumentURL(final Document document, final
Session session) {
return
((ObjectServiceImpl)session.getBinding().getObjectService()).loadLink(session.getRepositoryInfo().getId(),
document.getId(), AtomPubParser.LINK_REL_CONTENT, null);
}
Except that won't work because AbstractAtomPubService.loadLink() is
protected. I couldn't find any way to get access to the LinkCache or
spi.Session either.
So, please, help enlighten me?
Again, Much Thanks! :)
--
Chris Hubick
mailto:[email protected]
http://www.hubick.com/chris/