The SOAP with Attachments API for Java (SAAJ) Specification can be found at the following location:
http://java.sun.com/xml/downloads/saaj.html
The specification includes sample client code.