From the example at http://ws.apache.org/axis2/1_0/mtom-guide.html I see that I should set ENABLE_MTOM to true
But - I don't see how to use this object on the stub files generated by WSDL2Java. I can copy the code from the stub (basically the contents of populateAxisService() to return a AxisService object, create a new ServiceClient with the AxisService object, then set the stub's ServiceClient to this new value.ServiceClient serviceClient = new ServiceClient ();
Options options = new Options();
options.setTo(targetEPR);
options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
serviceClient .setOptions(options);
The net result is that everything works fine now but extremely slowly. Sending between two processes on the same machine hits a limit of around 180K/second - over a order of magnitude slower than what I was expecting (I'm sending files that are around 3MB in size). I'm running this on a new Macbook Pro - everything else is quite zippy.
So - if I want speed I think there are two alternatives:
1) Someone will point out the magic combination of API calls to enable MTOM with my generated code - or
2) If this is just a client-side problem - perhaps I code up a OMElement interface on the client side to set the ENABLE_MTOM parameter to be TRUE?
Other suggestions welcomed :-)
Thanks...
Sean
