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".
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:
public interface MyInterface1
In deployment 2 I have:
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?
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.
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.