You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by rf...@apache.org on 2009/04/04 10:53:53 UTC
svn commit: r761881 -
/tuscany/branches/sca-java-1.x/modules/interface/src/main/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceImpl.java
Author: rfeng
Date: Sat Apr 4 08:53:53 2009
New Revision: 761881
URL: http://svn.apache.org/viewvc?rev=761881&view=rev
Log:
Make sure the outputWrapperStyle is set
Modified:
tuscany/branches/sca-java-1.x/modules/interface/src/main/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceImpl.java
Modified: tuscany/branches/sca-java-1.x/modules/interface/src/main/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/interface/src/main/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceImpl.java?rev=761881&r1=761880&r2=761881&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.x/modules/interface/src/main/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceImpl.java (original)
+++ tuscany/branches/sca-java-1.x/modules/interface/src/main/java/org/apache/tuscany/sca/interfacedef/impl/InterfaceImpl.java Sat Apr 4 08:53:53 2009
@@ -6,15 +6,15 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
+ * under the License.
*/
package org.apache.tuscany.sca.interfacedef.impl;
@@ -32,7 +32,7 @@
/**
* Represents a service interface.
- *
+ *
* @version $Rev$ $Date$
*/
public class InterfaceImpl implements Interface {
@@ -151,9 +151,9 @@
}
}
-
+
if (op.isInputWrapperStyle()) {
- WrapperInfo inputWrapperInfo = op.getInputWrapper();
+ WrapperInfo inputWrapperInfo = op.getInputWrapper();
if (inputWrapperInfo != null) {
DataType<List<DataType>> unwrappedInputType = inputWrapperInfo.getUnwrappedInputType();
if (unwrappedInputType != null) {
@@ -165,7 +165,7 @@
}
}
}
-
+
if (op.isOutputWrapperStyle()) {
WrapperInfo outputWrapperInfo = op.getOutputWrapper();
if (outputWrapperInfo != null){
@@ -186,28 +186,28 @@
dataType.setDataBinding(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 only have a data type model defined
// and in this case operations cannot be overloaded so match
// operations by name
Operation oldOperation = getOperations().get(i);
Operation newOperation = null;
-
+
for (Operation tmpOperation : newInterface.getOperations()){
if (tmpOperation.getName().equals(oldOperation.getName())){
newOperation = tmpOperation;
}
}
-
+
if (newOperation == null){
break;
}
-
+
// set input types
oldOperation.setInputType(newOperation.getInputType());
-
+
// set wrapper
if (newOperation.isInputWrapperStyle()) {
oldOperation.setInputWrapperStyle(true);
@@ -215,33 +215,34 @@
}
}
}
-
+
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 only have a data type model defined
// and in this case operations cannot be overloaded so match
// operations by name
Operation oldOperation = getOperations().get(i);
Operation newOperation = null;
-
+
for (Operation tmpOperation : newInterface.getOperations()){
if (tmpOperation.getName().equals(oldOperation.getName())){
newOperation = tmpOperation;
}
}
-
+
if (newOperation == null){
break;
}
-
+
// set output types
oldOperation.setOutputType(newOperation.getOutputType());
-
+
// set fault types
oldOperation.setFaultTypes(newOperation.getFaultTypes());
-
+
// set wrapper
if (newOperation.isOutputWrapperStyle()) {
+ oldOperation.setOutputWrapperStyle(true);
oldOperation.setOutputWrapper(newOperation.getOutputWrapper());
}
}
@@ -267,9 +268,9 @@
setDataBinding((DataType) d.getLogical(), dataBinding);
}
}
-
+
if (op.isInputWrapperStyle()) {
- WrapperInfo inputWrapperInfo = op.getInputWrapper();
+ WrapperInfo inputWrapperInfo = op.getInputWrapper();
if (inputWrapperInfo != null) {
DataType<List<DataType>> unwrappedInputType = inputWrapperInfo.getUnwrappedInputType();
if (unwrappedInputType != null) {
@@ -279,7 +280,7 @@
}
}
}
-
+
if (op.isOutputWrapperStyle()) {
WrapperInfo outputWrapperInfo = op.getOutputWrapper();
if (outputWrapperInfo != null){
@@ -295,7 +296,7 @@
public boolean isDynamic() {
return false;
}
-
+
public List<PolicySet> getApplicablePolicySets() {
return applicablePolicySets;
}