In this “Inbound Outbound Properties” tutorial of Mule 4 we will look on how we can set and modify Mule Inbound and Outbound Properties.
In Mule Inbound properties referees to the additional information that comes to an Mule API along with the message body/payload itself. It may consist of inbound Headers, Query Params, URI Params, HTTP method etc.
In Mule Inbound properties are preset by the sender of the message thus cannot be added or modified.
Mule Outbound Properties are headers and properties that Mule API set before ending its request to other external systems.
In Mule 3 we used to access inbound properties by
Whereas in Mule 4 we access these properties by
We have create a simple project using RAML.
The GET method of the RAML has URI Param – user_id, which can assess by
Similarly to access Query Param we do it by
To view all the Inbound Properties that are received by a Mule API:
As in Mule 3 we used to set outbound properties via using Set Property Component.
In Mule 4, outbound properties no longer exist. Instead, the headers or properties (e.g. HTTP headers or JMS properties) that you wish to send as part of a request or message (e.g. HTTP request or JMS message) respectively are now configured explicitly as part of the connector operation configuration.
To Set the outbound HTTP headers and HTTP status code for a Mule API we need to modify the HTTP Listener Configuration.
SoapUI Output –