Pranav Pal
Pranav Pal

Reputation: 275

Getting mule message properties in a Jersey resource component class

I have a REST service flow in Mule:

<flow name="rest-service">
    <inbound-endpoint address="http://localhost:9099"/>
    <logger message="API request received from #[header:INBOUND:MULE_REMOTE_CLIENT_ADDRESS]" level="INFO" />
    <jersey:resources>
        component class="com.example.rest.MyResource"/>
    </jersey:resources>
</flow> 

I want to get the MULE_REMOTE_CLIENT_ADDRESS property inside the component class MyResource. I tried implementing MuleContextAware but was not able to retrieve message properties from MuleContext object.

Any other way to get the message properties? I am using Mule 3.2.0.

Upvotes: 2

Views: 420

Answers (1)

Related Questions