summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany')
-rw-r--r--sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/CallbackInterface.java35
-rw-r--r--sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/CallbackMissmatchInterface.java35
-rw-r--r--sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ClientClientComponentImpl.java81
-rw-r--r--sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ClientComponent.java51
-rw-r--r--sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ClientComponentImpl.java92
-rw-r--r--sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackInterface.java32
-rw-r--r--sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackMissmatchInterface.java32
-rw-r--r--sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponentImpl.java88
-rw-r--r--sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceCallbackMissmatchComponent.java38
-rw-r--r--sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceCallbackMissmatchComponentImpl.java50
-rw-r--r--sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponent.java38
-rw-r--r--sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponentImpl.java49
-rw-r--r--sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceMissmatchComponent.java38
-rw-r--r--sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceMissmatchComponentImpl.java49
-rw-r--r--sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/NonJAXBClientComponentImpl.java92
-rw-r--r--sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/NonJAXBParameterObject.java51
-rw-r--r--sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/NonJAXBServiceComponent.java41
-rw-r--r--sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/NonJAXBServiceComponentImpl.java60
-rw-r--r--sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ParameterObject.java48
-rw-r--r--sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceCallbackMissmatchComponent.java39
-rw-r--r--sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceCallbackMissmatchComponentImpl.java49
-rw-r--r--sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceComponent.java41
-rw-r--r--sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceComponentImpl.java57
-rw-r--r--sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceMissmatchComponent.java52
-rw-r--r--sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceMissmatchComponentImpl.java68
25 files changed, 1306 insertions, 0 deletions
diff --git a/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/CallbackInterface.java b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/CallbackInterface.java
new file mode 100644
index 0000000000..4db5531aca
--- /dev/null
+++ b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/CallbackInterface.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * 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.
+ */
+package org.apache.tuscany.sca.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * only for callBack
+ */
+@Remotable
+public interface CallbackInterface {
+
+ void callbackMethod(String str);
+
+ void callbackMethod1(String str);
+
+ void modifyParameter(ParameterObject po);
+
+}
diff --git a/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/CallbackMissmatchInterface.java b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/CallbackMissmatchInterface.java
new file mode 100644
index 0000000000..9d9362f4d5
--- /dev/null
+++ b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/CallbackMissmatchInterface.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * 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.
+ */
+package org.apache.tuscany.sca.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * only for callBack
+ */
+@Remotable
+public interface CallbackMissmatchInterface {
+
+ void callbackMethod(ParameterObject po);
+
+ void callbackMethod1(ParameterObject po, String str);
+
+ void modifyParameter(ParameterObject po);
+
+}
diff --git a/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ClientClientComponentImpl.java b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ClientClientComponentImpl.java
new file mode 100644
index 0000000000..66988094e7
--- /dev/null
+++ b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ClientClientComponentImpl.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * 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.
+ */
+
+package org.apache.tuscany.sca.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+/*
+ * Test that a client can be reference using a target name containing only the component
+ * name when the client has callback services registered.
+ */
+@Service(ClientComponent.class)
+public class ClientClientComponentImpl implements ClientComponent{
+
+ @Reference
+ protected ClientComponent aClient;
+
+ public String foo(ParameterObject po) {
+ return aClient.foo(po);
+ }
+
+ public String foo1(ParameterObject po) {
+ return aClient.foo1(po);
+ }
+
+ public String foo2(String str) throws Exception {
+ return str + "AComponent";
+ }
+
+ public String foo3(String str, int i) {
+ return str + "AComponent" + i;
+ }
+
+ public String foo4(int i, String str) throws Exception {
+ return str + "AComponent" + i;
+ }
+
+ public void callback(String str) {
+ }
+
+ public void callbackMethod(String str) {
+ }
+
+ public void callbackMethod1(String str) {
+ }
+
+ public void callModifyParameter() {
+ }
+
+ public String getCallbackValue() {
+ return null;
+ }
+
+ public void onewayMethod(String str) {
+ }
+
+ public String getOnewayValue() {
+ return null;
+ }
+
+ public void modifyParameter(ParameterObject po) {
+ }
+
+}
diff --git a/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ClientComponent.java b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ClientComponent.java
new file mode 100644
index 0000000000..c6a6499126
--- /dev/null
+++ b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ClientComponent.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * 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.
+ */
+
+package org.apache.tuscany.sca.itest.interfaces;
+
+import org.oasisopen.sca.annotation.OneWay;
+import org.oasisopen.sca.annotation.Remotable;
+
+/*
+ * itest for interface: local,method-overloading
+ */
+@Remotable
+public interface ClientComponent {
+
+ String foo(ParameterObject po);
+
+ String foo1(ParameterObject po);
+
+ String foo2(String str) throws Exception;
+
+ String foo3(String str, int i);
+
+ String foo4(int i, String str) throws Exception;
+
+ void callback(String str);
+
+ void callModifyParameter();
+
+ @OneWay
+ void onewayMethod(String str);
+
+ String getCallbackValue();
+
+ String getOnewayValue();
+}
diff --git a/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ClientComponentImpl.java b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ClientComponentImpl.java
new file mode 100644
index 0000000000..4a414f870f
--- /dev/null
+++ b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ClientComponentImpl.java
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * 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.
+ */
+
+package org.apache.tuscany.sca.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(ClientComponent.class)
+public class ClientComponentImpl implements ClientComponent, CallbackInterface {
+
+ @Reference
+ protected ServiceComponent aCallBackService;
+ private static String callbackValue;
+ private static String onewayValue;
+
+ public String foo(ParameterObject po) {
+ po.field1 = "AComponent";
+ return aCallBackService.foo("AComponent");
+ }
+
+ public String foo1(ParameterObject po) {
+ po.field1 = "AComponent";
+ return aCallBackService.foo1("AComponent");
+ }
+
+ public String foo2(String str) throws Exception {
+ return str + "AComponent";
+ }
+
+ public String foo3(String str, int i) {
+ return str + "AComponent" + i;
+ }
+
+ public String foo4(int i, String str) throws Exception {
+ return str + "AComponent" + i;
+ }
+
+ public void callback(String str) {
+ aCallBackService.callback(str);
+ }
+
+ public void callbackMethod(String str) {
+ callbackValue = str;
+ }
+
+ public void callbackMethod1(String str) {
+ callbackValue = str;
+ }
+
+ public void callModifyParameter() {
+ this.aCallBackService.modifyParameter();
+ }
+
+ public String getCallbackValue() {
+ return callbackValue;
+ }
+
+ public void onewayMethod(String str) {
+ onewayValue = str;
+ try {
+ Thread.sleep(200);
+ } catch (Exception e) {
+ //do nothing
+ }
+ }
+
+ public String getOnewayValue() {
+ return onewayValue;
+ }
+
+ public void modifyParameter(ParameterObject po) {
+ po.field1 = "AComponent";
+ }
+
+}
diff --git a/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackInterface.java b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackInterface.java
new file mode 100644
index 0000000000..a41875b2b6
--- /dev/null
+++ b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackInterface.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * 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.
+ */
+package org.apache.tuscany.sca.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * only for callBack
+ */
+public interface LocalCallbackInterface {
+
+ void callbackMethod(String str);
+
+ void modifyParameter(ParameterObject po);
+
+}
diff --git a/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackMissmatchInterface.java b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackMissmatchInterface.java
new file mode 100644
index 0000000000..fbb81ae5c1
--- /dev/null
+++ b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalCallbackMissmatchInterface.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * 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.
+ */
+package org.apache.tuscany.sca.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * only for callBack
+ */
+public interface LocalCallbackMissmatchInterface {
+
+ void callbackMethod(ParameterObject po);
+
+ void modifyParameter(ParameterObject po);
+
+}
diff --git a/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponentImpl.java b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponentImpl.java
new file mode 100644
index 0000000000..9a8ad9ed8d
--- /dev/null
+++ b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalClientComponentImpl.java
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * 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.
+ */
+
+package org.apache.tuscany.sca.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(ClientComponent.class)
+public class LocalClientComponentImpl implements ClientComponent, LocalCallbackInterface {
+
+ @Reference
+ protected LocalServiceComponent aCallBackService;
+ private static String callbackValue;
+ private static String onewayValue;
+
+ public String foo(ParameterObject po) {
+ po.field1 = "AComponent";
+ return aCallBackService.foo("AComponent");
+ }
+
+ public String foo1(ParameterObject po) {
+ po.field1 = "AComponent";
+ return aCallBackService.foo("AComponent");
+ }
+
+ public String foo2(String str) throws Exception {
+ return str + "AComponent";
+ }
+
+ public String foo3(String str, int i) {
+ return str + "AComponent" + i;
+ }
+
+ public String foo4(int i, String str) throws Exception {
+ return str + "AComponent" + i;
+ }
+
+ public void callback(String str) {
+ aCallBackService.callback(str);
+ }
+
+ public void callbackMethod(String str) {
+ callbackValue = str;
+ }
+
+ public void callModifyParameter() {
+ this.aCallBackService.modifyParameter();
+ }
+
+ public String getCallbackValue() {
+ return callbackValue;
+ }
+
+ public void onewayMethod(String str) {
+ onewayValue = str;
+ try {
+ Thread.sleep(200);
+ } catch (Exception e) {
+ //do nothing
+ }
+ }
+
+ public String getOnewayValue() {
+ return onewayValue;
+ }
+
+ public void modifyParameter(ParameterObject po) {
+ po.field1 = "AComponent";
+ }
+
+}
diff --git a/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceCallbackMissmatchComponent.java b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceCallbackMissmatchComponent.java
new file mode 100644
index 0000000000..7a66b2d900
--- /dev/null
+++ b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceCallbackMissmatchComponent.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * 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.
+ */
+package org.apache.tuscany.sca.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * Local be-directional callBackService
+ */
+@Callback(LocalCallbackMissmatchInterface.class)
+public interface LocalServiceCallbackMissmatchComponent {
+
+ String foo(String str);
+
+ void callback(String str);
+
+ void modifyParameter();
+
+ ParameterObject getPO();
+
+}
diff --git a/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceCallbackMissmatchComponentImpl.java b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceCallbackMissmatchComponentImpl.java
new file mode 100644
index 0000000000..7ef6c04a9c
--- /dev/null
+++ b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceCallbackMissmatchComponentImpl.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * 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.
+ */
+package org.apache.tuscany.sca.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(LocalServiceCallbackMissmatchComponent.class)
+public class LocalServiceCallbackMissmatchComponentImpl implements LocalServiceCallbackMissmatchComponent {
+
+ @Callback
+ protected LocalCallbackMissmatchInterface callback;
+
+ private static ParameterObject po;
+
+ public void callback(String str) {
+ po = new ParameterObject("CallBack");
+ callback.callbackMethod(po);
+ }
+
+ public void modifyParameter() {
+ po = new ParameterObject("CallBack");
+ callback.modifyParameter(po);
+ }
+
+ public String foo(String str) {
+ return po.field1;
+ }
+
+ public ParameterObject getPO() {
+ return po;
+ }
+
+}
diff --git a/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponent.java b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponent.java
new file mode 100644
index 0000000000..92ed0434e4
--- /dev/null
+++ b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponent.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * 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.
+ */
+package org.apache.tuscany.sca.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * Local be-directional callBackService
+ */
+@Callback(LocalCallbackInterface.class)
+public interface LocalServiceComponent {
+
+ String foo(String str);
+
+ void callback(String str);
+
+ void modifyParameter();
+
+ ParameterObject getPO();
+
+}
diff --git a/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponentImpl.java b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponentImpl.java
new file mode 100644
index 0000000000..1d8995ccc6
--- /dev/null
+++ b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceComponentImpl.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * 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.
+ */
+package org.apache.tuscany.sca.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(LocalServiceComponent.class)
+public class LocalServiceComponentImpl implements LocalServiceComponent {
+
+ @Callback
+ protected LocalCallbackInterface callback;
+
+ private static ParameterObject po;
+
+ public void callback(String str) {
+ callback.callbackMethod(str);
+ }
+
+ public void modifyParameter() {
+ po = new ParameterObject("CallBack");
+ callback.modifyParameter(po);
+ }
+
+ public String foo(String str) {
+ return str;
+ }
+
+ public ParameterObject getPO() {
+ return po;
+ }
+
+}
diff --git a/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceMissmatchComponent.java b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceMissmatchComponent.java
new file mode 100644
index 0000000000..fb722b2699
--- /dev/null
+++ b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceMissmatchComponent.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * 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.
+ */
+package org.apache.tuscany.sca.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * Local be-directional callBackService
+ */
+@Callback(LocalCallbackInterface.class)
+public interface LocalServiceMissmatchComponent {
+
+ String foo(ParameterObject po);
+
+ void callback(String str);
+
+ void modifyParameter();
+
+ ParameterObject getPO();
+
+}
diff --git a/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceMissmatchComponentImpl.java b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceMissmatchComponentImpl.java
new file mode 100644
index 0000000000..78626a3add
--- /dev/null
+++ b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/LocalServiceMissmatchComponentImpl.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * 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.
+ */
+package org.apache.tuscany.sca.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(LocalServiceMissmatchComponent.class)
+public class LocalServiceMissmatchComponentImpl implements LocalServiceMissmatchComponent {
+
+ @Callback
+ protected LocalCallbackInterface callback;
+
+ private static ParameterObject po;
+
+ public void callback(String str) {
+ callback.callbackMethod(str);
+ }
+
+ public void modifyParameter() {
+ po = new ParameterObject("CallBack");
+ callback.modifyParameter(po);
+ }
+
+ public String foo(ParameterObject po) {
+ return po.field1;
+ }
+
+ public ParameterObject getPO() {
+ return po;
+ }
+
+}
diff --git a/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/NonJAXBClientComponentImpl.java b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/NonJAXBClientComponentImpl.java
new file mode 100644
index 0000000000..f3048a9098
--- /dev/null
+++ b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/NonJAXBClientComponentImpl.java
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * 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.
+ */
+
+package org.apache.tuscany.sca.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(ClientComponent.class)
+public class NonJAXBClientComponentImpl implements ClientComponent, CallbackInterface {
+
+ @Reference
+ protected NonJAXBServiceComponent aCallBackService;
+ private static String callbackValue;
+ private static String onewayValue;
+
+ public String foo(ParameterObject po) {
+ po.field1 = "AComponent";
+ return aCallBackService.foo("AComponent");
+ }
+
+ public String foo1(ParameterObject po) {
+ NonJAXBParameterObject nonJAXBPO = new NonJAXBParameterObject(po.field1);
+ return aCallBackService.foo1(nonJAXBPO);
+ }
+
+ public String foo2(String str) throws Exception {
+ return str + "AComponent";
+ }
+
+ public String foo3(String str, int i) {
+ return str + "AComponent" + i;
+ }
+
+ public String foo4(int i, String str) throws Exception {
+ return str + "AComponent" + i;
+ }
+
+ public void callback(String str) {
+ aCallBackService.callback(str);
+ }
+
+ public void callbackMethod(String str) {
+ callbackValue = str;
+ }
+
+ public void callbackMethod1(String str) {
+ callbackValue = str;
+ }
+
+ public void callModifyParameter() {
+ this.aCallBackService.modifyParameter();
+ }
+
+ public String getCallbackValue() {
+ return callbackValue;
+ }
+
+ public void onewayMethod(String str) {
+ onewayValue = str;
+ try {
+ Thread.sleep(200);
+ } catch (Exception e) {
+ //do nothing
+ }
+ }
+
+ public String getOnewayValue() {
+ return onewayValue;
+ }
+
+ public void modifyParameter(ParameterObject po) {
+ po.field1 = "AComponent";
+ }
+
+}
diff --git a/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/NonJAXBParameterObject.java b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/NonJAXBParameterObject.java
new file mode 100644
index 0000000000..8acef311a9
--- /dev/null
+++ b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/NonJAXBParameterObject.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * 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.
+ */
+
+package org.apache.tuscany.sca.itest.interfaces;
+
+import java.io.Serializable;
+
+/**
+ *
+ * A bean that cannont be converted to/from XML using JAXB as there is no
+ * default constructor
+ *
+ */
+public class NonJAXBParameterObject implements Serializable {
+ private static final long serialVersionUID = 1L;
+ public String field1;
+
+
+ public NonJAXBParameterObject(String field1) {
+ this.field1 = field1;
+ }
+
+ public boolean equals(Object o) {
+ if (o == this) {
+ return true;
+ }
+ if (o instanceof NonJAXBParameterObject) {
+ NonJAXBParameterObject other = (NonJAXBParameterObject)o;
+ if (field1 != null) {
+ return field1.equals(other.field1);
+ }
+ }
+ return false;
+ }
+}
diff --git a/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/NonJAXBServiceComponent.java b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/NonJAXBServiceComponent.java
new file mode 100644
index 0000000000..d097394721
--- /dev/null
+++ b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/NonJAXBServiceComponent.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * 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.
+ */
+package org.apache.tuscany.sca.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * Local be-directional callBackService
+ */
+@Remotable
+@Callback(CallbackInterface.class)
+public interface NonJAXBServiceComponent {
+
+ String foo(String str);
+
+ String foo1(NonJAXBParameterObject po);
+
+ void callback(String str);
+
+ void modifyParameter();
+
+ ParameterObject getPO();
+
+}
diff --git a/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/NonJAXBServiceComponentImpl.java b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/NonJAXBServiceComponentImpl.java
new file mode 100644
index 0000000000..d50feafd0e
--- /dev/null
+++ b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/NonJAXBServiceComponentImpl.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * 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.
+ */
+package org.apache.tuscany.sca.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(NonJAXBServiceComponent.class)
+public class NonJAXBServiceComponentImpl implements NonJAXBServiceComponent {
+
+ @Callback
+ protected CallbackInterface callback;
+
+/*
+ @Reference
+ protected ServiceComponent chainedCallbackReference;
+*/
+ private static ParameterObject po;
+
+ public String foo(String str) {
+ return str;
+ }
+
+ public String foo1(NonJAXBParameterObject po){
+ return po.field1;
+ }
+
+ public void callback(String str) {
+ callback.callbackMethod(str);
+ }
+
+ public void modifyParameter() {
+ po = new ParameterObject("CallBack");
+ callback.modifyParameter(po);
+ }
+
+
+
+ public ParameterObject getPO() {
+ return po;
+ }
+
+}
diff --git a/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ParameterObject.java b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ParameterObject.java
new file mode 100644
index 0000000000..9c980e01c8
--- /dev/null
+++ b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ParameterObject.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * 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.
+ */
+
+package org.apache.tuscany.sca.itest.interfaces;
+
+import java.io.Serializable;
+
+public class ParameterObject implements Serializable {
+ private static final long serialVersionUID = 1L;
+ public String field1;
+
+ public ParameterObject() {
+ this.field1 = null;
+ }
+
+ public ParameterObject(String field1) {
+ this.field1 = field1;
+ }
+
+ public boolean equals(Object o) {
+ if (o == this) {
+ return true;
+ }
+ if (o instanceof ParameterObject) {
+ ParameterObject other = (ParameterObject)o;
+ if (field1 != null) {
+ return field1.equals(other.field1);
+ }
+ }
+ return false;
+ }
+}
diff --git a/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceCallbackMissmatchComponent.java b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceCallbackMissmatchComponent.java
new file mode 100644
index 0000000000..81d4b3816a
--- /dev/null
+++ b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceCallbackMissmatchComponent.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * 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.
+ */
+package org.apache.tuscany.sca.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * Local be-directional callBackService
+ */
+@Remotable
+@Callback(CallbackMissmatchInterface.class)
+public interface ServiceCallbackMissmatchComponent {
+
+ String foo(ParameterObject po);
+
+ void callback(String str);
+
+ void modifyParameter();
+
+ ParameterObject getPO();
+
+}
diff --git a/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceCallbackMissmatchComponentImpl.java b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceCallbackMissmatchComponentImpl.java
new file mode 100644
index 0000000000..4dbfd55535
--- /dev/null
+++ b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceCallbackMissmatchComponentImpl.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * 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.
+ */
+package org.apache.tuscany.sca.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(ServiceCallbackMissmatchComponent.class)
+public class ServiceCallbackMissmatchComponentImpl implements ServiceCallbackMissmatchComponent {
+
+ @Callback
+ protected CallbackMissmatchInterface callback;
+
+ private static ParameterObject po;
+
+ public void callback(String str) {
+ callback.callbackMethod1(po, str);
+ }
+
+ public void modifyParameter() {
+ po = new ParameterObject("CallBack");
+ callback.modifyParameter(po);
+ }
+
+ public String foo(ParameterObject po) {
+ return po.field1;
+ }
+
+ public ParameterObject getPO() {
+ return po;
+ }
+
+}
diff --git a/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceComponent.java b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceComponent.java
new file mode 100644
index 0000000000..355db43089
--- /dev/null
+++ b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceComponent.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * 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.
+ */
+package org.apache.tuscany.sca.itest.interfaces;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * Local be-directional callBackService
+ */
+@Remotable
+@Callback(CallbackInterface.class)
+public interface ServiceComponent {
+
+ String foo(String str);
+
+ String foo1(String str);
+
+ void callback(String str);
+
+ void modifyParameter();
+
+ ParameterObject getPO();
+
+}
diff --git a/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceComponentImpl.java b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceComponentImpl.java
new file mode 100644
index 0000000000..aee96e4737
--- /dev/null
+++ b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceComponentImpl.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * 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.
+ */
+package org.apache.tuscany.sca.itest.interfaces;
+
+import javax.annotation.security.RolesAllowed;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Service;
+
+@RolesAllowed({"Role1"})
+@Service(ServiceComponent.class)
+public class ServiceComponentImpl implements ServiceComponent {
+
+ @Callback
+ protected CallbackInterface callback;
+
+ private static ParameterObject po;
+
+ @RolesAllowed({"Role2", "Role3"})
+ public String foo(String str) {
+ return str;
+ }
+
+ public String foo1(String str){
+ return str;
+ }
+
+ public void callback(String str) {
+ callback.callbackMethod(str);
+ }
+
+ public void modifyParameter() {
+ po = new ParameterObject("CallBack");
+ callback.modifyParameter(po);
+ }
+
+ public ParameterObject getPO() {
+ return po;
+ }
+
+}
diff --git a/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceMissmatchComponent.java b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceMissmatchComponent.java
new file mode 100644
index 0000000000..a1c933716e
--- /dev/null
+++ b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceMissmatchComponent.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * 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.
+ */
+package org.apache.tuscany.sca.itest.interfaces;
+
+import java.util.List;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * Local be-directional callBackService
+ */
+@Remotable
+@Callback(CallbackInterface.class)
+public interface ServiceMissmatchComponent {
+
+ // infrastructure won't detect difference between String and ParameterObject
+ String foo(ParameterObject po);
+
+ // Infrastructure will detect difference between parameter numbers
+ String foo1(ParameterObject po, String str);
+
+ void callback(String str);
+
+ void modifyParameter();
+
+ ParameterObject getPO();
+
+ void inArray(String[] stringArray);
+
+ String[] outArray();
+
+ void inCollection(List<String> stringArray);
+
+ List<String> outCollection();
+}
diff --git a/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceMissmatchComponentImpl.java b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceMissmatchComponentImpl.java
new file mode 100644
index 0000000000..0e0966da79
--- /dev/null
+++ b/sca-java-2.x/branches/2.0/testing/itest/interface-matching/src/main/java/org/apache/tuscany/sca/itest/interfaces/ServiceMissmatchComponentImpl.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * 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.
+ */
+package org.apache.tuscany.sca.itest.interfaces;
+
+import java.util.List;
+
+import org.oasisopen.sca.annotation.Callback;
+import org.oasisopen.sca.annotation.Service;
+
+@Service(ServiceMissmatchComponent.class)
+public class ServiceMissmatchComponentImpl implements ServiceMissmatchComponent {
+
+ @Callback
+ protected CallbackInterface callback;
+
+ private static ParameterObject po;
+
+ public String foo(ParameterObject po) {
+ return po.field1;
+ }
+
+ public String foo1(ParameterObject po, String str){
+ return str;
+ }
+
+ public void callback(String str) {
+ callback.callbackMethod(str);
+ }
+
+ public void modifyParameter() {
+ po = new ParameterObject("CallBack");
+ callback.modifyParameter(po);
+ }
+
+ public ParameterObject getPO() {
+ return po;
+ }
+
+ public void inArray(String[] stringArray) {
+ }
+
+ public String[] outArray() {
+ return null;
+ }
+
+ public void inCollection(List<String> stringArray) {
+ }
+
+ public List<String> outCollection() {
+ return null;
+ }
+}