I'm writing a CXF WS to upload some large files - up to 1GB. In most cases they won't be >10-15MB, but the problem is that it is ineffective to load the file and send it as regular byte[] using the standard binding. For that reason a custom interceptor might be needed but I'm not sure it is the only option as well as how to write it. 10x
+2
A:
CXF supports the MTOM specification, which as well as providing a more transmission-efficient encoding for binary data, but also provides a more flexible API for binding using JAXB. This decouples the binary data from byte[]
and replaced it with a DataHandler
, which allows you to source the data from streams, rather than byte[]
. This applies both to client and server ends of the connection.
skaffman
2010-10-03 15:42:18