SOAP with Attachments
While XML-based message processing has many advantages, at times you may need to send data as an attachment to a SOAP message rather than embedding it directly into the XML document. This is desirable when the data is of a binary format, such as images, WAV files, PDF documents, and even a separate XML document.
The W3C supports this functionality through its SOAP Messages with Attachments (SwA) specification. This specification describes how to embed a SOAP message inside of a Multipurpose Internet Mail Extensions (MIME) document so that the message processing is not changed.
In WSDL, a MIME attachment’s format is defined concretely by the binding, while its datatype is defined in the WSDL types element or in a referenced or embedded XML Schema.
HydraExpress generates code to support the MIME bindings as defined in a WSDL document. HydraExpress complies with the W3C’s SOAP Messages with Attachments specification (, and Section 5 of the WSDL 1.1 specification defining MIME bindings ( HydraExpress is also interoperable and compliant with the Web Services Interoperability Organization’s WS-I Attachments Profile 1.0 specification (
This chapter includes a discussion of the SwA specification, how it is implemented in HydraExpress, and how to send SOAP messages with MIME attachments.