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.
Running the Sample
-
Use "ant generate.service" or just "ant" command in the Axis2_HOME/sample/MTOM/
to build the service.
-
Generated service (MTOMSample.aar) gets copied to the
$WSO2WSAS_HOME/repository/services automatically.
-
Start WSAS server using $WSO2WSAS_HOME/bin/wso2wsas.sh or
$WSO2WSAS_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.)