it seems like I asked the question a little earlier :) Here is a jax-ws code example with MTOM .. I cud manage it yourself.
I heard and read that even with the 2 + mtom axis there are some problems. The documentation is also very bad in axis2. Also the performance is doubtful (although with XMLBeans they are not sure about ADB) ... link: http://weblogs.java.net/blog/kohsuke/archive/2007/02/jaxws_ri_21_ben.html
package webservice; import java.io.File; import javax.activation.DataHandler; import org.jvnet.staxex.StreamingDataHandler; public class Main { public static void main(String[] args) {
Server side
package com.xxx.LabelGeneration; import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebService; import javax.xml.ws.soap.MTOM; import javax.activation.DataHandler; import javax.activation.FileDataSource; @WebService() @MTOM public class LabelGenerator { @WebMethod(operationName = "getFile") public DataHandler getFile(@WebParam(name = "name") String fileName) {
R samant
source share