Question

Although there are matches for "rest" and "service" in the components pallet, those don't give you <http:rest-service-component httpMethod="GET" serviceUrl="..." />.

And if you manually add it to the XML, Mule Studio doesn't seem to know what to do with it.

Or perhaps it can't be a top level component in a flow?

What I'm trying to do:

  • In a flow, call out to another web service
  • Grab the resulting JSON and use it
  • Use Basic Authentication; I've seen examples where include username/password in the URL itself
  • The other service uses https

Perhaps it's no longer needed? Maybe there's a more generic way to call other services and fetch data as part of a flow, maybe somehow using endpoints?

http:rest-service-component is still listed in the Mule doc, though they don't really show examples of it being used to fetch info. Here are a couple examples that show it being used to fetch, although most examples I find on Google seem to talking about inbound connections.

Was it helpful?

Solution

You don't really need a special component to call a REST service. It is just a normal HTTP call, so you can use http:outbound-endpoint. The rest-service-component wrapper provides very little additional value, so I think that's why it is generally not used.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top