camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Rosenberg" <>
Subject Mail component ContentTypeResolver SPI customization
Date Wed, 07 Dec 2011 01:46:42 GMT
I'm having trouble understanding how to use a custom ContentTypeResolver
for the mail component using Spring.

Here is my Spring XML:
  <camel:contextScan />
<bean id="mail" class="org.apache.camel.component.mail.MailComponent">
  <property name="contentTypeResolver">
    <bean class="com.crlcorp.oasis.routing.util.CRLContentTypeResolver"

I'm retrieving the attachment in the processor as follows:
DataHandler dh =
String contentType = dh.getContentType();

For testing I have the ContentTypeResolver always return the same value.
However, the value that gets returned by dh.getContentType() is
Am I missing a step to get the CamelContext to recognize the customized
MailComponent?  I have tried using the same Spring XML setting the value
on the MailEndpoint as well.

Application versions:
Camel 2.7.0
Spring 3.0.5.RELEASE

Any help is appreciated.



The information in this message, and any attachment, is intended for the 
sole use of the individual and entity to whom it is addressed. This 
information may be privileged, confidential, and protected from 
disclosure. If you are not the intended recipient you are hereby notified 
that you have received this communication in error and that any review, 
disclosure, dissemination, distribution or copying of it, or its contents, 
is strictly prohibited. If you think that you have received this message 
in error please notify the sender and destroy all copies of this 
communication and any attachments. Thank you.

View raw message