You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Benson Margulies <bi...@gmail.com> on 2010/07/16 16:27:22 UTC

putting the 'document' back into document/literal

I find myself looking at creating a service where I want a return
value which is, in fact, an XML document. I don't want any binding, I
don't even want a DOM tree. Essentially, I want an MTOM binding on a
byte[] of XML so that I can do whatever I need to do with it. (As it
happens, I'm sticking my toe into RDF).

Just declare byte[] and use the usual MTOM setup technique?

Re: putting the 'document' back into document/literal

Posted by Daniel Kulp <dk...@apache.org>.
On Friday 16 July 2010 10:27:22 am Benson Margulies wrote:
> I find myself looking at creating a service where I want a return
> value which is, in fact, an XML document. I don't want any binding, I
> don't even want a DOM tree. Essentially, I want an MTOM binding on a
> byte[] of XML so that I can do whatever I need to do with it. (As it
> happens, I'm sticking my toe into RDF).
> 
> Just declare byte[] and use the usual MTOM setup technique?

I'm not sure if I'd use a byte[] or a DataHandler, but the idea would be the 
same.    The DataHandler would allow some level of streaming and much better 
handling of larger payloads.   I'm not sure if that's important for your use 
case though.   If it's all smaller stuff, byte[] would be fine.


-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog