cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Roberts <>
Subject Re: MTOM trivial case
Date Mon, 14 Jan 2008 16:15:56 GMT
Benson Margulies wrote:
> I want to use MtoM to ship non-XML-1.0 text. So, I'd just as soon
> declare String properties, not DataHandlers. Does anyone know if this is
> likely to work? 

It should work if you're going WSDL-first - define your element as type 
xsd:base64Binary and add xmime:expectedContentType="text/plain". 
Starting from Java it didn't quite work for me.  With:

String myMethod(@XmlMimeType("text/plain") String myParam)

the generated schema had the xmime:expectedContentType on myParam but 
the element type was still xsd:string, so not MTOM-able.  It may be more 
successful if you write your own RequestWrapper class with annotations 
to force the type to xsd:base64Binary, but I gave up at that point and 
just made my parameters byte[] instead (the tools I'm passing the data 
on to are equally happy with an InputStream as with a StringReader).


Ian Roberts               | Department of Computer Science  | University of Sheffield, UK

View raw message