Thank you. 

I wonder if it's a bug in CXF that the JavaFirst trick doesn't work? Or
is there an @XmlElement trick to specify base64Binary for the string?



On Mon, 2008-01-14 at 16:15 +0000, Ian Roberts wrote:
> 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
> 

Reply via email to