-
1. Re: Single URL for many rest services
mageshbk Sep 24, 2015 5:19 AM (in response to maciavelli)Which version of SwitchYard are you using? It is possible to deploy more jars to the same context.Here are two jars split from rest-binding quickstart that deploys to the url
http://localhost:8080/rest-binding
Each jar has one service each, part2 has http://localhost:8080/rest-binding/warehouse and part1 has http://localhost:8080/rest-binding/order
Just copy the two jars to SwitchYard 2.0 enabled EAP/AS7 deployments folder and see.
-
2. Re: Single URL for many rest services
maciavelli Sep 25, 2015 6:18 AM (in response to mageshbk)Hello, Magesh. I am using SY 2.0. I tried using same context path for 2 jars but only the last will be used. I am had deployed your jars but path could not understand your idea. Could you clarify the actions what to do?
As I see both jars uses single Context path, and as I understood the full URL will be different, for example http://localhost:8080/rest-binding/order for method newOrder and http://localhost:8080/rest-binding/warehouse for method updateItem. But the goal is to use single URI for all methods and when processing the request decide which jar to call and which method in that jar will be invoked.
-
3. Re: Single URL for many rest services
mageshbk Oct 6, 2015 5:24 PM (in response to maciavelli)I think you need a content based router to front the rest services. Each rest service jar can have its own URLs deployed in its own jar and the CBR will internally invoke the appropriate REST URLs and respond back. Have a look at cbr example in quickstarts https://github.com/jboss-switchyard/quickstarts/tree/master/rules-camel-cbr
-
4. Re: Single URL for many rest services
maciavelli Nov 10, 2015 3:51 AM (in response to maciavelli)Hi. Thank you, Magesh.
My decision is to use to make Gate project with REST binding service which has a SCA reference binding to other projects(jars). The core of Gate is Camel content based Route, which resends incoming message from REST binding service to concrete target SCA reference.
This is my Gate:
This is example of project which will be called from Gate:
So single point for all requests is Gate project, which redirects message to concrete jar.