MTOM (Message Transmission Optimization Mechanism)
INTRODUCTION
This sample demonstrates the capabilities and power of MTOM. MTOM Web Service accepts a
fileName and DataHandler. This DataHandler contains the binary content which will eventually save to a
temporary location to the given fileName.
Prerequisites
Apache Ant 1.6.2 or higher.
Running the Sample:
- Use "ant generate.service" or just "ant" command in the CARBON_HOME/samples/MTOM/ to build the
service.
- Generated service (MTOMSample.aar) gets copied to the $CARBON_HOME/repository/services
automatically.
- Start WSAS server using $CARBON_HOME/bin/wso2wsas.sh or $CARBON_HOME/bin/wso2wsas.bat.
- Use the script run-client.sh or run-client.bat file to invoke the client using arguments
-file {file that need to be send to the service} -fileName {name to be copied on server side} ex:
./run-client.sh -file /tmp/wwe.jpg -fileName wresting.jpg
Note
Sometimes, if you're having trouble running the client successfully,
It may be necessary to clean the services repository before you generate the service, deploy it
and run the client. (i.e. delete services created from previous samples.)