I have a simple WS that uses MTOM/XOP. I'm using JBossAS 4.0.5 and JBossWS 2.0.1 GA.
I have the following annotations on the service class
@WebService(name="E2PIService", serviceName="E2PIService") @BindingType(value=javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_MTOM_BINDING) @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
@WebMethod(operationName="transferFile", action="transferFile")
@XmlMimeType("application/octet-stream")
public long transferFile(@XmlMimeType("application/octet-stream")javax.activation.DataHandler data)
SOAPBinding binding = (SOAPBinding)((BindingProvider)service).getBinding();
binding.setMTOMEnabled(true);
FileDataSource fds = new FileDataSource(new File("/bigData.dat"));
long d = service.transferFile(new DataHandler(fds));
I am also interested in this too... trying to use JbossWS to upload files