cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: Sending big file attachments
Date Wed, 05 Sep 2007 22:22:00 GMT

Note:  what Jeff describes is available in the latest SNAPSHOT's, but is 
note yet available in a released version.   It will be in 2.0.2.

Dan


On Wednesday 05 September 2007, Jeff.Yu wrote:
> Hi, Bruno
>
> See comments inline.
>
> Thanks
>
> Verachten Bruno wrote:
> > Hi,
> >
> >> Hmm... if you are getting an error at that point, it looks
> >> like the mtom stuff isn't working.
> >
> > My config files weren't taken into account. I had to add some code
> > to the server too:
> > SOAPBinding binding = (SOAPBinding)((javax.xml.ws.BindingProvider)
> > port).getBinding();
> > binding.setMTOMEnabled(true);
> >
> > It now works like a charm.
> >
> >> occur on the wire) or, if the attachment hits a certain threashold
> >> (I think 64K by default, I'd have to check), it starts using
> >> temporary files on disk.
> >
> > Do we have any control on that? File location, buffer size, and so
> > on?
>
> Yes, we have two arguments which you can set, they are: temp file dir
> and the threshold.
> You can set the location and threshold by using below code:
>
> message.put(AttachmentDeserializer.ATTACHMENT_MEMORY_THRESHOLD,
> "102400"); //100K as default threshold for using temp dir.
> message.put(AttachmentDeserializer.ATTACHMENT_DIRECTORY, "C:\\temp");
>
> You can refer to JIRA for detail.
> https://issues.apache.org/jira/browse/CXF-888
>
> > Thanks a lot,
> >
> > Bruno Verachten



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog

Mime
View raw message