Paul O.
Paul O.

Reputation: 15

Alternative way for dynamic inbound endpoint for Mule 3

I am working on migrating my Mule 2 project to Mule 3. However, since Mule 3.3 stop supporting dynamic inbound endpoint, I need to find an alternative way to rewrite my inbound endpoint.

Basically, I want to make http call to get some data from specific websites by using current system time as the query parameter. My codes in mule-config.xml is like the following

<flow name="RetrieveNewsService">
    <http:inbound-endpoint host="www.awebsite.com" port="80" path="datacenter/someData.asp?category=1&amp;date=[function:dateStamp:MMddyyyy]" connector-ref="RetrieveNewsPollingHttpConnector" exchange-pattern="one-way" />
    //doing some process
</flow>

I feed current time for "path" part, and it works perfect in Mule 2, but get the exception mentioning about dynamic inbound endpoint is not supported anymore.

Anyone has any idea how to rewrite the dynamic path for inbound endpoint and what is the purpose they decide to stop this feature? Thanks for your time!

Upvotes: 0

Views: 763

Answers (1)

David Dossot
David Dossot

Reputation: 33413

You can use a poll on an HTTP outbound-endpoint as demonstrated here:

<flow name="RetrieveNewsService">
  <poll frequency="10000">
    <http:outbound-endpoint method="GET" host="localhost"
        port="8082" path="test?dtm=#[server.dateTime.format('MMddyyyy')]"
        exchange-pattern="request-response" />
  </poll>

  //doing some process
</flow>

PS. No idea why.

Upvotes: 2

Related Questions