Hi, I believe by default CXF use the stream way, that said, web service 1 should be able to reuse the data handler by default if you only have one attachment.
You may need elaborate your scenario a little bit, also, take a look at the related discussion here[1] [1]http://cxf.547215.n5.nabble.com/Provider-with-MTOM-Stream-td5725571.html ------------- Freeman(Yue) Fang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://fusesource.com | http://www.redhat.com/ Twitter: freemanfang Blog: http://freemanfang.blogspot.com http://blog.sina.com.cn/u/1473905042 weibo: @Freeman小屋 www.camelone.org : The open source integration conference: On 2013-5-23, at 上午11:20, Urmila & Sunil Bapat wrote: > We have a scenario where a web service client calls a MTOM web service, > which in turn calls another MTOM web service to get the data, as shown > below. > > Client ----> MTOM web service 1 ---> MTOM web service 2 > > Both MTOM web services return objects which contain DataHandler annotated > by @XmlMimeType("application/octet-stream"). > > Can the MTOM web service 1, simply return the same dataHandler object in > it's response to the client, that it got from MTOM web service 2? > > Currently, MTOM web service 1 copies the contents of the data handler > returned from service 2, and creates a new data handler to return to the > client. Instead, can the same data handler object that is being returned by > service 2, be passed back to the client in service 1 response? Would there > be any problems? > > Thanks > Sunil.
