tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rf...@apache.org
Subject svn commit: r509452 - in /incubator/tuscany/branches/sca-java-integration/sca: extensions/jms/binding/src/main/java/org/apache/tuscany/binding/jms/databinding/ kernel/core/src/main/java/org/apache/tuscany/core/databinding/impl/ kernel/core/src/main/jav...
Date Tue, 20 Feb 2007 08:13:43 GMT
Author: rfeng
Date: Tue Feb 20 00:13:41 2007
New Revision: 509452

URL: http://svn.apache.org/viewvc?view=rev&rev=509452
Log:
[sca-integration-bracnh] Add constants to DataBinding for idl-related formats

Modified:
    incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/binding/src/main/java/org/apache/tuscany/binding/jms/databinding/AbstractJmsTransformer.java
    incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/binding/src/main/java/org/apache/tuscany/binding/jms/databinding/Input2JmsInputTransformer.java
    incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/binding/src/main/java/org/apache/tuscany/binding/jms/databinding/JmsInput2InputTransformer.java
    incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/binding/src/main/java/org/apache/tuscany/binding/jms/databinding/JmsOutput2OutputTransformer.java
    incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/binding/src/main/java/org/apache/tuscany/binding/jms/databinding/Output2JmsOutputTransformer.java
    incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/databinding/impl/Input2InputTransformer.java
    incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/databinding/impl/MediatorImpl.java
    incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/databinding/impl/Output2OutputTransformer.java
    incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/idl/java/JavaInterfaceProcessorRegistryImpl.java
    incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/test/java/org/apache/tuscany/core/databinding/impl/DataBindingInterceptorTestCase.java
    incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/test/java/org/apache/tuscany/core/databinding/impl/IDLTransformerTestCase.java
    incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/databinding/DataBinding.java
    incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/databinding/Mediator.java
    incubator/tuscany/branches/sca-java-integration/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/InterfaceWSDLIntrospectorImpl.java
    incubator/tuscany/branches/sca-java-integration/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLOperation.java

Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/binding/src/main/java/org/apache/tuscany/binding/jms/databinding/AbstractJmsTransformer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/binding/src/main/java/org/apache/tuscany/binding/jms/databinding/AbstractJmsTransformer.java?view=diff&rev=509452&r1=509451&r2=509452
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/binding/src/main/java/org/apache/tuscany/binding/jms/databinding/AbstractJmsTransformer.java
(original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/binding/src/main/java/org/apache/tuscany/binding/jms/databinding/AbstractJmsTransformer.java
Tue Feb 20 00:13:41 2007
@@ -38,9 +38,7 @@
  */
 public abstract class AbstractJmsTransformer<T> extends TransformerExtension<T,
T> implements PullTransformer<T, T> {
 
-    protected static final String IDL_INPUT = "idl:input";
     protected static final String JMS_INPUT = "jms:input";
-    protected static final String IDL_OUTPUT = "idl:output";
     protected static final String JMS_OUTPUT = "jms:output";
 
     protected DataBindingRegistry dataBindingRegistry;

Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/binding/src/main/java/org/apache/tuscany/binding/jms/databinding/Input2JmsInputTransformer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/binding/src/main/java/org/apache/tuscany/binding/jms/databinding/Input2JmsInputTransformer.java?view=diff&rev=509452&r1=509451&r2=509452
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/binding/src/main/java/org/apache/tuscany/binding/jms/databinding/Input2JmsInputTransformer.java
(original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/binding/src/main/java/org/apache/tuscany/binding/jms/databinding/Input2JmsInputTransformer.java
Tue Feb 20 00:13:41 2007
@@ -19,6 +19,7 @@
 
 package org.apache.tuscany.binding.jms.databinding;
 
+import org.apache.tuscany.spi.databinding.DataBinding;
 import org.apache.tuscany.spi.databinding.TransformationContext;
 import org.apache.tuscany.spi.databinding.Transformer;
 import org.osoa.sca.annotations.Service;
@@ -36,7 +37,7 @@
 
     @Override
     public String getSourceDataBinding() {
-        return IDL_INPUT;
+        return DataBinding.IDL_INPUT;
     }
 
     @Override

Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/binding/src/main/java/org/apache/tuscany/binding/jms/databinding/JmsInput2InputTransformer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/binding/src/main/java/org/apache/tuscany/binding/jms/databinding/JmsInput2InputTransformer.java?view=diff&rev=509452&r1=509451&r2=509452
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/binding/src/main/java/org/apache/tuscany/binding/jms/databinding/JmsInput2InputTransformer.java
(original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/binding/src/main/java/org/apache/tuscany/binding/jms/databinding/JmsInput2InputTransformer.java
Tue Feb 20 00:13:41 2007
@@ -19,6 +19,7 @@
 
 package org.apache.tuscany.binding.jms.databinding;
 
+import org.apache.tuscany.spi.databinding.DataBinding;
 import org.apache.tuscany.spi.databinding.TransformationContext;
 import org.apache.tuscany.spi.databinding.Transformer;
 import org.osoa.sca.annotations.Service;
@@ -41,7 +42,7 @@
 
     @Override
     public String getTargetDataBinding() {
-        return IDL_INPUT;
+        return DataBinding.IDL_INPUT;
     }
 
     /**

Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/binding/src/main/java/org/apache/tuscany/binding/jms/databinding/JmsOutput2OutputTransformer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/binding/src/main/java/org/apache/tuscany/binding/jms/databinding/JmsOutput2OutputTransformer.java?view=diff&rev=509452&r1=509451&r2=509452
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/binding/src/main/java/org/apache/tuscany/binding/jms/databinding/JmsOutput2OutputTransformer.java
(original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/binding/src/main/java/org/apache/tuscany/binding/jms/databinding/JmsOutput2OutputTransformer.java
Tue Feb 20 00:13:41 2007
@@ -19,6 +19,7 @@
 
 package org.apache.tuscany.binding.jms.databinding;
 
+import org.apache.tuscany.spi.databinding.DataBinding;
 import org.apache.tuscany.spi.databinding.TransformationContext;
 import org.apache.tuscany.spi.databinding.Transformer;
 import org.osoa.sca.annotations.Service;
@@ -44,7 +45,7 @@
 
     @Override
     public String getTargetDataBinding() {
-        return IDL_OUTPUT;
+        return DataBinding.IDL_OUTPUT;
     }
 
     /**

Modified: incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/binding/src/main/java/org/apache/tuscany/binding/jms/databinding/Output2JmsOutputTransformer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/binding/src/main/java/org/apache/tuscany/binding/jms/databinding/Output2JmsOutputTransformer.java?view=diff&rev=509452&r1=509451&r2=509452
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/binding/src/main/java/org/apache/tuscany/binding/jms/databinding/Output2JmsOutputTransformer.java
(original)
+++ incubator/tuscany/branches/sca-java-integration/sca/extensions/jms/binding/src/main/java/org/apache/tuscany/binding/jms/databinding/Output2JmsOutputTransformer.java
Tue Feb 20 00:13:41 2007
@@ -19,6 +19,7 @@
 
 package org.apache.tuscany.binding.jms.databinding;
 
+import org.apache.tuscany.spi.databinding.DataBinding;
 import org.apache.tuscany.spi.databinding.TransformationContext;
 import org.apache.tuscany.spi.databinding.Transformer;
 import org.osoa.sca.annotations.Service;
@@ -38,7 +39,7 @@
 
     @Override
     public String getSourceDataBinding() {
-        return IDL_OUTPUT;
+        return DataBinding.IDL_OUTPUT;
     }
 
     @Override

Modified: incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/databinding/impl/Input2InputTransformer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/databinding/impl/Input2InputTransformer.java?view=diff&rev=509452&r1=509451&r2=509452
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/databinding/impl/Input2InputTransformer.java
(original)
+++ incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/databinding/impl/Input2InputTransformer.java
Tue Feb 20 00:13:41 2007
@@ -25,7 +25,6 @@
 
 import org.apache.tuscany.spi.annotation.Autowire;
 import org.apache.tuscany.spi.databinding.DataBinding;
-import org.apache.tuscany.spi.databinding.DataBindingRegistry;
 import org.apache.tuscany.spi.databinding.Mediator;
 import org.apache.tuscany.spi.databinding.PullTransformer;
 import org.apache.tuscany.spi.databinding.TransformationContext;
@@ -34,10 +33,9 @@
 import org.apache.tuscany.spi.databinding.WrapperHandler;
 import org.apache.tuscany.spi.databinding.extension.TransformerExtension;
 import org.apache.tuscany.spi.idl.ElementInfo;
-import org.apache.tuscany.spi.model.WrapperInfo;
 import org.apache.tuscany.spi.model.DataType;
 import org.apache.tuscany.spi.model.Operation;
-
+import org.apache.tuscany.spi.model.WrapperInfo;
 import org.osoa.sca.annotations.Service;
 
 /**
@@ -48,10 +46,6 @@
 public class Input2InputTransformer extends TransformerExtension<Object[], Object[]>
implements
     PullTransformer<Object[], Object[]> {
 
-    private static final String IDL_INPUT = "idl:input";
-
-    protected DataBindingRegistry dataBindingRegistry;
-
     protected Mediator mediator;
 
     public Input2InputTransformer() {
@@ -60,12 +54,12 @@
 
     @Override
     public String getSourceDataBinding() {
-        return IDL_INPUT;
+        return DataBinding.IDL_INPUT;
     }
 
     @Override
     public String getTargetDataBinding() {
-        return IDL_INPUT;
+        return DataBinding.IDL_INPUT;
     }
 
     /**
@@ -77,14 +71,6 @@
     }
 
     /**
-     * @param dataBindingRegistry the dataBindingRegistry to set
-     */
-    @Autowire
-    public void setDataBindingRegistry(DataBindingRegistry dataBindingRegistry) {
-        this.dataBindingRegistry = dataBindingRegistry;
-    }
-
-    /**
      * @see org.apache.tuscany.spi.databinding.extension.TransformerExtension#getSourceType()
      */
     @Override
@@ -205,7 +191,7 @@
     }
 
     private WrapperHandler getWapperHandler(String dataBindingId, boolean required) {
-        DataBinding dataBinding = dataBindingRegistry.getDataBinding(dataBindingId);
+        DataBinding dataBinding = mediator.getDataBindingRegistry().getDataBinding(dataBindingId);
         WrapperHandler wrapperHandler = dataBinding == null ? null : dataBinding.getWrapperHandler();
         if (wrapperHandler == null && required) {
             throw new TransformationException(

Modified: incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/databinding/impl/MediatorImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/databinding/impl/MediatorImpl.java?view=diff&rev=509452&r1=509451&r2=509452
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/databinding/impl/MediatorImpl.java
(original)
+++ incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/databinding/impl/MediatorImpl.java
Tue Feb 20 00:13:41 2007
@@ -168,4 +168,18 @@
         }
         return path;
     }
+
+    /**
+     * @return the dataBindingRegistry
+     */
+    public DataBindingRegistry getDataBindingRegistry() {
+        return dataBindingRegistry;
+    }
+
+    /**
+     * @return the transformerRegistry
+     */
+    public TransformerRegistry getTransformerRegistry() {
+        return transformerRegistry;
+    }
 }

Modified: incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/databinding/impl/Output2OutputTransformer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/databinding/impl/Output2OutputTransformer.java?view=diff&rev=509452&r1=509451&r2=509452
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/databinding/impl/Output2OutputTransformer.java
(original)
+++ incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/databinding/impl/Output2OutputTransformer.java
Tue Feb 20 00:13:41 2007
@@ -25,7 +25,6 @@
 
 import org.apache.tuscany.spi.annotation.Autowire;
 import org.apache.tuscany.spi.databinding.DataBinding;
-import org.apache.tuscany.spi.databinding.DataBindingRegistry;
 import org.apache.tuscany.spi.databinding.Mediator;
 import org.apache.tuscany.spi.databinding.PullTransformer;
 import org.apache.tuscany.spi.databinding.TransformationContext;
@@ -34,9 +33,9 @@
 import org.apache.tuscany.spi.databinding.WrapperHandler;
 import org.apache.tuscany.spi.databinding.extension.TransformerExtension;
 import org.apache.tuscany.spi.idl.ElementInfo;
-import org.apache.tuscany.spi.model.WrapperInfo;
 import org.apache.tuscany.spi.model.DataType;
 import org.apache.tuscany.spi.model.Operation;
+import org.apache.tuscany.spi.model.WrapperInfo;
 import org.osoa.sca.annotations.Service;
 
 /**
@@ -46,9 +45,6 @@
 @Service(Transformer.class)
 public class Output2OutputTransformer extends TransformerExtension<Object, Object>
implements
     PullTransformer<Object, Object> {
-    private static final String IDL_OUTPUT = "idl:output";
-
-    protected DataBindingRegistry dataBindingRegistry;
 
     protected Mediator mediator;
 
@@ -67,22 +63,14 @@
         this.mediator = mediator;
     }
 
-    /**
-     * @param dataBindingRegistry the dataBindingRegistry to set
-     */
-    @Autowire
-    public void setDataBindingRegistry(DataBindingRegistry dataBindingRegistry) {
-        this.dataBindingRegistry = dataBindingRegistry;
-    }
-
     @Override
     public String getSourceDataBinding() {
-        return IDL_OUTPUT;
+        return DataBinding.IDL_OUTPUT;
     }
 
     @Override
     public String getTargetDataBinding() {
-        return IDL_OUTPUT;
+        return DataBinding.IDL_OUTPUT;
     }
 
     /**
@@ -111,7 +99,7 @@
     private WrapperHandler getWapperHandler(Operation<?> operation) {
         String dataBindingId;
         dataBindingId = operation.getDataBinding();
-        DataBinding dataBinding = dataBindingRegistry.getDataBinding(dataBindingId);
+        DataBinding dataBinding = mediator.getDataBindingRegistry().getDataBinding(dataBindingId);
         WrapperHandler wrapperHandler = dataBinding == null ? null : dataBinding.getWrapperHandler();
         if (wrapperHandler == null) {
             throw new TransformationException(
@@ -121,7 +109,7 @@
     }
 
     private WrapperHandler getWapperHandler(String dataBindingId) {
-        DataBinding dataBinding = dataBindingRegistry.getDataBinding(dataBindingId);
+        DataBinding dataBinding = mediator.getDataBindingRegistry().getDataBinding(dataBindingId);
         return dataBinding == null ? null : dataBinding.getWrapperHandler();
     }
 

Modified: incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/idl/java/JavaInterfaceProcessorRegistryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/idl/java/JavaInterfaceProcessorRegistryImpl.java?view=diff&rev=509452&r1=509451&r2=509452
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/idl/java/JavaInterfaceProcessorRegistryImpl.java
(original)
+++ incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/main/java/org/apache/tuscany/core/idl/java/JavaInterfaceProcessorRegistryImpl.java
Tue Feb 20 00:13:41 2007
@@ -31,6 +31,7 @@
 import org.osoa.sca.annotations.Remotable;
 import org.osoa.sca.annotations.Scope;
 
+import org.apache.tuscany.spi.databinding.DataBinding;
 import org.apache.tuscany.spi.idl.InvalidConversationalOperationException;
 import org.apache.tuscany.spi.idl.InvalidServiceContractException;
 import org.apache.tuscany.spi.idl.OverloadedOperationException;
@@ -51,8 +52,6 @@
  * @version $Rev$ $Date$
  */
 public class JavaInterfaceProcessorRegistryImpl implements JavaInterfaceProcessorRegistry
{
-    public static final String IDL_INPUT = "idl:input";
-
     private static final String UNKNOWN_DATABINDING = null;
 
     private List<JavaInterfaceProcessor> processors = new ArrayList<JavaInterfaceProcessor>();
@@ -146,7 +145,7 @@
             }
 
             DataType<List<DataType<Type>>> inputType =
-                new DataType<List<DataType<Type>>>(IDL_INPUT, Object[].class,
paramDataTypes);
+                new DataType<List<DataType<Type>>>(DataBinding.IDL_INPUT,
Object[].class, paramDataTypes);
             Operation<Type> operation = new Operation<Type>(name,
                 inputType,
                 returnDataType,

Modified: incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/test/java/org/apache/tuscany/core/databinding/impl/DataBindingInterceptorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/test/java/org/apache/tuscany/core/databinding/impl/DataBindingInterceptorTestCase.java?view=diff&rev=509452&r1=509451&r2=509452
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/test/java/org/apache/tuscany/core/databinding/impl/DataBindingInterceptorTestCase.java
(original)
+++ incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/test/java/org/apache/tuscany/core/databinding/impl/DataBindingInterceptorTestCase.java
Tue Feb 20 00:13:41 2007
@@ -25,6 +25,7 @@
 
 import org.apache.tuscany.spi.component.Component;
 import org.apache.tuscany.spi.component.CompositeComponent;
+import org.apache.tuscany.spi.databinding.DataBinding;
 import org.apache.tuscany.spi.databinding.Mediator;
 import org.apache.tuscany.spi.model.DataType;
 import org.apache.tuscany.spi.model.Operation;
@@ -67,9 +68,9 @@
             new Operation<Class>("call", inputType2, type2, null, false, "org.w3c.dom.Node",
NO_CONVERSATION);
 
         DataType<DataType> outputType1 =
-            new DataType<DataType>("idl:output", Object.class, operation1.getOutputType());
+            new DataType<DataType>(DataBinding.IDL_OUTPUT, Object.class, operation1.getOutputType());
         DataType<DataType> outputType2 =
-            new DataType<DataType>("idl:output", Object.class, operation2.getOutputType());
+            new DataType<DataType>(DataBinding.IDL_OUTPUT, Object.class, operation2.getOutputType());
 
         OutboundWire outboundWire = EasyMock.createMock(OutboundWire.class);
         InboundWire inboundWire = EasyMock.createMock(InboundWire.class);

Modified: incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/test/java/org/apache/tuscany/core/databinding/impl/IDLTransformerTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/test/java/org/apache/tuscany/core/databinding/impl/IDLTransformerTestCase.java?view=diff&rev=509452&r1=509451&r2=509452
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/test/java/org/apache/tuscany/core/databinding/impl/IDLTransformerTestCase.java
(original)
+++ incubator/tuscany/branches/sca-java-integration/sca/kernel/core/src/test/java/org/apache/tuscany/core/databinding/impl/IDLTransformerTestCase.java
Tue Feb 20 00:13:41 2007
@@ -18,6 +18,9 @@
  */
 package org.apache.tuscany.core.databinding.impl;
 
+import static org.apache.tuscany.spi.databinding.DataBinding.IDL_INPUT;
+import static org.apache.tuscany.spi.databinding.DataBinding.IDL_OUTPUT;
+
 import java.util.ArrayList;
 import java.util.List;
 
@@ -87,7 +90,7 @@
             new DataType<QName>(null, Object.class, new QName(URI_ORDER_XSD, "checkOrderStatus"));
         types0.add(wrapperType);
         DataType<List<DataType<QName>>> inputType0 =
-            new DataType<List<DataType<QName>>>("idl:input", Object[].class,
types0);
+            new DataType<List<DataType<QName>>>(IDL_INPUT, Object[].class,
types0);
 
         List<DataType<QName>> types1 = new ArrayList<DataType<QName>>();
         DataType<QName> customerIdType =
@@ -99,7 +102,7 @@
         types1.add(orderType);
         types1.add(flagType);
         DataType<List<DataType<QName>>> inputType =
-            new DataType<List<DataType<QName>>>("idl:input", Object[].class,
types1);
+            new DataType<List<DataType<QName>>>(IDL_INPUT, Object[].class,
types1);
 
         DataType<QName> statusType =
             new DataType<QName>(null, Object.class, new QName(URI_ORDER_XSD, "status"));
@@ -172,7 +175,6 @@
 
         Object[] source = new Object[] {"cust001", IPO_XML, Integer.valueOf(1)};
         Input2InputTransformer t = new Input2InputTransformer();
-        t.setDataBindingRegistry(dataBindingRegistry);
         t.setMediator(m);
 
         TransformationContext context = new TransformationContextImpl();
@@ -181,7 +183,7 @@
         types.add(new DataType<Class>("java.lang.String", String.class, String.class));
         types.add(new DataType<Class>(Object.class.getName(), int.class, int.class));
         DataType<List<DataType<Class>>> inputType1 =
-            new DataType<List<DataType<Class>>>("idl:input", Object[].class,
types);
+            new DataType<List<DataType<Class>>>(IDL_INPUT, Object[].class,
types);
         context.setSourceDataType(inputType1);
         context.setTargetDataType(op.getInputType());
         Object[] results = t.transform(source, context);
@@ -193,12 +195,12 @@
 
         TransformationContext context1 = new TransformationContextImpl();
         DataType<DataType> sourceType =
-            new DataType<DataType>("idl:output", Object.class, op.getOutputType());
+            new DataType<DataType>(IDL_OUTPUT, Object.class, op.getOutputType());
         sourceType.setOperation(op.getOutputType().getOperation());
 
         context1.setSourceDataType(sourceType);
         DataType<DataType> targetType =
-            new DataType<DataType>("idl:output", Object.class,
+            new DataType<DataType>(IDL_OUTPUT, Object.class,
                                    new DataType<Class>("java.lang.Object", String.class,
String.class));
         context1.setTargetDataType(targetType);
 
@@ -210,7 +212,6 @@
         status.appendChild(factory.createTextNode("shipped"));
         Output2OutputTransformer t2 = new Output2OutputTransformer();
         t2.setMediator(m);
-        t2.setDataBindingRegistry(dataBindingRegistry);
         Object st = t2.transform(responseElement, context1);
         assertEquals("shipped", st);
 

Modified: incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/databinding/DataBinding.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/databinding/DataBinding.java?view=diff&rev=509452&r1=509451&r2=509452
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/databinding/DataBinding.java
(original)
+++ incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/databinding/DataBinding.java
Tue Feb 20 00:13:41 2007
@@ -26,6 +26,18 @@
  */
 public interface DataBinding {
     /**
+     * A special databinding for input message of an operation
+     */
+    String IDL_INPUT = "idl:input";
+    /**
+     * A special databinding for output message of an operation
+     */
+    String IDL_OUTPUT = "idl:output";
+    /**
+     * A special databinding for fault message of an operation
+     */
+    String IDL_FAULT = "idl:fault";
+    /**
      * The name of a databinding should be case-insensitive and unique
      * 
      * @return The name of the databinding

Modified: incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/databinding/Mediator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/databinding/Mediator.java?view=diff&rev=509452&r1=509451&r2=509452
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/databinding/Mediator.java
(original)
+++ incubator/tuscany/branches/sca-java-integration/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/databinding/Mediator.java
Tue Feb 20 00:13:41 2007
@@ -53,4 +53,15 @@
             DataType targetDataType,
             Map<Class<?>, Object> context);
     
+    /**
+     * Get the DataBinding registry
+     * @return
+     */
+    DataBindingRegistry getDataBindingRegistry();
+    
+    /**
+     * Get the Transformer registry
+     * @return
+     */
+    TransformerRegistry getTransformerRegistry();    
 }

Modified: incubator/tuscany/branches/sca-java-integration/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/InterfaceWSDLIntrospectorImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/InterfaceWSDLIntrospectorImpl.java?view=diff&rev=509452&r1=509451&r2=509452
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/InterfaceWSDLIntrospectorImpl.java
(original)
+++ incubator/tuscany/branches/sca-java-integration/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/InterfaceWSDLIntrospectorImpl.java
Tue Feb 20 00:13:41 2007
@@ -35,8 +35,6 @@
  * Introspector for creating WSDLServiceContract definitions from WSDL PortTypes.
  */
 public class InterfaceWSDLIntrospectorImpl implements InterfaceWSDLIntrospector {
-    public static final String INPUT_PARTS = "idl:input";
-
     private WSDLDefinitionRegistry wsdlDefinitionRegistry;
 
     /**

Modified: incubator/tuscany/branches/sca-java-integration/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLOperation.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLOperation.java?view=diff&rev=509452&r1=509451&r2=509452
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLOperation.java
(original)
+++ incubator/tuscany/branches/sca-java-integration/sca/services/idl/wsdl/src/main/java/org/apache/tuscany/idl/wsdl/WSDLOperation.java
Tue Feb 20 00:13:41 2007
@@ -31,6 +31,7 @@
 import javax.wsdl.Part;
 import javax.xml.namespace.QName;
 
+import org.apache.tuscany.spi.databinding.DataBinding;
 import org.apache.tuscany.spi.idl.ElementInfo;
 import org.apache.tuscany.spi.idl.InvalidServiceContractException;
 import org.apache.tuscany.spi.idl.TypeInfo;
@@ -109,7 +110,7 @@
             Input input = operation.getInput();
             Message message = (input == null) ? null : input.getMessage();
             inputType = getMessageType(message);
-            inputType.setDataBinding("idl:input");
+            inputType.setDataBinding(DataBinding.IDL_INPUT);
         }
         return inputType;
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message