tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sl...@apache.org
Subject svn commit: r1213702 [1/2] - in /tuscany/sca-java-2.x/trunk/modules: assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ assembly/src/main/java/org/apache/tuscany/sca/interfacedef/ assembly/src/main/java/org/apache/tuscany/sca/interfacedef/...
Date Tue, 13 Dec 2011 14:12:40 GMT
Author: slaws
Date: Tue Dec 13 14:12:38 2011
New Revision: 1213702

URL: http://svn.apache.org/viewvc?rev=1213702&view=rev
Log:
TUSCANY-3890 - separate the request wrapper model from the response wrapper model as per the change in 1.x under TUSCANY-2931.

Modified:
    tuscany/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/InterfaceContractProcessor.java
    tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/Operation.java
    tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceContractMapperImpl.java
    tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceImpl.java
    tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/OperationImpl.java
    tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/util/WrapperInfo.java
    tuscany/sca-java-2.x/trunk/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestOperation.java
    tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsbytesxml/runtime/WireFormatJMSBytesXMLServiceProvider.java
    tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsdefault/runtime/WireFormatJMSDefaultReferenceProvider.java
    tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsdefault/runtime/WireFormatJMSDefaultServiceProvider.java
    tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmstextxml/runtime/WireFormatJMSTextXMLReferenceProvider.java
    tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmstextxml/runtime/WireFormatJMSTextXMLServiceProvider.java
    tuscany/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JsonRpcInvoker.java
    tuscany/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JsonRpcServlet.java
    tuscany/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java
    tuscany/sca-java-2.x/trunk/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/impl/WebServiceBindingImpl.java
    tuscany/sca-java-2.x/trunk/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/processor/DataBindingJavaInterfaceProcessor.java
    tuscany/sca-java-2.x/trunk/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/processor/WrapperJavaInterfaceProcessor.java
    tuscany/sca-java-2.x/trunk/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Input2InputTransformer.java
    tuscany/sca-java-2.x/trunk/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Output2OutputTransformer.java
    tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/AsyncJDKInvocationHandler.java
    tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/JDKInvocationHandler.java
    tuscany/sca-java-2.x/trunk/modules/databinding-axiom/src/main/java/org/apache/tuscany/sca/databinding/axiom/OMElementWrapperHandler.java
    tuscany/sca-java-2.x/trunk/modules/databinding-axiom/src/test/java/org/apache/tuscany/sca/databinding/axiom/OMElementWrapperHandlerTestCase.java
    tuscany/sca-java-2.x/trunk/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBContextHelper.java
    tuscany/sca-java-2.x/trunk/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBWrapperHandler.java
    tuscany/sca-java-2.x/trunk/modules/databinding-jaxb/src/test/java/org/apache/tuscany/sca/databinding/jaxb/JAXBWrapperHandlerTestCase.java
    tuscany/sca-java-2.x/trunk/modules/databinding-sdo/src/main/java/org/apache/tuscany/sca/databinding/sdo/SDOTypeHelper.java
    tuscany/sca-java-2.x/trunk/modules/databinding-sdo/src/main/java/org/apache/tuscany/sca/databinding/sdo/SDOWrapperHandler.java
    tuscany/sca-java-2.x/trunk/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/SDOWrapperHandlerTestCase.java
    tuscany/sca-java-2.x/trunk/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/util/DataTypeHelper.java
    tuscany/sca-java-2.x/trunk/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/util/OperationDataBindingHelper.java
    tuscany/sca-java-2.x/trunk/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/xml/DOMWrapperHandler.java
    tuscany/sca-java-2.x/trunk/modules/databinding/src/test/java/org/apache/tuscany/sca/databinding/xml/DOMWrapperHandlerTestCase.java
    tuscany/sca-java-2.x/trunk/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSAsyncInterfaceProcessor.java
    tuscany/sca-java-2.x/trunk/modules/interface-java-jaxws/src/main/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessor.java
    tuscany/sca-java-2.x/trunk/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/JAXWSJavaInterfaceProcessorTestCase.java
    tuscany/sca-java-2.x/trunk/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceImpl.java
    tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLOperationIntrospectorImpl.java
    tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/WSDLOperationIntrospectorTestCase.java
    tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/WrapperStyleOperationTestCase.java

Modified: tuscany/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/InterfaceContractProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/InterfaceContractProcessor.java?rev=1213702&r1=1213701&r2=1213702&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/InterfaceContractProcessor.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/InterfaceContractProcessor.java Tue Dec 13 14:12:38 2011
@@ -150,7 +150,8 @@ public class InterfaceContractProcessor 
                             operation.setName(getString(reader, "name"));
                             operation.setDynamic(getBoolean(reader, "isDynamic"));
                             operation.setNonBlocking(getBoolean(reader, "isNonBlocking"));
-                            operation.setWrapperStyle(getBoolean(reader, "isWrapperStyle"));
+                            operation.setInputWrapperStyle(getBoolean(reader, "isInputWrapperStyle"));
+                            operation.setOutputWrapperStyle(getBoolean(reader, "isOutputWrapperStyle"));
                             
                             inputs = new ArrayList<DataType>();
                             DataType inputType = new DataTypeImpl<List<DataType>>(null, null);
@@ -276,15 +277,18 @@ public class InterfaceContractProcessor 
             writer.writeAttribute("name", operation.getName());
             writer.writeAttribute("isDynamic", String.valueOf(operation.isDynamic()));
             writer.writeAttribute("isNonBlocking", String.valueOf(operation.isNonBlocking()));
-            writer.writeAttribute("isWrapperStyle", String.valueOf(operation.isWrapperStyle()));
+            writer.writeAttribute("isInputWrapperStyle", String.valueOf(operation.isInputWrapperStyle()));
+            writer.writeAttribute("isOutputWrapperStyle", String.valueOf(operation.isOutputWrapperStyle()));
 
             List<DataType> outputTypes = operation.getOutputType().getLogical();
             List<DataType> inputTypes = operation.getInputType().getLogical();
             List<DataType> faultTypes = operation.getFaultTypes();
 
