|jersey multipart support? [message #872639]
||Wed, 16 May 2012 14:05
I'm trying to realise a file upload via REST with gyrex. To do so I want to use the jersey multipart implementation, but it does not seem to be supported by now. I'm currently using the targetplattform provided eclipsecon tutorial.
Unfortunately I was unable to find a updatesite with the missing jersey components (ageto github does only provide the core as far as I could see). My try to deploy the jersey multipart jar and mimepull as osgi bundles had also no effect. I assume there is some wrapping necessary to register the MultipartReader for the Multipart entity.
I'm new to gyrex and jersey, so it might be possible that I miss something, so does anybody have an idea or advise for me?
|Re: jersey multipart support? [message #874640 is a reply to message #872639]
||Mon, 21 May 2012 09:53
Am 16.05.2012 16:05, schrieb Jürgen Albert:
> To do so I want to use the jersey multipart implementation, but it
> does not seem to be supported by now. I'm currently using the
> targetplattform provided eclipsecon tutorial.
I just checked and the target platform does not include the multipart
support. It includes the Jersey "bundle" which contains all other Jersey
jars but non of the jars from the "contribs" package. The advantage of
the "bundle" is that it doesn't need a 'DynamicImport-Package: *'.
> Unfortunately I was unable to find a updatesite with the missing
> jersey components (ageto github does only provide the core as far as
> I could see).My try to deploy the jersey multipart jar and mimepull
> as osgi bundles had also no effect. I assume there is some wrapping
> necessary to register the MultipartReader for the Multipart entity.
It may work if you replace the Jersey bundle with the individual jars
from the Jersey project. They are already OSGi bundles. However, they
add some activator logic to scan OSGi bundles for possible
META-INF/services contributions which adds imports dynamically and
creates interesting runtime wirings.
I went with the "all-in-one" bundle initially because it makes things
easier without the dynamic imports. As an alternative you can convert
the multi-part bundle into a fragment to the "all-in-one" bundle. This
should make the content of the META-INF/services visible to the
"all-in-one" bundle for loading. I prepared bundles and uploaded
binaries to new GitHub repos.
Can you try to replace the Jersey bundles in the local target platform
with the 6 bundles from the downloads above? Let me know if it works.
Looks like a nice addition.
Powered by FUDForum
. Page generated in 0.02109 seconds