You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by lr...@apache.org on 2010/08/29 10:53:41 UTC
svn commit: r990514 - in /tuscany/sca-java-2.x/trunk/modules:
binding-atom-js-dojo/src/main/java/org/apache/tuscany/sca/binding/atom/js/dojo/
binding-jsonrpc-js-dojo/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/js/dojo/
Author: lresende
Date: Sun Aug 29 08:53:41 2010
New Revision: 990514
URL: http://svn.apache.org/viewvc?rev=990514&view=rev
Log:
Minor update to reuse Binding QName
Modified:
tuscany/sca-java-2.x/trunk/modules/binding-atom-js-dojo/src/main/java/org/apache/tuscany/sca/binding/atom/js/dojo/AtomBindingJavascriptProxyFactoryImpl.java
tuscany/sca-java-2.x/trunk/modules/binding-jsonrpc-js-dojo/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/js/dojo/JSONRPCBindingJavascriptProxyFactoryImpl.java
Modified: tuscany/sca-java-2.x/trunk/modules/binding-atom-js-dojo/src/main/java/org/apache/tuscany/sca/binding/atom/js/dojo/AtomBindingJavascriptProxyFactoryImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-atom-js-dojo/src/main/java/org/apache/tuscany/sca/binding/atom/js/dojo/AtomBindingJavascriptProxyFactoryImpl.java?rev=990514&r1=990513&r2=990514&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-atom-js-dojo/src/main/java/org/apache/tuscany/sca/binding/atom/js/dojo/AtomBindingJavascriptProxyFactoryImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-atom-js-dojo/src/main/java/org/apache/tuscany/sca/binding/atom/js/dojo/AtomBindingJavascriptProxyFactoryImpl.java Sun Aug 29 08:53:41 2010
@@ -6,15 +6,15 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
+ * under the License.
*/
package org.apache.tuscany.sca.binding.atom.js.dojo;
@@ -34,8 +34,8 @@ import org.apache.tuscany.sca.runtime.Ru
import org.apache.tuscany.sca.web.javascript.JavascriptProxyFactory;
public class AtomBindingJavascriptProxyFactoryImpl implements JavascriptProxyFactory {
- private static final QName NAME = new QName("http://tuscany.apache.org/xmlns/sca/1.1", "binding.atom");
-
+ private static final QName NAME = AtomBinding.TYPE;
+
public Class<?> getModelType() {
return AtomBinding.class;
}
@@ -43,7 +43,7 @@ public class AtomBindingJavascriptProxyF
public QName getQName() {
return NAME;
}
-
+
public String getJavascriptProxyFile() {
return null;
}
@@ -65,13 +65,13 @@ public class AtomBindingJavascriptProxyF
((RuntimeEndpointReference) epr).getInvocationChains();
targetEndpoint = epr.getTargetEndpoint();
}
-
+
Binding binding = targetEndpoint.getBinding();
-
+
URI targetURI = URI.create(binding.getURI());
String targetPath = targetURI.getPath();
-
- return "tuscany.AtomService(\"" + targetPath + "\")";
+
+ return "tuscany.AtomService(\"" + targetPath + "\")";
}
}
Modified: tuscany/sca-java-2.x/trunk/modules/binding-jsonrpc-js-dojo/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/js/dojo/JSONRPCBindingJavascriptProxyFactoryImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jsonrpc-js-dojo/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/js/dojo/JSONRPCBindingJavascriptProxyFactoryImpl.java?rev=990514&r1=990513&r2=990514&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jsonrpc-js-dojo/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/js/dojo/JSONRPCBindingJavascriptProxyFactoryImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jsonrpc-js-dojo/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/js/dojo/JSONRPCBindingJavascriptProxyFactoryImpl.java Sun Aug 29 08:53:41 2010
@@ -6,15 +6,15 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
+ * under the License.
*/
package org.apache.tuscany.sca.binding.jsonrpc.js.dojo;
@@ -34,8 +34,8 @@ import org.apache.tuscany.sca.runtime.Ru
import org.apache.tuscany.sca.web.javascript.JavascriptProxyFactory;
public class JSONRPCBindingJavascriptProxyFactoryImpl implements JavascriptProxyFactory {
- private static final QName NAME = new QName("http://tuscany.apache.org/xmlns/sca/1.1", "binding.jsonrpc");
-
+ private static final QName NAME = JSONRPCBinding.TYPE;
+
public Class<?> getModelType() {
return JSONRPCBinding.class;
}
@@ -51,11 +51,11 @@ public class JSONRPCBindingJavascriptPro
public InputStream getJavascriptProxyFileAsStream() throws IOException {
return null;
}
-
+
public String createJavascriptHeader(ComponentReference componentReference) throws IOException {
return "dojo.require('dojo.rpc.JsonService');";
}
-
+
public String createJavascriptReference(ComponentReference componentReference) throws IOException {
EndpointReference epr = componentReference.getEndpointReferences().get(0);
Endpoint targetEndpoint = epr.getTargetEndpoint();
@@ -65,13 +65,13 @@ public class JSONRPCBindingJavascriptPro
((RuntimeEndpointReference) epr).getInvocationChains();
targetEndpoint = epr.getTargetEndpoint();
}
-
+
Binding binding = targetEndpoint.getBinding();
-
+
URI targetURI = URI.create(binding.getURI());
String targetPath = targetURI.getPath();
-
- return "dojo.rpc.JsonService(\"" + targetPath + "?smd\")";
+
+ return "dojo.rpc.JsonService(\"" + targetPath + "?smd\")";
}
}