-            if (operation.isWrapperStyle() && operation.getWrapper() != null) {
-                inputTypes = operation.getWrapper().getUnwrappedInputType().getLogical();
-                outputTypes = operation.getWrapper().getUnwrappedOutputType().getLogical();
+            if (operation.isInputWrapperStyle() && operation.getInputWrapper() != null) {
+                inputTypes = operation.getInputWrapper().getUnwrappedType().getLogical();
+            }
+            if (operation.isOutputWrapperStyle() && operation.getOutputWrapper() != null) {
+                outputTypes = operation.getOutputWrapper().getUnwrappedType().getLogical();
             }
           
             writer.writeStartElement(Constants.SCA11_TUSCANY_NS, INPUT);

Modified: tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/Operation.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/Operation.java?rev=1213702&r1=1213701&r2=1213702&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/Operation.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/Operation.java Tue Dec 13 14:12:38 2011
@@ -130,24 +130,44 @@ public interface Operation extends Clone
     /**
      * @return the wrapperInfo
      */
-    WrapperInfo getWrapper();
+    WrapperInfo getInputWrapper();
 
     /**
      * @param wrapperInfo the wrapperInfo to set
      */
-    void setWrapper(WrapperInfo wrapperInfo);
+    void setInputWrapper(WrapperInfo wrapperInfo);
+    
+    /**
+     * @return the wrapperInfo
+     */
+    WrapperInfo getOutputWrapper();
+
+    /**
+     * @param wrapperInfo the wrapperInfo to set
+     */
+    void setOutputWrapper(WrapperInfo wrapperInfo);    
 
     /**
      * @return the wrapperStyle
      */
-    boolean isWrapperStyle();
+    boolean isInputWrapperStyle();
 
     /**
      * @param wrapperStyle the wrapperStyle to set
      */
-    void setWrapperStyle(boolean wrapperStyle);
+    void setInputWrapperStyle(boolean wrapperStyle);
 
     /**
+     * @return the wrapperStyle
+     */
+    boolean isOutputWrapperStyle();
+
+    /**
+     * @param wrapperStyle the wrapperStyle to set
+     */
+    void setOutputWrapperStyle(boolean wrapperStyle);
+    
+    /**
      * @deprecated This should be the WrapperInfo.getDataBinding()
      * Get the databinding for the operation
      * @return

Modified: tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceContractMapperImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceContractMapperImpl.java?rev=1213702&r1=1213701&r2=1213702&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceContractMapperImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceContractMapperImpl.java Tue Dec 13 14:12:38 2011
@@ -245,36 +245,29 @@ public class InterfaceContractMapperImpl
 
         boolean passByValue = (source.getInterface().isRemotable()) && byValue;
 
-        //        if (source.getInterface().isRemotable()) {
-        //            return true;
-        //        }
-
         // FIXME: We need to deal with wrapped<-->unwrapped conversion
 
-        // Check output type
         List<DataType> sourceOutputType = source.getOutputType().getLogical();
         List<DataType> targetOutputType = target.getOutputType().getLogical();
 
-        boolean checkSourceWrapper = true;
         List<DataType> sourceInputType = source.getInputType().getLogical();
-        if (source.isWrapperStyle() && source.getWrapper() != null) {
-            sourceInputType = source.getWrapper().getUnwrappedInputType().getLogical();
-            sourceOutputType = source.getWrapper().getUnwrappedOutputType().getLogical();
-            checkSourceWrapper = false;
-        }
-        boolean checkTargetWrapper = true;
         List<DataType> targetInputType = target.getInputType().getLogical();
-        if (target.isWrapperStyle() && target.getWrapper() != null) {
-            targetInputType = target.getWrapper().getUnwrappedInputType().getLogical();
-            targetOutputType = target.getWrapper().getUnwrappedOutputType().getLogical();
-            checkTargetWrapper = false;
+        
+        if (source.isInputWrapperStyle() && source.getInputWrapper() != null) {
+            sourceInputType = source.getInputWrapper().getUnwrappedType().getLogical();
+        }
+        
+        if (source.isOutputWrapperStyle() && source.getOutputWrapper() != null) {
+            sourceOutputType = source.getOutputWrapper().getUnwrappedType().getLogical();
         }
 
-        /* TODO - Why are we assuming compatibility if one side is wrapped and the other is not?
-        if (checkSourceWrapper != checkTargetWrapper) {
-            return true;
+        if (target.isInputWrapperStyle() && target.getInputWrapper() != null) {
+            targetInputType = target.getInputWrapper().getUnwrappedType().getLogical();
+        }
+        
+        if (target.isOutputWrapperStyle() && target.getOutputWrapper() != null) {        
+            targetOutputType = target.getOutputWrapper().getUnwrappedType().getLogical();
         }
-         */
 
         if ( sourceOutputType.size() != targetOutputType.size()) {
             if (audit != null){
@@ -294,7 +287,6 @@ public class InterfaceContractMapperImpl
             }
         }
 
-
         if (sourceInputType.size() != targetInputType.size()) {
             if (audit != null){
                 audit.append("different number of input types");
@@ -348,7 +340,9 @@ public class InterfaceContractMapperImpl
 
     @Override
     public boolean isCompatibleWithoutUnwrapByValue(Operation source, Operation target, Compatibility compatibilityType) {
-        if (!source.isWrapperStyle() == target.isWrapperStyle()) {
+        if (!source.isInputWrapperStyle() == target.isInputWrapperStyle()) {
+            return false; 
+        } else if (!source.isOutputWrapperStyle() == target.isOutputWrapperStyle()) {
             return false; 
         } else {
             return isCompatible(source, target, compatibilityType, true);

Modified: tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceImpl.java?rev=1213702&r1=1213701&r2=1213702&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceImpl.java Tue Dec 13 14:12:38 2011
@@ -161,10 +161,10 @@ public class InterfaceImpl implements In
 
                     }
                 }
-                if (op.isWrapperStyle()) {
-                    WrapperInfo wrapper = op.getWrapper();
+                if (op.isInputWrapperStyle()) {
+                    WrapperInfo wrapper = op.getInputWrapper();
                     if (wrapper != null) {
-                        DataType<List<DataType>> unwrappedInputType = wrapper.getUnwrappedInputType();
+                        DataType<List<DataType>> unwrappedInputType = wrapper.getUnwrappedType();
                         if (unwrappedInputType != null) {
                             for (DataType d : unwrappedInputType.getLogical()) {
                                 if (d.getDataBinding() == null) {
@@ -172,12 +172,21 @@ public class InterfaceImpl implements In
                                 }
                             }
                         }
-                        DataType unwrappedOutputType = wrapper.getUnwrappedOutputType();
-                        if (unwrappedOutputType != null && unwrappedOutputType.getDataBinding() == null) {
-                            unwrappedOutputType.setDataBinding(dataBinding);
-                        }
                     }
                 }
+                if (op.isOutputWrapperStyle()) {
+                    WrapperInfo wrapper = op.getOutputWrapper();
+                    if (wrapper != null) {
+                        DataType<List<DataType>> unwrappedOutputType = wrapper.getUnwrappedType();
+                        if (unwrappedOutputType != null){
+                            for (DataType d : unwrappedOutputType.getLogical()) {
+                                if (d.getDataBinding() == null) {
+                                    d.setDataBinding(dataBinding);
+                                }
+                            }
+                        }
+                    }
+                }                
             }
         }
     }
@@ -188,7 +197,7 @@ public class InterfaceImpl implements In
         } else {
             dataType.setDataBinding(dataBinding);
         }
-    }
+    }    
 
     public void resetDataBinding(String dataBinding) {
         for (Operation op : getOperations()) {
@@ -213,29 +222,34 @@ public class InterfaceImpl implements In
                     setDataBinding((DataType) d.getLogical(), dataBinding);
                 }
             }
