This documentation is for WSO2 Enterprise Service Bus version 5.0.0. For the latest ESB, view the latest WSO2 Enterprise Integrator documentation.

All docs This doc

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Parameter NameDescription
Payload Media-TypeThis parameter is used to specify whether the message payload should be created in JSON, XML or text.
Payload Format

Define Inline: If this is selected, the payload format can be defined within the PayloadFactory mediator configuration by entering it in the text field which appears. To add content to the payload, enter variables for each value you want to add using the format $n (starting with 1 and incrementing with each additional variable, i.e., $1, $2, etc.). You will then create arguments in the same order as the variables to specify each variable's actual value.

Pick from Registry: If this is selected, an existing payload format which is saved in the Registry can be selected. Click either Governance Registry or Configuration Registry as relevant to select the payload format from the resource tree.


This section is used to add an argument that defines the actual value of each variable in the format definition. The arguments must be entered in the same order as the variables in the format, so that the first argument defines the value for variable $1, the second argument defines the value for variable $2, etc. An argument can specify a literal string (e.g., "John") or an XPath or JSON expression that extracts the value from the content in the incoming payload.


If you already know the argument is XML, to avoid the PayloadFactory mediator throwing an error when the argument value begins with an html tag, add the following attribute:


e.g., <arg deepCheck="false" evaluator="xml" expression="ctx:variable1">


You can configure the mediator using XML. Click switch to source view in the Mediator window.