cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Basile Clout" <>
Subject Mtom attachment with Aegis databinding for a DynamicClientFactory client
Date Wed, 05 Nov 2008 13:29:16 GMT
Hi all,

I'm trying to implement a web service that needs to be able to send
and receive files with MTOM.

On the server side, I use ServerFactoryBean() with an aegis
databinding and setting MTOM with setMtomEnabled(). Sending a file
from the server to the client uses MTOM, as required.

On the client side, is there a way to enable MTOM on a
DynamicClientFactory? I cant seem to make mtom work on the client

I tried to set up a context for my DynamicClientFactory client with a Map:

Map<String, Object> context = new HashMap<String, Object>();
context.put("mtom-enabled", Boolean.TRUE);
context.put("mtom-threshold", 0);

and then

QName qname = new
BindingOperationInfo op =

if (op.isUnwrappedCapable()) {
op = op.getUnwrappedOperation();
response = client.invoke(op, objs, context);
} else {
response = client.invoke(name, objs, context);

But sending a message from the client to the server does not use MTOM,
but the good old base64binary.
Did I miss something?

im using Apache Cxf 2.1.3 with Java5

Thanks for your help!

View raw message