diff options
-rw-r--r-- | branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomServiceBindingProvider.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomServiceBindingProvider.java b/branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomServiceBindingProvider.java index e1d470f5a3..9e08b5b92e 100644 --- a/branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomServiceBindingProvider.java +++ b/branches/sca-java-1.x/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomServiceBindingProvider.java @@ -40,8 +40,10 @@ class AtomServiceBindingProvider implements ServiceBindingProvider { private AtomBinding binding; private ServletHost servletHost; private MessageFactory messageFactory; - private String servletMapping; private Mediator mediator; + + private String servletMapping; + private String bindingURI; AtomServiceBindingProvider(RuntimeComponent component, RuntimeComponentService service, @@ -79,9 +81,17 @@ class AtomServiceBindingProvider implements ServiceBindingProvider { servletMapping += "*"; } servletHost.addServletMapping(servletMapping, servlet); + + bindingURI = binding.getURI(); + if (!bindingURI.endsWith("/")) { + bindingURI += "/"; + } + + servletHost.addServletMapping(bindingURI, servlet); } public void stop() { servletHost.removeServletMapping(servletMapping); + servletHost.removeServletMapping(bindingURI); } } |