AJAX Connector

AJAX is an acronym for Asynchronous JavaScript and XML, a cluster of related technologies that facilitate the creation of asynchronous Web applications. The AJAX Connector, which can be configured as an inbound or outbound endpoint, creates a transport channel to send messages asynchronously to and from an AJAX server, which communicates with external Web resources.

Typically, the AJAX endpoint connects your Mule flow to an external web page, which can exchange information with a user somewhere in the Cloud. A JavaScript client attached to the webpage listens for user input, which it sends through the AJAX endpoint to your flow for processing.

Typically, the channel that the AJAX server and the AJAX endpoint use for communication is configured though a Global Element template known as a Connector Configuration.


Configuration of an AJAX endpoint typically requires two steps:

  1. Decide where you want to place the AJAX endpoint within your Mule flow, then drag it from the Palette to the appropriate place in the sequence of building blocks that make up your Mule flow.

    1. If you place the AJAX endpoint at the beginning of the flow, it will act as an inbound endpoint (i.e., your message source).

    2. If you place the AJAX building block in the middle or at the end of the flow, it will serve as an outbound endpoint.

  2. Configure the AJAX endpoint (and the Connector Configuration it depends on to define its transport channel) by providing values for the fields on the various tabs on the AJAX endpoint properties editor, which you open by double-clicking the AJAX icon on the Message Flow canvas.

Configure the tabs as shown.

General Tab

Property Description

Display Name

Defaults to the generic endpoint name, which in this case is AJAX. Change the display name, which must be alpha-numeric, to reflect the endpoint’s specific role, such as Interactive Opinion Poll Connection.


Specify the channel over which your AJAX endpoint communicates with the client web page. For example, /services/echo.

Connector Configuration

Use the dropdown list to select a previously configured connector configuration for this endpoint. If you have not created a connector configuration for this type of endpoint, you can do so from this window by clicking Add. Click Edit to modify a previously created global element.

Advanced Tab

Property Description


Enter the address for this endpoint, such as http://localhost:8081/file.

Response timeout

Specify how long the endpoint must wait for a response (in ms). The default is 1000 ms.


Choose from a drop-down list the character set used for message data. (such as UTF-8).

Disable Transport Transformer

Check this box if you do not want to use the endpointโ€™s default response transport.


Select from the dropdown list one of the formats this endpoint supports.

Cache Messages

(Applies to outbound AJAX endpoint only). Check this box to enable the dispatcher to cache messages. Messages will only be cached if no clients are subscribed to the channel.

Message Cache Size

(Applies to outbound AJAX endpoint only). Enable Cache Messages, then select the cache size. Default cache size is 1024.

Connector Endpoint

Use the drop-down list to select a previously configured global endpoint template, if any exist. If you have not created a global element for this type of endpoint, you do so by clicking Add and completing the fields on the pane that appears. Click Edit to modify a previously created global element.

Enable default events tracking

Enable default business event tracking for this endpoint.

Transformers Tab

Field Description

Request Transformer References

Enter a list of synchronous transformers that will be applied to the request before it is sent to the transport.


For details on setting the properties for an AJAX endpoint using an XML editor, see the AJAX Transport Reference discussion in the Mule ESB User Guide.

Was this article helpful?

๐Ÿ’™ Thanks for your feedback!

Edit on GitHub
Submit your feedback!
Share your thoughts to help us build the best documentation experience for you!
Take our latest survey!