-
1. Re: Is it possible to have 2 different components with rest bindings using the exact same root context path?
kcbabo Jul 11, 2013 10:36 AM (in response to susanacabaco)You cannot have the exact same context path for two different services. If you need a single endpoint for multiple services, I would create a service "A" which is exposed via a REST binding, then route from A to your other services, "B" and "C".
-
2. Re: Is it possible to have 2 different components with rest bindings using the exact same root context path?
edevera Jul 11, 2013 10:46 AM (in response to kcbabo)What about not using the contextPath at the rest binding at all? should that work considering that I am defining the context paths at my rest interfaces?
In deployment 1 I have:
@Path("/mypath1")
public interface MyInterface1
...
In deployment 2 I have:
@Path("/mypath2")
public interface MyInterface2
...
Both of these interfaces are in different deployments with rest bindings that do not have a context path defined (so using the default).
Would this be possible?
-
3. Re: Is it possible to have 2 different components with rest bindings using the exact same root context path?
susanacabaco Jul 11, 2013 11:24 AM (in response to edevera)I tried this.
Service A had two rest-bindings defined, each associated with a different interface.
I completely removed <rest:contextPath> ... </rest:contextPath> from both bindings in the same switchyard.xml.
One of them simply stopped working.
So here I had a problem within the same component, same ear, same deployment. Therefore I couldn't even try to test it with the two deployments from the example above.
-
4. Re: Is it possible to have 2 different components with rest bindings using the exact same root context path?
kcbabo Jul 12, 2013 1:14 PM (in response to susanacabaco)You can't use the same contextPath in two different applications. You can use the same context path for multiple RESTEasy endpoints in the same application.