문제

I have a Flow in MULE which contains a HTTP inbound and component class like below :

<flow name="MetaService">
    <http:inbound-endpoint address="http://localhost:8000/jcore/meta/user"  
transformer-refs="HttpParams" responseTransformer-refs="JavaObjectToJson">
    </http:inbound-endpoint>
    <component class = "com.jcore.Meta" />
</flow>

Now if i have to accept request for another URL, like "localhost:8000/jcore/meta/user2", i have to create another flow..!!

Is there any option in MULE like "localhost:8000/jcore/meta/{variable}" , where in i can read that variable and call the appropriate component class according to that..??

도움이 되었습니까?

해결책

  • Consider creating JAX-RS annotated resources and the Jersey Module so all this URL-based dispatching will be done automatically for you.
  • Otherwise, just bind MetaService to "http://localhost:8000/jcore/meta", then have a choice router that looks at the actual request path ("/jcore/meta/user" or "/jcore/meta/user2") and dispatch to the right destination accordingly.
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top