mime-entity
The mime-entity function returns a MIME entity. The MIME entity is created from the content supplied to the content argument, and has the media type supplied to the type argument.

Languages
Built-in.
Parameters
Name | Type | Description |
---|---|---|
content-type | mf:MediaType | The media type that describes this MIME entity, for example: image/png. |
content | xs:base64Binary | The actual data encoded using the Base64 encoding scheme. You can encode such data by using the charset-encode function. |
Example
The following mapping calls a Web service that expects unstructured text submitted via POST requests.

In the mapping above, the input text is supplied as parameter to the mapping, with the help of a simple input component, see Supplying Parameters to the Mapping. The string received as input is converted to binary form with the help of the charset-encode function, using the utf-8 encoding. The mime-entity function takes the binary content as argument and returns the body of the request (the MIME entity), which is mapped to the Body input of the Web service call.