From 18d6de80525d2a4ca920844f1d45ba9da79377c8 Mon Sep 17 00:00:00 2001 From: antelder Date: Tue, 2 Mar 2010 22:17:44 +0000 Subject: Remove any leading slash from the service URI git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@918222 13f79535-47bb-0310-9956-ffa450edef68 --- .../jsonrpc/js/dojo/JSONRPCBindingJavascriptProxyFactoryImpl.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sca-java-2.x/trunk/modules/binding-jsonrpc-js-dojo/src/main/java') diff --git a/sca-java-2.x/trunk/modules/binding-jsonrpc-js-dojo/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/js/dojo/JSONRPCBindingJavascriptProxyFactoryImpl.java b/sca-java-2.x/trunk/modules/binding-jsonrpc-js-dojo/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/js/dojo/JSONRPCBindingJavascriptProxyFactoryImpl.java index 0388c8bd77..5c20fb3c4f 100644 --- a/sca-java-2.x/trunk/modules/binding-jsonrpc-js-dojo/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/js/dojo/JSONRPCBindingJavascriptProxyFactoryImpl.java +++ b/sca-java-2.x/trunk/modules/binding-jsonrpc-js-dojo/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/js/dojo/JSONRPCBindingJavascriptProxyFactoryImpl.java @@ -70,6 +70,9 @@ public class JSONRPCBindingJavascriptProxyFactoryImpl implements JavascriptProxy URI targetURI = URI.create(binding.getURI()); String targetPath = targetURI.getPath(); + if (targetPath.startsWith("/")) { + targetPath = targetPath.substring(1); + } return "dojo.rpc.JsonService(\"" + targetPath + "?smd\")"; } -- cgit v1.2.3