Define the MIME Bindings
The MIME binding defines the MIME type multipart/related for the message response. Let’s look at the binding for the AddDocument and GetDocuments operations:
 
<binding name="DocumentManagerBinding" type="tns:DocumentManagerPortType">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="AddDocument">
<soap:operation soapAction="adddocument"/>
<input>
<mime:multipartRelated> <!-- 1 -->
<mime:part>
<soap:body use="literal"
namespace="http://www.roguewave.com/rwsf/webservice/examples"
</mime:part>
<mime:part>
<mime:content part="document" type="*/*"/> <!-- 2 -->
</mime:part>
</mime:multipartRelated>
</input>
<output>
<soap:body use="literal"
namespace="http://www.roguewave.com/rwsf/webservice/examples"
</output>
</operation>
<operation name="GetDocuments">
<soap:operation soapAction="getdocuments"/>
<input>
<soap:body use="literal"
namespace="http://www.roguewave.com/rwsf/webservice/examples"/>
</input>
<output>
<mime:multipartRelated>
<mime:part>
<soap:body use="literal"
namespace="http://www.roguewave.com/rwsf/webservice/examples"/>
</mime:part>
</mime:multipartRelated>
</output>
</operation>
</binding>
//1 Defines the binding for the input message’s multipart mime attachment, consisting of two mime parts, one the body of the message, the other the image.
//2 Defines a referenced attachment (see below), tied to the document part. Note the type indicates that any MIME type is allowed for this attachment.