diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2010-09-17 07:38:09 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2010-09-17 07:38:09 +0000 |
commit | 25ef0f8ea58c8a7b7d8d1c5e974b68167e0a0397 (patch) | |
tree | 6852337d9194bd60369f547f70acc0d60cdd8f9d /sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main | |
parent | e0ef30f15e61d0dd501016edc800c437ed36818e (diff) |
Adding test for double values
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@998005 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main')
-rw-r--r-- | sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCReferenceBindingProvider.java | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCReferenceBindingProvider.java b/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCReferenceBindingProvider.java index d1e35730b7..adc19202b3 100644 --- a/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCReferenceBindingProvider.java +++ b/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCReferenceBindingProvider.java @@ -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.provider; @@ -42,7 +42,7 @@ import org.apache.tuscany.sca.runtime.RuntimeComponentReference; /** * Implementation of the JSONRPC Binding Provider for References - * + * * @version $Rev$ $Date$ */ public class JSONRPCReferenceBindingProvider implements ReferenceBindingProvider { @@ -57,7 +57,7 @@ public class JSONRPCReferenceBindingProvider implements ReferenceBindingProvider this.endpointReference = endpointReference; this.reference = (RuntimeComponentReference) endpointReference.getReference(); - + //clone the service contract to avoid databinding issues /* try { @@ -65,20 +65,20 @@ public class JSONRPCReferenceBindingProvider implements ReferenceBindingProvider } catch(CloneNotSupportedException e) { this.referenceContract = reference.getInterfaceContract(); } - + JSONRPCDatabindingHelper.setDataBinding(referenceContract.getInterface()); */ - + // Create an HTTP client HttpParams defaultParameters = new BasicHttpParams(); //defaultParameters.setIntParameter(HttpConnectionManagerParams.MAX_TOTAL_CONNECTIONS, 10); HttpProtocolParams.setContentCharset(defaultParameters, HTTP.UTF_8); HttpConnectionParams.setConnectionTimeout(defaultParameters, 60000); HttpConnectionParams.setSoTimeout(defaultParameters, 60000); - + SchemeRegistry supportedSchemes = new SchemeRegistry(); supportedSchemes.register(new Scheme(HttpHost.DEFAULT_SCHEME_NAME, PlainSocketFactory.getSocketFactory(), 80)); - + ClientConnectionManager connectionManager = new ThreadSafeClientConnManager(defaultParameters, supportedSchemes); httpClient = new DefaultHttpClient(connectionManager, defaultParameters); @@ -90,9 +90,10 @@ public class JSONRPCReferenceBindingProvider implements ReferenceBindingProvider } public Invoker createInvoker(Operation operation) { - final Interface intf = reference.getInterfaceContract().getInterface(); - if (intf.isDynamic()) + final Interface intf = reference.getInterfaceContract().getInterface(); + if (intf.isDynamic()) { return new JSONRPCBindingInvoker(endpointReference, operation, httpClient); + } return new JSONRPCClientInvoker(endpointReference, operation, httpClient); } |