Adding JSON Databdingin support, now the binding is available in 2.x
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@820525 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
66b7528c1f
commit
6d74624c19
2 changed files with 9 additions and 7 deletions
|
@ -18,6 +18,8 @@ Import-Package: javax.servlet,
|
|||
org.apache.tuscany.sca.contribution.processor;version="2.0",
|
||||
org.apache.tuscany.sca.contribution.resolver;version="2.0",
|
||||
org.apache.tuscany.sca.core;version="2.0",
|
||||
org.apache.tuscany.sca.databinding.javabeans;version="2.0.0",
|
||||
org.apache.tuscany.sca.databinding.json,
|
||||
org.apache.tuscany.sca.host.http,
|
||||
org.apache.tuscany.sca.interfacedef,
|
||||
org.apache.tuscany.sca.interfacedef.java;version="2.0.0",
|
||||
|
@ -25,6 +27,7 @@ Import-Package: javax.servlet,
|
|||
org.apache.tuscany.sca.monitor;version="2.0",
|
||||
org.apache.tuscany.sca.provider,
|
||||
org.apache.tuscany.sca.runtime,
|
||||
org.oasisopen.sca;version="2.0.0",
|
||||
org.oasisopen.sca.annotation
|
||||
Bundle-SymbolicName: org.apache.tuscany.sca.binding.jsonrpc.runtime
|
||||
Bundle-DocURL: http://www.apache.org/
|
||||
|
|
|
@ -25,9 +25,13 @@ import java.util.List;
|
|||
|
||||
import org.apache.tuscany.sca.assembly.Endpoint;
|
||||
import org.apache.tuscany.sca.binding.jsonrpc.JSONRPCBinding;
|
||||
import org.apache.tuscany.sca.databinding.javabeans.SimpleJavaDataBinding;
|
||||
import org.apache.tuscany.sca.databinding.json.JSONDataBinding;
|
||||
import org.apache.tuscany.sca.host.http.ServletHost;
|
||||
import org.apache.tuscany.sca.interfacedef.DataType;
|
||||
import org.apache.tuscany.sca.interfacedef.Interface;
|
||||
import org.apache.tuscany.sca.interfacedef.InterfaceContract;
|
||||
import org.apache.tuscany.sca.interfacedef.Operation;
|
||||
import org.apache.tuscany.sca.interfacedef.java.JavaInterface;
|
||||
import org.apache.tuscany.sca.invocation.MessageFactory;
|
||||
import org.apache.tuscany.sca.provider.ServiceBindingProvider;
|
||||
|
@ -75,8 +79,7 @@ public class JSONRPCServiceBindingProvider implements ServiceBindingProvider {
|
|||
this.serviceContract = service.getInterfaceContract();
|
||||
}
|
||||
|
||||
// FIXME Bringup JSON Databing
|
||||
// setDataBinding(serviceContract.getInterface());
|
||||
setDataBinding(serviceContract.getInterface());
|
||||
}
|
||||
|
||||
public InterfaceContract getBindingInterfaceContract() {
|
||||
|
@ -89,8 +92,7 @@ public class JSONRPCServiceBindingProvider implements ServiceBindingProvider {
|
|||
|
||||
public void start() {
|
||||
// Set default databinding to json
|
||||
// FIXME : port json databinding support
|
||||
// serviceContract.getInterface().resetDataBinding(JSONDataBinding.NAME);
|
||||
serviceContract.getInterface().resetDataBinding(JSONDataBinding.NAME);
|
||||
|
||||
// Determine the service business interface
|
||||
Class<?> serviceInterface = getTargetJavaClass(serviceContract.getInterface());
|
||||
|
@ -163,8 +165,6 @@ public class JSONRPCServiceBindingProvider implements ServiceBindingProvider {
|
|||
return ((JavaInterface)targetInterface).getJavaClass();
|
||||
}
|
||||
|
||||
// FIXME Bringup JSON Databinding support
|
||||
/*
|
||||
private void setDataBinding(Interface interfaze) {
|
||||
List<Operation> operations = interfaze.getOperations();
|
||||
for (Operation operation : operations) {
|
||||
|
@ -186,5 +186,4 @@ public class JSONRPCServiceBindingProvider implements ServiceBindingProvider {
|
|||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue