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

--
Ian Roberts               | Department of Computer Science
[EMAIL PROTECTED]  | University of Sheffield, UK

Reply via email to