You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Ivan <xh...@gmail.com> on 2011/05/26 14:35:04 UTC

Where to set the img/jpeg handler ?

Hi, while investigating a JAX-WS failure case, it uses DataHandler to
configure a attachment. After some investigation, I find that it is
caused by image/jpeg handler is not registered. In the past, we
configured it in the META-INF/mailcap file in the geronimo-javamail
component.
--->
text/plain;;
x-java-content-handler=org.apache.geronimo.javamail.handlers.TextPlainHandler
text/html;;
x-java-content-handler=org.apache.geronimo.javamail.handlers.TextHtmlHandler
text/xml;;
x-java-content-handler=org.apache.geronimo.javamail.handlers.TextXmlHandler

## These are not implemented in the reference implementation because
the required support
## is not available on server JVMs.
## image/gif;;
x-java-content-handler=org.apache.geronimo.javamail.handlers.ImageGifHandler
## image/jpeg;;
x-java-content-handler=org.apache.geronimo.javamail.handlers.ImageJpegHandler
## image/jpg;;
x-java-content-handler=org.apache.geronimo.javamail.handlers.ImageJpegHandler

multipart/*;;
x-java-content-handler=org.apache.geronimo.javamail.handlers.MultipartHandler
message/rfc822;;
x-java-content-handler=org.apache.geronimo.javamail.handlers.RFC822MessageHandler
<---
But they are commented for keeping compatible with the RI
implementation in https://issues.apache.org/jira/browse/GERONIMO-5415.
I think that the solution is to place a META-INF/mailcap file
somewhere to make the img handlers are registered, but the question is
what is the correct place ? I guess that in the JavaMail plugin is a
place, while it might be a litter strange to make the Axis2 plugin
depends on the JavaMail plugin. Thoughts ?
Thanks.

-- 
Ivan

Re: Where to set the img/jpeg handler ?

Posted by Ivan <xh...@gmail.com>.
In the r1129518, I added an extra configuration file in the
geronimo-webservice module, and I did the changes based on :
a. Considering the comments in the javamail mailcap file, since the jpeg
handler was commented out for RI compatibility, so it might not proper to
change the configurations there.
b. So far, web service module is the module which requires the jpeg handler
support, and geronimo-webservice is a dependent module for both Axis2 and
CXF server/client sides.
I am not sure whether there is better place to configure this, or even
another better solution, if any idea, please help to comment on it.
Thanks.

2011/5/26 Ivan <xh...@gmail.com>

> Hi, while investigating a JAX-WS failure case, it uses DataHandler to
> configure a attachment. After some investigation, I find that it is
> caused by image/jpeg handler is not registered. In the past, we
> configured it in the META-INF/mailcap file in the geronimo-javamail
> component.
> --->
> text/plain;;
>
> x-java-content-handler=org.apache.geronimo.javamail.handlers.TextPlainHandler
> text/html;;
>
> x-java-content-handler=org.apache.geronimo.javamail.handlers.TextHtmlHandler
> text/xml;;
> x-java-content-handler=org.apache.geronimo.javamail.handlers.TextXmlHandler
>
> ## These are not implemented in the reference implementation because
> the required support
> ## is not available on server JVMs.
> ## image/gif;;
>
> x-java-content-handler=org.apache.geronimo.javamail.handlers.ImageGifHandler
> ## image/jpeg;;
>
> x-java-content-handler=org.apache.geronimo.javamail.handlers.ImageJpegHandler
> ## image/jpg;;
>
> x-java-content-handler=org.apache.geronimo.javamail.handlers.ImageJpegHandler
>
> multipart/*;;
>
> x-java-content-handler=org.apache.geronimo.javamail.handlers.MultipartHandler
> message/rfc822;;
>
> x-java-content-handler=org.apache.geronimo.javamail.handlers.RFC822MessageHandler
> <---
> But they are commented for keeping compatible with the RI
> implementation in https://issues.apache.org/jira/browse/GERONIMO-5415.
> I think that the solution is to place a META-INF/mailcap file
> somewhere to make the img handlers are registered, but the question is
> what is the correct place ? I guess that in the JavaMail plugin is a
> place, while it might be a litter strange to make the Axis2 plugin
> depends on the JavaMail plugin. Thoughts ?
> Thanks.
>
> --
> Ivan
>



-- 
Ivan