-            if (op.isWrapperStyle()) {
-                WrapperInfo wrapper = op.getWrapper();
-                if (wrapper != null) {
-                    DataType<List<DataType>> unwrappedInputType = wrapper.getUnwrappedInputType();
+            if (op.isInputWrapperStyle()) {
+                WrapperInfo inputWrapper = op.getInputWrapper();
+                if (inputWrapper != null) {
+                    DataType<List<DataType>> unwrappedInputType = inputWrapper.getUnwrappedType();
                     if (unwrappedInputType != null) {
                         for (DataType d : unwrappedInputType.getLogical()) {
                             setDataBinding(d, dataBinding);
                         }
                     }
-                    DataType<List<DataType>> unwrappedOutputType = wrapper.getUnwrappedOutputType();
+                }
+            }
+            if (op.isOutputWrapperStyle()) {
+                WrapperInfo outputWrapper = op.getOutputWrapper();
+                if (outputWrapper != null) {
+                    DataType<List<DataType>> unwrappedOutputType = outputWrapper.getUnwrappedType();
                     if (unwrappedOutputType != null) {
                         for (DataType d : unwrappedOutputType.getLogical()) {
                             setDataBinding(d, dataBinding);
                         }
                     }
                 }
-            }
+            }            
         }
     }
 
     public void resetInterfaceInputTypes(Interface newInterface){
         for (int i = 0; i < getOperations().size(); i++) {
-            // only remote interfaces only have a data type model defined
+            // only remote interfaces have a data type model defined
             // and in this case operations cannot be overloaded so match
             // operations by name
             Operation oldOperation = getOperations().get(i);
@@ -255,16 +269,16 @@ public class InterfaceImpl implements In
             oldOperation.setInputType(newOperation.getInputType());
 
             // set wrapper
-            if (newOperation.isWrapperStyle()) {
-                oldOperation.setWrapperStyle(true);
-                oldOperation.setWrapper(newOperation.getWrapper());
+            if (newOperation.isInputWrapperStyle()) {
+                oldOperation.setInputWrapperStyle(true);
+                oldOperation.setInputWrapper(newOperation.getInputWrapper());
             }
         }
     }
 
     public void resetInterfaceOutputTypes(Interface newInterface){
         for (int i = 0; i < getOperations().size(); i++) {
-            // only remote interfaces only have a data type model defined
+            // only remote interfaces have a data type model defined
             // and in this case operations cannot be overloaded so match
             // operations by name
             Operation oldOperation = getOperations().get(i);
@@ -287,9 +301,9 @@ public class InterfaceImpl implements In
             oldOperation.setFaultTypes(newOperation.getFaultTypes());
 
             // set wrapper
-            if (newOperation.isWrapperStyle()) {
-                oldOperation.setWrapperStyle(true);
-                oldOperation.setWrapper(newOperation.getWrapper());
+            if (newOperation.isOutputWrapperStyle()) {
+                oldOperation.setOutputWrapperStyle(true);
+                oldOperation.setOutputWrapper(newOperation.getOutputWrapper());
             }
         }
     }

Modified: tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/OperationImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/OperationImpl.java?rev=1213702&r1=1213701&r2=1213702&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/OperationImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/OperationImpl.java Tue Dec 13 14:12:38 2011
@@ -51,8 +51,10 @@ public class OperationImpl implements Op
     private Interface interfaze;
     private List<ParameterMode> parameterModes = new ArrayList<ParameterMode>();
     private boolean nonBlocking;
-    private boolean wrapperStyle;
-    private WrapperInfo wrapper;
+    private boolean inputWrapperStyle;
+    private boolean outputWrapperStyle;
+    private WrapperInfo inputWrapper;
+    private WrapperInfo outputWrapper;
     private boolean dynamic;
     private boolean notSubjectToWrapping;
 
@@ -167,38 +169,75 @@ public class OperationImpl implements Op
     /**
      * @return the wrapperInfo
      */
-    public WrapperInfo getWrapper() {
-        return wrapper;
+    public WrapperInfo getInputWrapper() {
+        return inputWrapper;
     }
 
     /**
      * @param wrapperInfo the wrapperInfo to set
      */
-    public void setWrapper(WrapperInfo wrapperInfo) {
-        this.wrapper = wrapperInfo;
+    public void setInputWrapper(WrapperInfo wrapperInfo) {
+        this.inputWrapper = wrapperInfo;
     }
+    
+    /**
+     * @return the wrapperInfo
+     */
+    public WrapperInfo getOutputWrapper() {
+        return outputWrapper;
+    }
+
+    /**
+     * @param wrapperInfo the wrapperInfo to set
+     */
+    public void setOutputWrapper(WrapperInfo wrapperInfo) {
+        this.outputWrapper = wrapperInfo;
+    }    
 
     /**
      * @return the wrapperStyle
      */
-    public boolean isWrapperStyle() {
-        return wrapperStyle;
+    public boolean isInputWrapperStyle() {
+        return inputWrapperStyle;
     }
 
     /**
      * @param wrapperStyle the wrapperStyle to set
      */
-    public void setWrapperStyle(boolean wrapperStyle) {
-        this.wrapperStyle = wrapperStyle;
+    public void setInputWrapperStyle(boolean wrapperStyle) {
+        this.inputWrapperStyle = wrapperStyle;
+    }
+    
+    /**
+     * @return the wrapperStyle
+     */
+    public boolean isOutputWrapperStyle() {
+        return outputWrapperStyle;
     }
 
+    /**
+     * @param wrapperStyle the wrapperStyle to set
+     */
+    public void setOutputWrapperStyle(boolean wrapperStyle) {
+        this.outputWrapperStyle = wrapperStyle;
+    }    
+
     public String getDataBinding() {
-        return wrapper != null ? wrapper.getDataBinding() : null;
+        if (inputWrapper != null){
+            return inputWrapper.getDataBinding();
+        }
+        if (outputWrapper != null){
+            return outputWrapper.getDataBinding();
+        }
+        return null;
     }
 
     public void setDataBinding(String dataBinding) {
-        if (wrapper != null) {
-            wrapper.setDataBinding(dataBinding);
+        if (inputWrapper != null) {
+            inputWrapper.setDataBinding(dataBinding);
+        }
+        if (outputWrapper != null) {
+            outputWrapper.setDataBinding(dataBinding);
         }
     }
 
@@ -258,8 +297,12 @@ public class OperationImpl implements Op
         copy.attributes.putAll(attributes);
 
         // [rfeng] We need to clone the wrapper as it holds the databinding information
-        if (wrapper != null) {
-            copy.wrapper = (WrapperInfo)wrapper.clone();
+        if (inputWrapper != null) {
+            copy.inputWrapper = (WrapperInfo)inputWrapper.clone();
+        }
+        
+        if (outputWrapper != null) {
+            copy.outputWrapper = (WrapperInfo)outputWrapper.clone();
         }
 
         return copy;

Modified: tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/util/WrapperInfo.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/util/WrapperInfo.java?rev=1213702&r1=1213701&r2=1213702&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/util/WrapperInfo.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/util/WrapperInfo.java Tue Dec 13 14:12:38 2011
@@ -31,7 +31,7 @@ import org.apache.tuscany.sca.interfaced
  * A WSDL operation qualifies for wrapper style mapping only if the following
  * criteria are met:
  * <ul>
- * <li>(i) The operation�s input and output messages (if present) each contain
+ * <li>(i) The operations input and output messages (if present) each contain
  * only a single part
  * <li>(ii) The input message part refers to a global element declaration whose
  * localname is equal to the operation name
@@ -49,83 +49,123 @@ import org.apache.tuscany.sca.interfaced
  * @tuscany.spi.extension.asclient
  */
 public class WrapperInfo implements Cloneable {
-    private ElementInfo inputWrapperElement;
-
-    private ElementInfo outputWrapperElement;
-
-    private List<ElementInfo> inputChildElements;
-
-    private List<ElementInfo> outputChildElements;
-
-    // The data type of the unwrapped input child elements 
-    private DataType<List<DataType>> unwrappedInputType;
-
-    // The data type of the unwrapped output child elements
-    private DataType<List<DataType>> unwrappedOutputType;
-
-    // The data for the input/output wrappers
+    
+    // The databinding for the wrapper
     private String dataBinding;
-
-    // The data type for the input (request) wrapper bean
-    private DataType<XMLType> inputWrapperType;
-    // The data type for the output (response) wrapper bean
-    private DataType<XMLType> outputWrapperType;
+    
+    // The XML element representation of the wrapper
+    private ElementInfo wrapperElement;
+    
+    // The XML child elements of the wrapper
+    private List<ElementInfo> childElements;
+    
+    // The data type for the wrapper bean
+    private DataType<XMLType> wrapperType;
+    
+    // The data types of the unwrapped child elements 
+    private DataType<List<DataType>> unwrappedType;
 
     public WrapperInfo(String dataBinding,
-                       ElementInfo inputWrapperElement,
-                       ElementInfo outputWrapperElement,
-                       List<ElementInfo> inputElements,
-                       List<ElementInfo> outputElements) {
+                       ElementInfo wrapperElement,
+                       List<ElementInfo> childElements) {
         super();
         this.dataBinding = dataBinding;
-        this.inputWrapperElement = inputWrapperElement;
-        this.outputWrapperElement = outputWrapperElement;
-        this.inputChildElements = inputElements;
-        this.outputChildElements = outputElements;
+        this.wrapperElement = wrapperElement;
+        this.childElements = childElements;
     }
 
     /**
-     * @return the inputElements
+     * Get the list of XML child elements that this 
+     * wrapper wraps
+     * 
+     * @return the childElements
      */
-    public List<ElementInfo> getInputChildElements() {
-        return inputChildElements;
+    public List<ElementInfo> getChildElements() {
+        return childElements;
     }
 
     /**
-     * @return the inputWrapperElement
+     * Get the XML element that represents this wrapper 
+     * 
+     * @return the wrapperElement
      */
-    public ElementInfo getInputWrapperElement() {
-        return inputWrapperElement;
+    public ElementInfo getWrapperElement() {
+        return wrapperElement;
     }
-
+    
     /**
-     * @return the outputElements
+     * Get the databinding that this wrapper will
+     * be subject to
+     * 
+     * @return dataBinding
      */
-    public List<ElementInfo> getOutputChildElements() {
-        return outputChildElements;
+    public String getDataBinding() {
+        return dataBinding;
     }
 
     /**
-     * @return the outputWrapperElement
+     * Set the databinding that this wrapper will
+     * be subject to
+     * 
+     * @param dataBinding
+     */
+    public void setDataBinding(String dataBinding) {
+        this.dataBinding = dataBinding;
+    }    
+   
+    /**
+     * Get the Tuscany data type for the wrapper
+     * 
+     * @return Tuscany data type for the wrapper
      */
-    public ElementInfo getOutputWrapperElement() {
-        return outputWrapperElement;
+    public DataType<XMLType> getWrapperType() {
+        return wrapperType;
     }
 
     /**
-     * @return the unwrappedInputType
+     * Set the Tuscany data type for the wrapper
+     * 
+     * @param wrapperType Tuscany data type for the wrapper
+     */
+    public void setWrapperType(DataType<XMLType> wrapperType) {
+        this.wrapperType = wrapperType;
+    }   
+    
+    /**
+     * Return the Java class for the wrapper
+     * 
+     * @return Java class for the wrapper
+     */
+    public Class<?> getWrapperClass() {
+        return wrapperType == null ? null : wrapperType.getPhysical();
+    }    
+
+    @Override
+    public Object clone() throws CloneNotSupportedException {
+        WrapperInfo copy = (WrapperInfo) super.clone();
+        if (wrapperType != null) {
+            copy.wrapperType = (DataType<XMLType>)wrapperType.clone();
+        }
+        return copy;
+
+    }
+ 
+    /**
+     * Creates and caches the data types for the child elements 
+     * 
+     * @return The list of child element data types
      */
-    public DataType<List<DataType>> getUnwrappedInputType() {
-        if (unwrappedInputType == null) {
+    public DataType<List<DataType>> getUnwrappedType() {
+        if (unwrappedType == null) {
             List<DataType> childTypes = new ArrayList<DataType>();
-            for (ElementInfo element : getInputChildElements()) {
+            for (ElementInfo element : getChildElements()) {
                 DataType type = getDataType(element);
                 childTypes.add(type);
             }
-            unwrappedInputType = new DataTypeImpl<List<DataType>>("idl:unwrapped.input", Object[].class, childTypes);
+            unwrappedType = new DataTypeImpl<List<DataType>>("idl:unwrapped", Object[].class, childTypes);
         }
-        return unwrappedInputType;
-    }
+        return unwrappedType;
+    }  
 
     private DataType getDataType(ElementInfo element) {
         DataType type = null;
@@ -138,84 +178,4 @@ public class WrapperInfo implements Clon
         return type;
     }
 
-    /**
-     * @return the unwrappedOutputType
-     */
-    public DataType<List<DataType>> getUnwrappedOutputType() {
-        if (unwrappedOutputType == null) {
-            List<DataType> childTypes = new ArrayList<DataType>();
-            for (ElementInfo element : getOutputChildElements()) {
-                DataType type = getDataType(element);
-                childTypes.add(type);
-            }
-            unwrappedOutputType = new DataTypeImpl<List<DataType>>("idl:unwrapped.input", Object[].class, childTypes);
-        }
-        return unwrappedOutputType;    }
-
-    public Class<?> getInputWrapperClass() {
-        return inputWrapperType == null ? null : inputWrapperType.getPhysical();
-    }
-
-    public Class<?> getOutputWrapperClass() {
-        return outputWrapperType == null ? null : outputWrapperType.getPhysical();
-    }
-
-    public String getDataBinding() {
-        return dataBinding;
-    }
-
-    public void setDataBinding(String dataBinding) {
-        this.dataBinding = dataBinding;
-    }
-
-    public DataType<XMLType> getInputWrapperType() {
-        return inputWrapperType;
-    }
-
-    public void setInputWrapperType(DataType<XMLType> inputWrapperType) {
-        this.inputWrapperType = inputWrapperType;
-    }
-
-    public DataType<XMLType> getOutputWrapperType() {
-        return outputWrapperType;
-    }
-
-    public void setOutputWrapperType(DataType<XMLType> outputWrapperType) {
-        this.outputWrapperType = outputWrapperType;
-    }
-
-    @Override
-    public Object clone() throws CloneNotSupportedException {
-        WrapperInfo copy = (WrapperInfo) super.clone();
-        if (inputWrapperType != null) {
-            copy.inputWrapperType = (DataType<XMLType>)inputWrapperType.clone();
-        }
-        if (outputWrapperType != null) {
-            copy.outputWrapperType = (DataType<XMLType>)outputWrapperType.clone();
-        }
-        if (unwrappedInputType != null) {
-            List<DataType> clonedLogicalTypes = new ArrayList<DataType>();
-            for (DataType t : unwrappedInputType.getLogical()) {
-                DataType type = (DataType) t.clone();
-                clonedLogicalTypes.add(type);
-            }
-            DataType<List<DataType>> clonedUnwrappedInputType =
-                new DataTypeImpl<List<DataType>>(unwrappedInputType.getPhysical(), clonedLogicalTypes);
-            clonedUnwrappedInputType.setDataBinding(unwrappedInputType.getDataBinding());
-            copy.unwrappedInputType = clonedUnwrappedInputType;
-        }
-        if (unwrappedOutputType != null) {
-            List<DataType> clonedLogicalTypes = new ArrayList<DataType>();
-            for (DataType t : unwrappedOutputType.getLogical()) {
-                DataType type = (DataType) t.clone();
-                clonedLogicalTypes.add(type);
-            }
-            DataType<List<DataType>> clonedUnwrappedOutputType =
-                new DataTypeImpl<List<DataType>>(unwrappedOutputType.getPhysical(), clonedLogicalTypes);
-            clonedUnwrappedOutputType.setDataBinding(unwrappedOutputType.getDataBinding());
-            copy.unwrappedOutputType = clonedUnwrappedOutputType;
-        }
-        return copy;
-
-    }
 }

Modified: tuscany/sca-java-2.x/trunk/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestOperation.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestOperation.java?rev=1213702&r1=1213701&r2=1213702&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestOperation.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestOperation.java Tue Dec 13 14:12:38 2011
@@ -71,9 +71,13 @@ public class TestOperation implements Op
         return outputType;
     }
 
-    public WrapperInfo getWrapper() {
+    public WrapperInfo getInputWrapper() {
         return null;
     }
+    
+    public WrapperInfo getOutputWrapper() {
+        return null;
+    }    
 
     public boolean isDynamic() {
         return false;
@@ -87,9 +91,13 @@ public class TestOperation implements Op
         return false;
     }
 
-    public boolean isWrapperStyle() {
+    public boolean isInputWrapperStyle() {
         return false;
     }
+    
+    public boolean isOutputWrapperStyle() {
+        return false;
+    }    
 
     public void setDataBinding(String dataBinding) {
 
@@ -131,14 +139,22 @@ public class TestOperation implements Op
 
     }
 
-    public void setWrapper(WrapperInfo wrapperInfo) {
+    public void setInputWrapper(WrapperInfo wrapperInfo) {
 
     }
 
-    public void setWrapperStyle(boolean wrapperStyle) {
+    public void setOutputWrapper(WrapperInfo wrapperInfo) {
+
+    }
+    
+    public void setInputWrapperStyle(boolean wrapperStyle) {
 
     }
 
+    public void setOutputWrapperStyle(boolean wrapperStyle) {
+
+    }
+    
     public List<PolicySet> getApplicablePolicySets() {
         return null;
     }

Modified: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsbytesxml/runtime/WireFormatJMSBytesXMLServiceProvider.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsbytesxml/runtime/WireFormatJMSBytesXMLServiceProvider.java?rev=1213702&r1=1213701&r2=1213702&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsbytesxml/runtime/WireFormatJMSBytesXMLServiceProvider.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsbytesxml/runtime/WireFormatJMSBytesXMLServiceProvider.java Tue Dec 13 14:12:38 2011
@@ -64,7 +64,7 @@ public class WireFormatJMSBytesXMLServic
         } 
         
         // create a local interface contract that is configured specifically to 
-        // deal with the data format that this wire format is expecting to sent to 
+        // deal with the data format that this wire format is expecting to send to 
         // and receive from the databinding interceptor. The request/response parts of 
         // this interface contract will be copied into the binding interface contract
         // as required

Modified: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsdefault/runtime/WireFormatJMSDefaultReferenceProvider.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsdefault/runtime/WireFormatJMSDefaultReferenceProvider.java?rev=1213702&r1=1213701&r2=1213702&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsdefault/runtime/WireFormatJMSDefaultReferenceProvider.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsdefault/runtime/WireFormatJMSDefaultReferenceProvider.java Tue Dec 13 14:12:38 2011
@@ -121,7 +121,7 @@ public class WireFormatJMSDefaultReferen
                 // like the separate code paths imply.  Not sure how many @OneWay tests we have, this might 
                 // not be an issue.  
 
-                if (matchingWsdlOp.isWrapperStyle()) {
+                if (matchingWsdlOp.isInputWrapperStyle()) {
                     if (op.getInputType().getLogical().size() == 1) {
                         this.inputWrapperMap.put(name, true);
                     } else {
@@ -131,10 +131,10 @@ public class WireFormatJMSDefaultReferen
                     this.inputWrapperMap.put(name, false);
                 }
 
-                if (matchingWsdlOp.isWrapperStyle()) {
+                if (matchingWsdlOp.isOutputWrapperStyle()) {
                     // we only need to know what the wrapper is on the deserialization
                     // might need to change this when there input/output wrapper style is different
-                    ElementInfo ei = op.getWrapper().getOutputWrapperElement();
+                    ElementInfo ei = op.getOutputWrapper().getWrapperElement();
                     this.outputWrapperMap.put(name, xmlHelper.createWrapper(ei.getQName()));
                 } 
             }

Modified: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsdefault/runtime/WireFormatJMSDefaultServiceProvider.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsdefault/runtime/WireFormatJMSDefaultServiceProvider.java?rev=1213702&r1=1213701&r2=1213702&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsdefault/runtime/WireFormatJMSDefaultServiceProvider.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsdefault/runtime/WireFormatJMSDefaultServiceProvider.java Tue Dec 13 14:12:38 2011
@@ -115,16 +115,16 @@ public class WireFormatJMSDefaultService
                 // TODO - not sure we really support viewing the input/output as separately wrapped 
                 // like the separate code paths imply.  Not sure how many @OneWay tests we have, this might 
                 // not be an issue.  
-                if (matchingWsdlOp.isWrapperStyle()) {
+                if (matchingWsdlOp.isInputWrapperStyle()) {
                     if (op.getInputType().getLogical().size() == 1) {
                         // we only need to know what the wrapper is on the deserialization
                         // might need to change this when the input/output wrapper style is different
-                        ElementInfo ei = op.getWrapper().getInputWrapperElement();
+                        ElementInfo ei = op.getInputWrapper().getWrapperElement();
                         this.inputWrapperMap.put(name, xmlHelper.createWrapper(ei.getQName()));
                     }
                 }
 
-                if (matchingWsdlOp.isWrapperStyle()) {
+                if (matchingWsdlOp.isOutputWrapperStyle()) {
                     this.outputWrapperMap.put(name, true);
                 } else {
                     this.outputWrapperMap.put(name, false);

Modified: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmstextxml/runtime/WireFormatJMSTextXMLReferenceProvider.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmstextxml/runtime/WireFormatJMSTextXMLReferenceProvider.java?rev=1213702&r1=1213701&r2=1213702&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmstextxml/runtime/WireFormatJMSTextXMLReferenceProvider.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmstextxml/runtime/WireFormatJMSTextXMLReferenceProvider.java Tue Dec 13 14:12:38 2011
@@ -64,7 +64,7 @@ public class WireFormatJMSTextXMLReferen
         }
 
         // create a local interface contract that is configured specifically to 
-        // deal with the data format that this wire format is expecting to sent to 
+        // deal with the data format that this wire format is expecting to send to 
         // and receive from the databinding interceptor. The request/response parts of 
         // this interface contract will be copied into the binding interface contract
         // as required

Modified: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmstextxml/runtime/WireFormatJMSTextXMLServiceProvider.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmstextxml/runtime/WireFormatJMSTextXMLServiceProvider.java?rev=1213702&r1=1213701&r2=1213702&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmstextxml/runtime/WireFormatJMSTextXMLServiceProvider.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmstextxml/runtime/WireFormatJMSTextXMLServiceProvider.java Tue Dec 13 14:12:38 2011
@@ -67,7 +67,7 @@ public class WireFormatJMSTextXMLService
         }
         
         // create a local interface contract that is configured specifically to 
-        // deal with the data format that this wire format is expecting to sent to 
+        // deal with the data format that this wire format is expecting to send to 
         // and receive from the databinding interceptor. The request/response parts of 
         // this interface contract will be copied into the binding interface contract
         // as required

Modified: tuscany/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JsonRpcInvoker.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JsonRpcInvoker.java?rev=1213702&r1=1213701&r2=1213702&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JsonRpcInvoker.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JsonRpcInvoker.java Tue Dec 13 14:12:38 2011
@@ -82,7 +82,7 @@ public class JsonRpcInvoker implements I
             post = new HttpPost(uri);
             HttpEntity entity = null;
             Object[] args = msg.getBody();
-            final String db = msg.getOperation().getWrapper().getDataBinding();
+            final String db = msg.getOperation().getInputWrapper().getDataBinding();
 
             if (!db.equals(JSONDataBinding.NAME)) {
                 Object[] params = new Object[0];

Modified: tuscany/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JsonRpcServlet.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JsonRpcServlet.java?rev=1213702&r1=1213701&r2=1213702&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JsonRpcServlet.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JsonRpcServlet.java Tue Dec 13 14:12:38 2011
@@ -188,7 +188,7 @@ public class JsonRpcServlet extends Http
 
         requestMessage.getHeaders().put("RequestMessage", request);
 
-        if (jsonOperation.getWrapper().getDataBinding().equals(JSONDataBinding.NAME)) {
+        if (jsonOperation.getInputWrapper().getDataBinding().equals(JSONDataBinding.NAME)) {
             requestMessage.setBody(new Object[] {JacksonHelper.toString(request.getJsonNode())});
         } else {
             requestMessage.setBody(params);
@@ -210,7 +210,7 @@ public class JsonRpcServlet extends Http
         }
 
         if (!responseMessage.isFault()) {
-            if (jsonOperation.getWrapper().getDataBinding().equals(JSONDataBinding.NAME)) {
+            if (jsonOperation.getOutputWrapper().getDataBinding().equals(JSONDataBinding.NAME)) {
                 result = responseMessage.getBody();
                 return new JsonRpc20Response((ObjectNode)JacksonHelper.MAPPER.readTree(result.toString()));
             } else {
@@ -262,7 +262,7 @@ public class JsonRpcServlet extends Http
         requestMessage.setOperation(jsonOperation);
 
         requestMessage.getHeaders().put("RequestMessage", request);
-        if (jsonOperation.getWrapper().getDataBinding().equals(JSONDataBinding.NAME)) {
+        if (jsonOperation.getInputWrapper().getDataBinding().equals(JSONDataBinding.NAME)) {
             requestMessage.setBody(new Object[] {JacksonHelper.toString(request.getJsonNode())});
         } else {
             requestMessage.setBody(params);
@@ -283,7 +283,7 @@ public class JsonRpcServlet extends Http
         }
 
         if (!responseMessage.isFault()) {
-            if (jsonOperation.getWrapper().getDataBinding().equals(JSONDataBinding.NAME)) {
+            if (jsonOperation.getOutputWrapper().getDataBinding().equals(JSONDataBinding.NAME)) {
                 result = responseMessage.getBody();
                 return new JsonRpc10Response((ObjectNode)JacksonHelper.MAPPER.readTree(result.toString()));
             } else {

Modified: tuscany/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java?rev=1213702&r1=1213701&r2=1213702&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java Tue Dec 13 14:12:38 2011
@@ -230,11 +230,11 @@ public class Interface2WSDLGenerator {
     private Map<XMLTypeHelper, List<DataType>> getDataTypes(Interface intf, boolean useWrapper, Map<String, XMLTypeHelper> helpers) {
         Map<XMLTypeHelper, List<DataType>> dataTypes = new HashMap<XMLTypeHelper, List<DataType>>();
         for (Operation op : intf.getOperations()) {
-            WrapperInfo wrapper = op.getWrapper();
+            WrapperInfo inputWrapper = op.getInputWrapper();
             DataType dt1 = null;
-            boolean useInputWrapper = useWrapper & wrapper != null;
+            boolean useInputWrapper = useWrapper & inputWrapper != null;
             if (useInputWrapper) {
-                dt1 = wrapper.getInputWrapperType();
+                dt1 = inputWrapper.getWrapperType();
                 useInputWrapper &= inputTypesCompatible(dt1, op.getInputType(), helpers);
             }
             if (useInputWrapper) {
@@ -245,10 +245,11 @@ public class Interface2WSDLGenerator {
                 }
             }
             
+            WrapperInfo outputWrapper = op.getOutputWrapper();
             DataType dt2 = null;
-            boolean useOutputWrapper = useWrapper & wrapper != null;
+            boolean useOutputWrapper = useWrapper & outputWrapper != null;
             if (useOutputWrapper) {
-                dt2 = wrapper.getOutputWrapperType();
+                dt2 = outputWrapper.getWrapperType();
                 useOutputWrapper &= outputTypeCompatible(dt2, op.getOutputType(), helpers);
             }
             if (useOutputWrapper) {
@@ -334,7 +335,7 @@ public class Interface2WSDLGenerator {
             javax.wsdl.Operation operation = generateOperation(definition, op, helpers, wrappers);
             portType.addOperation(operation);
             String action = ((JavaOperation)op).getAction();
-            if ((action == null || "".equals(action)) && !op.isWrapperStyle() && op.getWrapper() == null) {
+            if ((action == null || "".equals(action)) && !op.isInputWrapperStyle() && op.getInputWrapper() == null) {
                 // Bare style
                 action = "urn:" + op.getName();
             }
@@ -631,7 +632,7 @@ public class Interface2WSDLGenerator {
 
         List<ElementInfo> elements = null;
         // FIXME: By default, java interface is mapped to doc-lit-wrapper style WSDL
-        if (op.getWrapper() != null) {
+        if (op.getInputWrapper() != null) {
             // Generate doc-lit-wrapper style
             inputMsg.addPart(generateWrapperPart(definition, op, helpers, wrappers, true));
         } else {
@@ -658,7 +659,7 @@ public class Interface2WSDLGenerator {
             outputMsg.setUndefined(false);
             definition.addMessage(outputMsg);
 
-            if (op.getWrapper() != null) {
+            if (op.getOutputWrapper() != null) {
                 outputMsg.addPart(generateWrapperPart(definition, op, helpers, wrappers, false));
             } else {
                 
@@ -741,12 +742,15 @@ public class Interface2WSDLGenerator {
         Part part = definition.createPart();
         String partName = input ? operation.getName() : (operation.getName() + "Response");
         part.setName(partName);
-        WrapperInfo opWrapper = operation.getWrapper();
-        if (opWrapper != null) {
+        
+        WrapperInfo inputWrapper = operation.getInputWrapper();
+        WrapperInfo outputWrapper = operation.getOutputWrapper();
+        
+        if ((inputWrapper != null) && (outputWrapper != null)) {
             ElementInfo elementInfo =
-                input ? opWrapper.getInputWrapperElement() : opWrapper.getOutputWrapperElement();
+                input ? inputWrapper.getWrapperElement() : outputWrapper.getWrapperElement();
             List<ElementInfo> elements =
-                input ? opWrapper.getInputChildElements() : opWrapper.getOutputChildElements();
+                input ? inputWrapper.getChildElements() : outputWrapper.getChildElements();
             QName wrapperName = elementInfo.getQName();
             part.setElementName(wrapperName);
             addNamespace(definition, wrapperName);

Modified: tuscany/sca-java-2.x/trunk/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/impl/WebServiceBindingImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/impl/WebServiceBindingImpl.java?rev=1213702&r1=1213701&r2=1213702&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/impl/WebServiceBindingImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-ws/src/main/java/org/apache/tuscany/sca/binding/ws/impl/WebServiceBindingImpl.java Tue Dec 13 14:12:38 2011
@@ -402,7 +402,7 @@ class WebServiceBindingImpl implements W
 
     protected void setIsMessageWrapped() {
         if (getBindingInterfaceContract() != null) {
-            isMessageWrapped = getBindingInterfaceContract().getInterface().getOperations().get(0).isWrapperStyle();
+            isMessageWrapped = getBindingInterfaceContract().getInterface().getOperations().get(0).isInputWrapperStyle();
         }
     }
 

Modified: tuscany/sca-java-2.x/trunk/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/processor/DataBindingJavaInterfaceProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/processor/DataBindingJavaInterfaceProcessor.java?rev=1213702&r1=1213701&r2=1213702&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/processor/DataBindingJavaInterfaceProcessor.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/processor/DataBindingJavaInterfaceProcessor.java Tue Dec 13 14:12:38 2011
@@ -70,7 +70,8 @@ public class DataBindingJavaInterfacePro
 
             if (dataBindingId != null) {
                 op.setDataBinding(dataBindingId);
-                op.setWrapperStyle(wrapperStyle);
+                op.setInputWrapperStyle(wrapperStyle);
+                op.setOutputWrapperStyle(wrapperStyle);
             }
 
             Method method = operation.getJavaMethod();
@@ -85,7 +86,8 @@ public class DataBindingJavaInterfacePro
                 dataBindingId = dataBinding.value();
                 wrapperStyle = dataBinding.wrapped();
                 operation.setDataBinding(dataBindingId);
-                operation.setWrapperStyle(wrapperStyle);
+                operation.setInputWrapperStyle(wrapperStyle);
+                operation.setOutputWrapperStyle(wrapperStyle);
             }
 
             // FIXME: We need a better way to identify simple java types

Modified: tuscany/sca-java-2.x/trunk/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/processor/WrapperJavaInterfaceProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/processor/WrapperJavaInterfaceProcessor.java?rev=1213702&r1=1213701&r2=1213702&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/processor/WrapperJavaInterfaceProcessor.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/processor/WrapperJavaInterfaceProcessor.java Tue Dec 13 14:12:38 2011
@@ -55,12 +55,13 @@ public class WrapperJavaInterfaceProcess
             return;
         }
         for (Operation operation : javaInterface.getOperations()) {
-            WrapperInfo wrapper = operation.getWrapper();
-            if (wrapper == null) {
+            WrapperInfo inputWrapperInfo = operation.getInputWrapper();
+            WrapperInfo outputWrapperInfo = operation.getOutputWrapper();
+            if (inputWrapperInfo == null || outputWrapperInfo == null) {
                 continue;
             }
             // JIRA: TUSCANY-842
-            String db = wrapper.getDataBinding();
+            String db = inputWrapperInfo.getDataBinding();
             if (db == null || JAXB_DATABINDING.equals(db)) {
                 db = assignOperationDataBinding(operation);
             }
@@ -69,13 +70,13 @@ public class WrapperJavaInterfaceProcess
             org.apache.tuscany.sca.databinding.DataBinding dbObj = dataBindingRegistry.getDataBinding(db);
             WrapperHandler handler = dbObj == null ? null : dbObj.getWrapperHandler();
             if (handler != null) {
-                wrapper.setInputWrapperType(handler.getWrapperType(operation, true));
-                wrapper.setOutputWrapperType(handler.getWrapperType(operation, false));
+                inputWrapperInfo.setWrapperType(handler.getWrapperType(operation, true));
+                outputWrapperInfo.setWrapperType(handler.getWrapperType(operation, false));
             }
             if (dbObj != null && handler == null) {
                 // To avoid JAXB wrapper bean generation
-                wrapper.setInputWrapperType(null);
-                wrapper.setOutputWrapperType(null);
+                inputWrapperInfo.setWrapperType(null);
+                outputWrapperInfo.setWrapperType(null);
             }
         }
     }
@@ -117,10 +118,10 @@ public class WrapperJavaInterfaceProcess
 
         if (dbs.size() == 1) {
             String db = dbs.iterator().next();
-            operation.getWrapper().setDataBinding(db);
+            operation.getInputWrapper().setDataBinding(db);
             return db;
         } else {
-            return operation.getWrapper().getDataBinding();
+            return operation.getInputWrapper().getDataBinding();
         }
     }
 }

Modified: tuscany/sca-java-2.x/trunk/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Input2InputTransformer.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Input2InputTransformer.java?rev=1213702&r1=1213701&r2=1213702&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Input2InputTransformer.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Input2InputTransformer.java Tue Dec 13 14:12:38 2011
@@ -97,13 +97,13 @@ public class Input2InputTransformer exte
         if (w1 == null || w2 == null) {
             return false;
         }
-        if (!w1.getInputWrapperElement().equals(w2.getInputWrapperElement())) {
+        if (!w1.getWrapperElement().equals(w2.getWrapperElement())) {
             return false;
         }
 
         // Compare the child elements
-        List<ElementInfo> list1 = w1.getInputChildElements();
-        List<ElementInfo> list2 = w2.getInputChildElements();
+        List<ElementInfo> list1 = w1.getChildElements();
+        List<ElementInfo> list2 = w2.getChildElements();
         if (list1.size() != list2.size()) {
             return false;
         }
@@ -125,7 +125,7 @@ public class Input2InputTransformer exte
         // Check if the source operation is wrapped
         DataType<List<DataType>> sourceType = context.getSourceDataType();
         Operation sourceOp = context.getSourceOperation();
-        boolean sourceWrapped = sourceOp != null && sourceOp.isWrapperStyle() && sourceOp.getWrapper() != null;
+        boolean sourceWrapped = sourceOp != null && sourceOp.isInputWrapperStyle() && sourceOp.getInputWrapper() != null;
         boolean sourceNotSubjectToWrapping = sourceOp != null && sourceOp.isNotSubjectToWrapping();
 
         // Find the wrapper handler for source data
@@ -136,7 +136,7 @@ public class Input2InputTransformer exte
         // Check if the target operation is wrapped
         DataType<List<DataType>> targetType = context.getTargetDataType();
         Operation targetOp = (Operation)context.getTargetOperation();
-        boolean targetWrapped = targetOp != null && targetOp.isWrapperStyle() && targetOp.getWrapper() != null;
+        boolean targetWrapped = targetOp != null && targetOp.isInputWrapperStyle() && targetOp.getInputWrapper() != null;
         boolean targetNotSubjectToWrapping = targetOp != null && targetOp.isNotSubjectToWrapping();
 
         // Find the wrapper handler for target data
@@ -146,7 +146,7 @@ public class Input2InputTransformer exte
 
         if ((!sourceWrapped && !sourceNotSubjectToWrapping) && targetWrapped) {
             // Unwrapped --> Wrapped
-            WrapperInfo wrapper = targetOp.getWrapper();
+            WrapperInfo wrapper = targetOp.getInputWrapper();
             // ElementInfo wrapperElement = wrapper.getInputWrapperElement();
 
             // Class<?> targetWrapperClass = wrapper != null ? wrapper.getInputWrapperClass() : null;
@@ -159,12 +159,12 @@ public class Input2InputTransformer exte
 
             // If the source can be wrapped, wrapped it first
             if (sourceWrapperHandler != null) {
-                WrapperInfo sourceWrapperInfo = sourceOp.getWrapper();
-                DataType sourceWrapperType = sourceWrapperInfo != null ? sourceWrapperInfo.getInputWrapperType() : null;
+                WrapperInfo sourceWrapperInfo = sourceOp.getInputWrapper();
+                DataType sourceWrapperType = sourceWrapperInfo != null ? sourceWrapperInfo.getWrapperType() : null;
 
                 // We only do wrapper to wrapper transformation if the source has a wrapper and both sides
                 // match by XML structure
-                if (sourceWrapperType != null && matches(sourceOp.getWrapper(), targetOp.getWrapper())) {
+                if (sourceWrapperType != null && matches(sourceOp.getInputWrapper(), targetOp.getInputWrapper())) {
                     Class<?> sourceWrapperClass = sourceWrapperType.getPhysical();
 
                     // Create the source wrapper
@@ -187,7 +187,7 @@ public class Input2InputTransformer exte
             }
             // Fall back to child by child transformation
             Object targetWrapper = targetWrapperHandler.create(targetOp, true);
-            List<DataType> argTypes = wrapper.getUnwrappedInputType().getLogical();
+            List<DataType> argTypes = wrapper.getUnwrappedType().getLogical();
             Object[] targetChildren = new Object[source.length];
             for (int i = 0; i < source.length; i++) {
                 // ElementInfo argElement = wrapper.getInputChildElements().get(i);
@@ -213,10 +213,10 @@ public class Input2InputTransformer exte
                 // under the wrapper that only matches by position
                 if (sourceWrapperHandler.isInstance(sourceWrapper, sourceOp, true)) {
 
-                    WrapperInfo targetWrapperInfo = targetOp.getWrapper();
+                    WrapperInfo targetWrapperInfo = targetOp.getInputWrapper();
                     DataType targetWrapperType =
-                        targetWrapperInfo != null ? targetWrapperInfo.getInputWrapperType() : null;
-                    if (targetWrapperType != null && matches(sourceOp.getWrapper(), targetOp.getWrapper())) {
+                        targetWrapperInfo != null ? targetWrapperInfo.getWrapperType() : null;
+                    if (targetWrapperType != null && matches(sourceOp.getInputWrapper(), targetOp.getInputWrapper())) {
                         Object targetWrapper =
                             mediator.mediate(sourceWrapper, sourceType.getLogical().get(0), targetWrapperType, context
                                 .getMetadata());
@@ -228,7 +228,7 @@ public class Input2InputTransformer exte
             Object[] sourceChildren = sourceWrapperHandler.getChildren(sourceWrapper, sourceOp, true).toArray();
             target = new Object[sourceChildren.length];
             for (int i = 0; i < sourceChildren.length; i++) {
-                DataType<XMLType> childType = sourceOp.getWrapper().getUnwrappedInputType().getLogical().get(i);
+                DataType<XMLType> childType = sourceOp.getInputWrapper().getUnwrappedType().getLogical().get(i);
                 target[i] =
                     mediator.mediate(sourceChildren[i], childType, targetType.getLogical().get(i), context
                         .getMetadata());
@@ -260,7 +260,7 @@ public class Input2InputTransformer exte
     }
 
     private String getDataBinding(Operation operation) {
-        WrapperInfo wrapper = operation.getWrapper();
+        WrapperInfo wrapper = operation.getInputWrapper();
         if (wrapper != null) {
             return wrapper.getDataBinding();
         } else {

Modified: tuscany/sca-java-2.x/trunk/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Output2OutputTransformer.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Output2OutputTransformer.java?rev=1213702&r1=1213701&r2=1213702&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Output2OutputTransformer.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Output2OutputTransformer.java Tue Dec 13 14:12:38 2011
@@ -91,7 +91,7 @@ public class Output2OutputTransformer ex
     }
 
     private String getDataBinding(Operation operation) {
-        WrapperInfo wrapper = operation.getWrapper();
+        WrapperInfo wrapper = operation.getOutputWrapper();
         if (wrapper != null) {
             return wrapper.getDataBinding();
         } else {
@@ -122,13 +122,13 @@ public class Output2OutputTransformer ex
         if (w1 == null || w2 == null) {
             return false;
         }
-        if (!w1.getOutputWrapperElement().equals(w2.getOutputWrapperElement())) {
+        if (!w1.getWrapperElement().equals(w2.getWrapperElement())) {
             return false;
         }
 
         // Compare the child elements
-        List<ElementInfo> list1 = w1.getOutputChildElements();
-        List<ElementInfo> list2 = w2.getOutputChildElements();
+        List<ElementInfo> list1 = w1.getChildElements();
+        List<ElementInfo> list2 = w2.getChildElements();
         if (list1.size() != list2.size()) {
             return false;
         }
@@ -151,7 +151,7 @@ public class Output2OutputTransformer ex
             
             DataType<List<DataType>> sourceType = context.getSourceDataType();
             Operation sourceOp = context.getSourceOperation();
-            boolean sourceWrapped = sourceOp != null && sourceOp.isWrapperStyle() && sourceOp.getWrapper() != null;
+            boolean sourceWrapped = sourceOp != null && sourceOp.isOutputWrapperStyle() && sourceOp.getOutputWrapper() != null;
             boolean sourceNotSubjectToWrapping = sourceOp != null && sourceOp.isNotSubjectToWrapping();
 
             WrapperHandler sourceWrapperHandler = null;
@@ -160,7 +160,7 @@ public class Output2OutputTransformer ex
 
             DataType<List<DataType>> targetType = context.getTargetDataType();
             Operation targetOp = (Operation)context.getTargetOperation();
-            boolean targetWrapped = targetOp != null && targetOp.isWrapperStyle() && targetOp.getWrapper() != null;
+            boolean targetWrapped = targetOp != null && targetOp.isOutputWrapperStyle() && targetOp.getOutputWrapper() != null;
             boolean targetNotSubjectToWrapping = targetOp != null && targetOp.isNotSubjectToWrapping();
 
             WrapperHandler targetWrapperHandler = null;
@@ -169,10 +169,10 @@ public class Output2OutputTransformer ex
 
             if ((!sourceWrapped &&!sourceNotSubjectToWrapping) && targetWrapped) {
                 // Unwrapped --> Wrapped
-                WrapperInfo wrapper = targetOp.getWrapper();
-                ElementInfo wrapperElement = wrapper.getOutputWrapperElement();
-                List<ElementInfo> childElements = wrapper.getOutputChildElements();
-                Class<?> targetWrapperClass = wrapper != null ? wrapper.getOutputWrapperClass() : null;
+                WrapperInfo wrapper = targetOp.getOutputWrapper();
+                ElementInfo wrapperElement = wrapper.getWrapperElement();
+                List<ElementInfo> childElements = wrapper.getChildElements();
+                Class<?> targetWrapperClass = wrapper != null ? wrapper.getWrapperClass() : null;
 
                 Object[] outputs = null;            
                 if ( !sourceOp.hasArrayWrappedOutput() ) {
@@ -183,11 +183,11 @@ public class Output2OutputTransformer ex
                 
                 // If the source can be wrapped, wrapped it first
                 if (sourceWrapperHandler != null) {
-                    WrapperInfo sourceWrapperInfo = sourceOp.getWrapper();
+                    WrapperInfo sourceWrapperInfo = sourceOp.getOutputWrapper();
                     DataType sourceWrapperType =
-                        sourceWrapperInfo != null ? sourceWrapperInfo.getOutputWrapperType() : null;
+                        sourceWrapperInfo != null ? sourceWrapperInfo.getWrapperType() : null;
 
-                    if (sourceWrapperType != null && matches(sourceOp.getWrapper(), targetOp.getWrapper())) {
+                    if (sourceWrapperType != null && matches(sourceOp.getOutputWrapper(), targetOp.getOutputWrapper())) {
                         Class<?> sourceWrapperClass = sourceWrapperType.getPhysical();
 
                         Object sourceWrapper = sourceWrapperHandler.create(sourceOp, false);
@@ -218,7 +218,7 @@ public class Output2OutputTransformer ex
                 
                 Object[] targetChildren = new Object[outputs.length];
                 for (int i = 0; i < outputs.length; i++) {
-                    DataType<XMLType> targetOutputType = wrapper.getUnwrappedOutputType().getLogical().get(i);
+                    DataType<XMLType> targetOutputType = wrapper.getUnwrappedType().getLogical().get(i);
                     targetChildren[i] =
                         mediator.mediate(outputs[i], sourceType.getLogical().get(i), targetOutputType, context.getMetadata());
                 }
@@ -231,23 +231,23 @@ public class Output2OutputTransformer ex
             } else if (sourceWrapped && (!targetWrapped && !targetNotSubjectToWrapping)) {
                 // Wrapped to Unwrapped
                 Object sourceWrapper = response;
-                List<ElementInfo> childElements = sourceOp.getWrapper().getOutputChildElements();
+                List<ElementInfo> childElements = sourceOp.getOutputWrapper().getChildElements();
                 if (childElements.isEmpty()) {
                     // The void output
                     return null;
                 }
                 if (targetWrapperHandler != null) {
-                    ElementInfo wrapperElement = sourceOp.getWrapper().getOutputWrapperElement();
+                    ElementInfo wrapperElement = sourceOp.getOutputWrapper().getWrapperElement();
 
                     // FIXME: This is a workaround for the wsdless support as it passes in child elements
                     // under the wrapper that only matches by position
                     if (sourceWrapperHandler.isInstance(sourceWrapper, sourceOp, false)) {
 
-                        WrapperInfo targetWrapperInfo = targetOp.getWrapper();
+                        WrapperInfo targetWrapperInfo = targetOp.getOutputWrapper();
                         DataType targetWrapperType =
-                            targetWrapperInfo != null ? targetWrapperInfo.getOutputWrapperType() : null;
+                            targetWrapperInfo != null ? targetWrapperInfo.getWrapperType() : null;
 
-                        if (targetWrapperType != null && matches(sourceOp.getWrapper(), targetOp.getWrapper())) {
+                        if (targetWrapperType != null && matches(sourceOp.getOutputWrapper(), targetOp.getOutputWrapper())) {
                             Object targetWrapper =
                                 mediator.mediate(sourceWrapper, sourceType.getLogical().get(0), targetWrapperType, context
                                     .getMetadata());
@@ -265,7 +265,7 @@ public class Output2OutputTransformer ex
                 Object[] sourceChildren = sourceWrapperHandler.getChildren(sourceWrapper, sourceOp, false).toArray();
                 Object[] target = new Object[sourceChildren.length];
                 for (int i = 0; i < sourceChildren.length; i++) {
-                    DataType<XMLType> childType = sourceOp.getWrapper().getUnwrappedOutputType().getLogical().get(i);
+                    DataType<XMLType> childType = sourceOp.getOutputWrapper().getUnwrappedType().getLogical().get(i);
                     target[i] =
                         mediator.mediate(sourceChildren[i], childType, targetType.getLogical().get(i), context
                             .getMetadata());

Modified: tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/AsyncJDKInvocationHandler.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/AsyncJDKInvocationHandler.java?rev=1213702&r1=1213701&r2=1213702&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/AsyncJDKInvocationHandler.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/AsyncJDKInvocationHandler.java Tue Dec 13 14:12:38 2011
@@ -379,8 +379,8 @@ public class AsyncJDKInvocationHandler e
                     if (type instanceof ParameterizedType) {
                         // Check if the parameterized type of Response<T> is a doc-lit-wrapper class
                         Class<?> wrapperClass = (Class<?>)((ParameterizedType)type).getActualTypeArguments()[0];
-                        WrapperInfo wrapperInfo = chain.getSourceOperation().getWrapper();
-                        if (wrapperInfo != null && wrapperInfo.getOutputWrapperClass() == wrapperClass) {
+                        WrapperInfo wrapperInfo = chain.getSourceOperation().getOutputWrapper();
+                        if (wrapperInfo != null && wrapperInfo.getWrapperClass() == wrapperClass) {
                             Object wrapper = wrapperClass.newInstance();
                             // Find the 1st matching property
                             for (PropertyDescriptor p : Introspector.getBeanInfo(wrapperClass).getPropertyDescriptors()) {

Modified: tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/JDKInvocationHandler.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/JDKInvocationHandler.java?rev=1213702&r1=1213701&r2=1213702&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/JDKInvocationHandler.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/impl/JDKInvocationHandler.java Tue Dec 13 14:12:38 2011
@@ -214,8 +214,8 @@ public class JDKInvocationHandler implem
         Class<?>[] params = method.getParameterTypes();
 
         DataType<List<DataType>> inputType = null;
-        if (operation.isWrapperStyle()) {
-            inputType = operation.getWrapper().getUnwrappedInputType();
+        if (operation.isInputWrapperStyle()) {
+            inputType = operation.getInputWrapper().getUnwrappedType();
         } else {
             inputType = operation.getInputType();
         }

Modified: tuscany/sca-java-2.x/trunk/modules/databinding-axiom/src/main/java/org/apache/tuscany/sca/databinding/axiom/OMElementWrapperHandler.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/databinding-axiom/src/main/java/org/apache/tuscany/sca/databinding/axiom/OMElementWrapperHandler.java?rev=1213702&r1=1213701&r2=1213702&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/databinding-axiom/src/main/java/org/apache/tuscany/sca/databinding/axiom/OMElementWrapperHandler.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/databinding-axiom/src/main/java/org/apache/tuscany/sca/databinding/axiom/OMElementWrapperHandler.java Tue Dec 13 14:12:38 2011
@@ -57,16 +57,22 @@ public class OMElementWrapperHandler imp
     }
 
     public OMElement create(Operation operation, boolean input) {
-        WrapperInfo wrapperInfo = operation.getWrapper();
-        ElementInfo element = input ? wrapperInfo.getInputWrapperElement() : wrapperInfo.getOutputWrapperElement();
+        WrapperInfo inputWrapperInfo = operation.getInputWrapper();
+        WrapperInfo outputWrapperInfo = operation.getOutputWrapper();
+        
+        ElementInfo element = input ? inputWrapperInfo.getWrapperElement() : outputWrapperInfo.getWrapperElement();
         // Class<?> wrapperClass = input ? wrapperInfo.getInputWrapperClass() : wrapperInfo.getOutputWrapperClass();
         OMElement wrapper = AxiomHelper.createOMElement(factory, element.getQName());
         return wrapper;
     }
 
     public void setChildren(OMElement wrapper, Object[] childObjects, Operation operation, boolean input) {
+        WrapperInfo inputWrapperInfo = operation.getInputWrapper();
+        WrapperInfo outputWrapperInfo = operation.getOutputWrapper();
+        
         List<ElementInfo> childElements =
-            input ? operation.getWrapper().getInputChildElements() : operation.getWrapper().getOutputChildElements();
+            input ? inputWrapperInfo.getChildElements() : outputWrapperInfo.getChildElements();
+            
         for (int i = 0; i < childElements.size(); i++) {
             setChild(wrapper, i, childElements.get(i), childObjects[i]);
         }
@@ -108,8 +114,11 @@ public class OMElementWrapperHandler imp
     }
 
     public List getChildren(OMElement wrapper, Operation operation, boolean input) {
-        List<ElementInfo> childElements = input? operation.getWrapper().getInputChildElements():
-            operation.getWrapper().getOutputChildElements();
+        WrapperInfo inputWrapperInfo = operation.getInputWrapper();
+        WrapperInfo outputWrapperInfo = operation.getOutputWrapper();
+        
+        List<ElementInfo> childElements = input? inputWrapperInfo.getChildElements():
+            outputWrapperInfo.getChildElements();
 
         // Used in both the schema-valid and schema-invalid paths
         List<List<OMElement>> groupedElements = getElements(wrapper);    
@@ -264,16 +273,22 @@ public class OMElementWrapperHandler imp
      * @see org.apache.tuscany.sca.databinding.WrapperHandler#getWrapperType(Operation, boolean)
      */
     public DataType getWrapperType(Operation operation, boolean input) {
-        WrapperInfo wrapper = operation.getWrapper();
-        ElementInfo element = input ? wrapper.getInputWrapperElement() : wrapper.getOutputWrapperElement();
+        WrapperInfo inputWrapperInfo = operation.getInputWrapper();
+        WrapperInfo outputWrapperInfo = operation.getOutputWrapper();
+        
+        ElementInfo element = input ? inputWrapperInfo.getWrapperElement() : outputWrapperInfo.getWrapperElement();
+        
         DataType<XMLType> wrapperType =
             new DataTypeImpl<XMLType>(AxiomDataBinding.NAME, OMElement.class, new XMLType(element));
         return wrapperType;
     }
 
     public boolean isInstance(Object wrapperObj, Operation operation, boolean input) {
-        WrapperInfo wrapperInfo = operation.getWrapper();
-        ElementInfo element = input ? wrapperInfo.getInputWrapperElement() : wrapperInfo.getOutputWrapperElement();
+        WrapperInfo inputWrapperInfo = operation.getInputWrapper();
+        WrapperInfo outputWrapperInfo = operation.getOutputWrapper();
+        
+        ElementInfo element = input ? inputWrapperInfo.getWrapperElement() : outputWrapperInfo.getWrapperElement();
+        
         //        List<ElementInfo> childElements =
         //            input ? wrapperInfo.getInputChildElements() : wrapperInfo.getOutputChildElements();
         OMElement wrapper = (OMElement)wrapperObj;

Modified: tuscany/sca-java-2.x/trunk/modules/databinding-axiom/src/test/java/org/apache/tuscany/sca/databinding/axiom/OMElementWrapperHandlerTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/databinding-axiom/src/test/java/org/apache/tuscany/sca/databinding/axiom/OMElementWrapperHandlerTestCase.java?rev=1213702&r1=1213701&r2=1213702&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/databinding-axiom/src/test/java/org/apache/tuscany/sca/databinding/axiom/OMElementWrapperHandlerTestCase.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/databinding-axiom/src/test/java/org/apache/tuscany/sca/databinding/axiom/OMElementWrapperHandlerTestCase.java Tue Dec 13 14:12:38 2011
@@ -93,9 +93,9 @@ public class OMElementWrapperHandlerTest
         elements.get(1).setOmissible(true);
         elements.get(1).setNillable(false);
 
-        WrapperInfo wrapperInfo = new WrapperInfo(AxiomDataBinding.NAME, null, null, elements, null);
+        WrapperInfo wrapperInfo = new WrapperInfo(AxiomDataBinding.NAME, null, elements);
         this.op = new OperationImpl();
-        op.setWrapper(wrapperInfo);   
+        op.setInputWrapper(wrapperInfo);   
     }
 
     @Test

Modified: tuscany/sca-java-2.x/trunk/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBContextHelper.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBContextHelper.java?rev=1213702&r1=1213701&r2=1213702&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBContextHelper.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXBContextHelper.java Tue Dec 13 14:12:38 2011
@@ -446,13 +446,17 @@ public final class JAXBContextHelper {
     }
 
     private static void getDataTypes(List<DataType> dataTypes, Operation op, boolean useWrapper) {
-        WrapperInfo wrapper = op.getWrapper();
-        if (useWrapper && wrapper != null) {
-            DataType dt1 = wrapper.getInputWrapperType();
+        WrapperInfo inputWrapper = op.getInputWrapper();
+        WrapperInfo outputWrapper = op.getOutputWrapper();
+        
+        if (useWrapper && (inputWrapper != null)) {
+            DataType dt1 = inputWrapper.getWrapperType();
             if (dt1 != null) {
                 dataTypes.add(dt1);
             }
-            DataType dt2 = wrapper.getOutputWrapperType();
+        }
+        if (useWrapper && (outputWrapper != null)) {
+            DataType dt2 = outputWrapper.getWrapperType();
             if (dt2 != null) {
                 dataTypes.add(dt2);
             }



Mime
View raw message