cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Krzysztof Malinowski <>
Subject Re: MTOM difference of results
Date Tue, 23 Feb 2010 11:42:47 GMT

Thank for some tips!

I separated my service client from EE environment, then correct CXF jars was
In this case I got result without any exceptions, but some strange.

When I turned on service inside Spring when I tried to process DataHandler
on client side I had some empty
stream (size of bytes 0)

If I turned on the same service without Spring as light server, then on
client side processing DataHandler got expectated result - stream had some

Below I put the significant part, preparing the stream on server side:
import javax.activation.DataHandler;
import javax.jws.WebService;


public class DocServiceImpl implements IDocService {

	public Document document() {
		// TODO Auto-generated method stub
		final String DATA = "<html><body><h1>Hello John B.</h1></body></html>";
		ByteArrayDataSource source = new ByteArrayDataSource(DATA.getBytes(),
		Document doc = new Document("text/html", new DataHandler(source));
		return doc;


What's going on?

dkulp wrote:
> This sounds like a Mail provider issue of some sort.   We generally ship
> (and 
> use) the geronimo-mail jar (geronimo-javamail_1.4_spec-1.6.jar) and the 
> InternetHeaders object in there wouldn't be using the com/sun stuff.   It 
> looks like you are picking up a different mail jar and thus 
> config/classloaders or similar may be different.   My suggestion would be
> to 
> check your classpath and such for various mail jars.
> Dan
> On Mon February 22 2010 10:32:22 am Krzysztof Malinowski wrote:
>> Hi,
>> I my previous post I notified problem shortly. Let me add some details.
>> I observed some different results, when I turn on my service, which
>> exposes
>> some data based on MTOM.
>> One, correct if I turned on service via JaxWsServerFactoryBean (we can
>> simply say in native CXF way).
>> And, wrong if I do the same in Spring environment.
>> In the second case I can't get any data, even some simple, outside MTOM
>> mechanism. I notice the begin of exception stack like this:
>> (...)
>> Exception in thread "main" java.lang.NoClassDefFoundError:
>> com/sun/mail/util/LineInputStream
>> 	at javax.mail.internet.InternetHeaders.load(
>> 	at javax.mail.internet.InternetHeaders.<init>(
>> (...)
>> During the test I have set it up the logging interceptors, so inside the
>> inInterceptor I notice interested part of respose message, but with some
>> additional binary part.
>> In the first way, when I started service without Spring the entry of log
>> was clear.
>> Obviouslly, in both tests I based on the same SEI and its implementation
>> class.
>> Regards
>> Krzysztof
> -- 
> Daniel Kulp

View this message in context:
Sent from the cxf-user mailing list archive at

View raw message