Documentation

##### WSO2 WSAS 2.2-RC1

- Release Notes
- Contents
- Home

##### Downloads

- Releases

##### Documentation

- User Guide
- FAQs
- Installation Guide
- Source
- Running Behind a Proxy
- Data Services Guide
  - RDBMS Data Source
  - CSV Data Source
  - Excel Data Source
  - JNDI Data Source
- EJB Guide
- Clustering Guide
- JMX Guide
- XKMS Guide
- Changing Keys

##### Samples

- Chad
- Commodity Quote
- Data Services
- Flickr
- Javascript
- Jaxws
- JiBX
- Mtom
- STS
- Trader
- Tiny URL
- Metadata Exchange
- WS-Transfer
- XML Key Managment Specification
- Cluster Management

##### API Documentation

- Java Docs

##### Tools

- Code Generation
- Change Password
- Eclipse IDE Integration
- TCP Monitor
- WSDL2Code
- WSDL View
- Try It
- AAR Validation
- MAR Validation

##### Resources

- News

##### Get Involved

- Mailing Lists
- Integration

##### Project Information

- Project Team
- Issue Tracking
- License

# 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.)