/n software Connectors for MuleSoft

Questions / Feedback?

ResponseHeaders Property

A collection of resposne headers.

Data Type

String

Default Value

""

Remarks

This property holds an object of response headers that may be assigned to the HTTP response.

In a typical scenario a HTTP listener is used to receive the original request and send the response because the connector does not have a webserver of its own. The connector will process the request and generate the response, but will rely on the HTTP Listener to relay the response back to the client. In order to configure the HTTP Listener to relay the response to the client, follow the below steps.

In the Mule HTTP Listener's Responses section set the Body to #[attributes.ResponseBody]. Then, add a new header with value 'Content-Type' and value attributes.ResponseHeaders.'Content-Type'.

The corresponding Configuration XML may look like:


<http:response >
				<http:body ><![CDATA[#[attributes.ResponseBody]]]></http:body>
				<http:headers ><![CDATA[#[output applicaton/java
---
{
	"Content-Type" : attributes.ResponseHeaders.'Content-Type'
}]]]></http:headers>
</http:response>

Note: This property is not available at design time in the receiver, but will be detected from the incoming AS4 message and made available as a message context attribute.

This property is not available in the Sender.

Copyright (c) 2022 /n software inc. - All rights reserved.
/n software Connectors for MuleSoft - Version 20.0 [Build 8318]