Define the WSDL Message Parts and Operation
The mime.wsdl document defines two messages, Document and DocumentList, as follows:
<message name="Document">
<part name="name" type="xsd:string"/>
<part name="document" type="xsd:base64Binary"/>
<message name="DocumentList">
<part name="documents" element="tns:Documents"/>
<message name="Void"/>
The message Document contains two parts, including a name as an xsd:string, and a document of type xsd:base64binary. Message DocumentList contains one part, documents, which is of type DocumentPairList as defined in the above types element.
The messages Document and DocumentList are passed in two request/response operations:
<portType name="DocumentManagerPortType">
<operation name="AddDocument">
<input message="tns:Document"/>
<output message="tns:Void"/>
<operation name="GetDocuments">
<input message="tns:Void"/>
<output message="tns:DocumentList"/>
The WSDL excerpt above defines two operations, AddDocument and GetDocuments. The operation AddDocument sends a document name and part containing the document's contents. The contents are sent as an explicitly referenced MIME attachment. The operation GetDocuments returns a MIME document that contains a list of document names and keys, along with a set of unreferenced MIME attachments. We can then look up the documents contents in the MIME attachments list via the swaRef links provided in the DocumentList.