Search code examples
web-servicesesbapache-servicemix

ServiceMix 4 communicate with external WebService


Currently, I have a WebService which accepts HTTP Post requests, containing byte array of WAV files. This works completely fine. It then gives back XML results of WAV file metadata. I test this by sending curl commands and looking at the output given back. The question I have is, in my opinion, a very basic ServiceMix question. It's just this one part I'm stuck on. How would I send this curl command to ServiceMix, and have it forward it along to the external WebService? In the future, I will have numerous WebServices, that give different types of data about the WAV file, in different XML formats, and I'll want ServiceMix to handle routing and parsing the results accordingly. Before I can embark on that, I need to figure how the heck to just send a single request through ServiceMix, and to a WebService. Is it a WAR file that sits in ServiceMix deploy? An OSGi bundle? A blueprint.xml file? I truly have no idea, so any help to steer me in the right direction, would be great.


Solution

  • Take a look at camel documentation How to use camel as a http proxy between a client and server . You could build a camel route and deploy the bundle in servicemix to proxy to your webservice