Altova MapForce 2025 Enterprise Edition

The decode-mime-entity function returns a string that represents the MIME entity decoded using the charset parameter included in the Content-Type header of the entity. If no charset was specified, you can supply a default encoding, by connecting the desired string value to the default-encoding parameter.

mf-func-decode-mime-entity

 

Languages

Built-in.

 

Parameters

Name

Type

Description

mime-entity

mf:MimeEntity

The MIME entity to be decoded.

default-encoding

xs:string

The default encoding to use when no encoding was specified in the charset parameter.

 

Example

The following mapping calls a Web service that returns JSON content.

mf-func-decode-mime-entity-example-01

When this mapping runs, the result of the Web service call is supplied as input to the decode-mime-entity function. The function decodes the "raw" body returned by the call according to the charset parameter of the Content-Type header. The result is as follows:

mf-func-decode-mime-entity-example-02

© 2018-2024 Altova GmbH