Search code examples
ajaxmulecometd

Can I obtain the client IP from a Mule AJAX inbound endpoint?


With the Mule Ajax connector, is it possible to determine the IP address of the client?

<ajax:inbound-endpoint channel="/services/testservice" connector-ref="AjaxConnector" responseTimeout="10000" doc:name="AJAX Test"/>
<logger message="#[What Would I put here to get me the client IP]" level="INFO" doc:name="Logger"/>

Solution

  • OMG, the CometD version used by Mule is older than dinosaurs !

    Mule is basically using version 0.x from almost 10 years ago, when CometD was still under the org.mortbay.cometd namespace.

    Since then, CometD graduated to an independent project under the org.cometd namespace.

    CometD is currently at version 3.x, and the current APIs do have a way to retrieve the IP address of the client.

    Someone with a JIRA login please file an issue to Mulesoft.