summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorwjaniszewski <wjaniszewski@13f79535-47bb-0310-9956-ffa450edef68>2008-08-16 16:32:00 +0000
committerwjaniszewski <wjaniszewski@13f79535-47bb-0310-9956-ffa450edef68>2008-08-16 16:32:00 +0000
commit2191eee6390e95dd71556fd6cbc991df97815b82 (patch)
tree089b879cb1c8fe387d73a8768c0524c6b514847e /java
parentacb232a116c0f66a263dd207265c40eb64195c4a (diff)
itest/corba tests update for CORBA arrays
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@686521 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
-rw-r--r--java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/ScenarioSixTestCase.java162
-rw-r--r--java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/AnnotatedStruct.java43
-rw-r--r--java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/AnnotatedStructHelper.java97
-rw-r--r--java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/AnnotatedStructHolder.java57
-rw-r--r--java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioSix.java32
-rw-r--r--java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioSixHelper.java104
-rw-r--r--java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioSixHolder.java57
-rw-r--r--java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioSixOperations.java34
-rw-r--r--java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/StringArrayHelper.java95
-rw-r--r--java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/StringArrayHolder.java58
-rw-r--r--java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/_ScenarioSixImplBase.java94
-rw-r--r--java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/_ScenarioSixStub.java99
-rw-r--r--java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioSixServant.java41
-rw-r--r--java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TAnnotatedStruct.java40
-rw-r--r--java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioSix.java35
-rw-r--r--java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioSixComponent.java41
-rw-r--r--java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioSixServant.java38
-rw-r--r--java/sca/itest/corba/src/test/resources/ScenarioSix.composite41
-rw-r--r--java/sca/itest/corba/src/test/resources/itest_scenario.idl14
19 files changed, 1182 insertions, 0 deletions
diff --git a/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/ScenarioSixTestCase.java b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/ScenarioSixTestCase.java
new file mode 100644
index 0000000000..17acd29b26
--- /dev/null
+++ b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/ScenarioSixTestCase.java
@@ -0,0 +1,162 @@
+/*
+ * 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.test.corba;
+
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import junit.framework.Assert;
+
+import org.apache.tuscany.sca.host.corba.jse.DefaultCorbaHost;
+import org.apache.tuscany.sca.host.corba.naming.TransientNameServer;
+import org.apache.tuscany.sca.host.corba.naming.TransientNameService;
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct;
+import org.apache.tuscany.sca.test.corba.generated.ScenarioSix;
+import org.apache.tuscany.sca.test.corba.generated.ScenarioSixHelper;
+import org.apache.tuscany.sca.test.corba.types.ScenarioSixServant;
+import org.apache.tuscany.sca.test.corba.types.TAnnotatedStruct;
+import org.apache.tuscany.sca.test.corba.types.TScenarioSix;
+import org.apache.tuscany.sca.test.corba.types.TScenarioSixComponent;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.omg.CORBA.ORB;
+import org.omg.CosNaming.NameComponent;
+import org.omg.CosNaming.NamingContext;
+import org.omg.CosNaming.NamingContextHelper;
+
+/**
+ * Tests using enhanced Java interfaces (annotations)
+ * @version $Rev$ $Date$
+ */
+public class ScenarioSixTestCase {
+
+ // note that those values are also used in resources/*.composite file
+ private static int ORB_INITIAL_PORT = 5050;
+ private static String SERVICE_NAME = "ScenarioSix";
+ private static String TUSCANY_SERVICE_NAME = "ScenarioSixTuscany";
+
+ private static SCADomain domain;
+
+ private static TransientNameServer server;
+ private static ORB orb;
+
+ /**
+ * Sets up name service, creates and registers traditional CORBA service,
+ * obtains SCADomain
+ */
+ @BeforeClass
+ public static void setUp() {
+ TestCorbaHost.setCorbaHost(new DefaultCorbaHost());
+ try {
+ try {
+ server =
+ new TransientNameServer("localhost", ORB_INITIAL_PORT, TransientNameService.DEFAULT_SERVICE_NAME);
+ Thread t = server.start();
+ if (t == null) {
+ Assert.fail("The naming server cannot be started");
+ }
+ orb = server.getORB();
+ } catch (Throwable e) {
+ e.printStackTrace();
+ Assert.fail(e.getMessage());
+ }
+ org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
+ NamingContext ncRef = NamingContextHelper.narrow(objRef);
+ NameComponent nc = new NameComponent(SERVICE_NAME, "");
+ NameComponent path[] = {nc};
+ ScenarioSix scenarioSix = new ScenarioSixServant();
+ ncRef.rebind(path, scenarioSix);
+ // obtain domain
+ domain = SCADomain.newInstance("ScenarioSix.composite");
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Kills previously spawned name service.
+ */
+ @AfterClass
+ public static void tearDown() {
+ server.stop();
+ }
+
+ private boolean areArraysEqual(String[][] arr1, String[][] arr2) {
+ for (int i = 0; i < arr1.length; i++) {
+ for (int j = 0; j < arr1[i].length; j++) {
+ if (!arr1[i][j].equals(arr2[i][j])) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ private String[][] getStringArray() {
+ String[][] result = { {"Hello", "World"}, {"Hi", "Again"}};
+ return result;
+ }
+
+ /**
+ * Tests passing arrays. Tuscany acts as a client, servant object is served in a traditional way
+ */
+ @Test
+ public void test_arraysPassing_tuscanyAsClient() {
+ try {
+ TScenarioSix ref = domain.getService(TScenarioSixComponent.class, "ScenarioSix").getScenarioSix();
+ String[][] arrayArg = getStringArray();
+ String[][] arrayRes = ref.passStringArray(arrayArg);
+ assertTrue(areArraysEqual(arrayArg, arrayRes));
+ TAnnotatedStruct structArg = new TAnnotatedStruct();
+ structArg.stringArray = getStringArray();
+ TAnnotatedStruct structRes = ref.passAnnotatedStruct(structArg);
+ assertTrue(areArraysEqual(structArg.stringArray, structRes.stringArray));
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ /**
+ * Tests passing arrays. Servant object is served by Tuscany and it is accessed by traditional Corba client
+ */
+ @Test
+ public void test_arraysPassing_tuscanyAsService() {
+ try {
+ org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
+ NamingContext ncRef = NamingContextHelper.narrow(objRef);
+ NameComponent nc = new NameComponent(TUSCANY_SERVICE_NAME, "");
+ NameComponent path[] = {nc};
+ ScenarioSix ref = ScenarioSixHelper.narrow(ncRef.resolve(path));
+ String[][] stringArg = getStringArray();
+ String[][] stringRes = ref.passStringArray(stringArg);
+ assertTrue(areArraysEqual(stringArg, stringRes));
+ AnnotatedStruct structArg = new AnnotatedStruct();
+ structArg.stringArray = getStringArray();
+ AnnotatedStruct structRes = ref.passAnnotatedStruct(structArg);
+ assertTrue(areArraysEqual(structArg.stringArray, structRes.stringArray));
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+}
diff --git a/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/AnnotatedStruct.java b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/AnnotatedStruct.java
new file mode 100644
index 0000000000..abcec43d0e
--- /dev/null
+++ b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/AnnotatedStruct.java
@@ -0,0 +1,43 @@
+/*
+ * 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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/AnnotatedStruct.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* sobota, 16 sierpień 2008 15:31:35 CEST
+*/
+
+public final class AnnotatedStruct implements org.omg.CORBA.portable.IDLEntity
+{
+ public String stringArray[][] = null;
+
+ public AnnotatedStruct ()
+ {
+ } // ctor
+
+ public AnnotatedStruct (String[][] _stringArray)
+ {
+ stringArray = _stringArray;
+ } // ctor
+
+} // class AnnotatedStruct
diff --git a/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/AnnotatedStructHelper.java b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/AnnotatedStructHelper.java
new file mode 100644
index 0000000000..171a7919a2
--- /dev/null
+++ b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/AnnotatedStructHelper.java
@@ -0,0 +1,97 @@
+/*
+ * 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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/AnnotatedStructHelper.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* sobota, 16 sierpień 2008 15:31:35 CEST
+*/
+
+abstract public class AnnotatedStructHelper
+{
+ private static String _id = "IDL:org/apache/tuscany/sca/test/corba/generated/AnnotatedStruct/AnnotatedStruct:1.0";
+
+ public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct that)
+ {
+ org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
+ a.type (type ());
+ write (out, that);
+ a.read_value (out.create_input_stream (), type ());
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct extract (org.omg.CORBA.Any a)
+ {
+ return read (a.create_input_stream ());
+ }
+
+ private static org.omg.CORBA.TypeCode __typeCode = null;
+ private static boolean __active = false;
+ synchronized public static org.omg.CORBA.TypeCode type ()
+ {
+ if (__typeCode == null)
+ {
+ synchronized (org.omg.CORBA.TypeCode.class)
+ {
+ if (__typeCode == null)
+ {
+ if (__active)
+ {
+ return org.omg.CORBA.ORB.init().create_recursive_tc ( _id );
+ }
+ __active = true;
+ org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [1];
+ org.omg.CORBA.TypeCode _tcOf_members0 = null;
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().create_array_tc (2, _tcOf_members0 );
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().create_array_tc (2, _tcOf_members0 );
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.test.corba.generated.StringArrayHelper.id (), "StringArray", _tcOf_members0);
+ _members0[0] = new org.omg.CORBA.StructMember (
+ "stringArray",
+ _tcOf_members0,
+ null);
+ __typeCode = org.omg.CORBA.ORB.init ().create_struct_tc (org.apache.tuscany.sca.test.corba.generated.AnnotatedStructHelper.id (), "AnnotatedStruct", _members0);
+ __active = false;
+ }
+ }
+ }
+ return __typeCode;
+ }
+
+ public static String id ()
+ {
+ return _id;
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct read (org.omg.CORBA.portable.InputStream istream)
+ {
+ org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct value = new org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct ();
+ value.stringArray = org.apache.tuscany.sca.test.corba.generated.StringArrayHelper.read (istream);
+ return value;
+ }
+
+ public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct value)
+ {
+ org.apache.tuscany.sca.test.corba.generated.StringArrayHelper.write (ostream, value.stringArray);
+ }
+
+}
diff --git a/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/AnnotatedStructHolder.java b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/AnnotatedStructHolder.java
new file mode 100644
index 0000000000..5f2dc56033
--- /dev/null
+++ b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/AnnotatedStructHolder.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.test.corba.generated;
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/AnnotatedStructHolder.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* sobota, 16 sierpień 2008 15:31:35 CEST
+*/
+
+public final class AnnotatedStructHolder implements org.omg.CORBA.portable.Streamable
+{
+ public org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct value = null;
+
+ public AnnotatedStructHolder ()
+ {
+ }
+
+ public AnnotatedStructHolder (org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct initialValue)
+ {
+ value = initialValue;
+ }
+
+ public void _read (org.omg.CORBA.portable.InputStream i)
+ {
+ value = org.apache.tuscany.sca.test.corba.generated.AnnotatedStructHelper.read (i);
+ }
+
+ public void _write (org.omg.CORBA.portable.OutputStream o)
+ {
+ org.apache.tuscany.sca.test.corba.generated.AnnotatedStructHelper.write (o, value);
+ }
+
+ public org.omg.CORBA.TypeCode _type ()
+ {
+ return org.apache.tuscany.sca.test.corba.generated.AnnotatedStructHelper.type ();
+ }
+
+}
diff --git a/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioSix.java b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioSix.java
new file mode 100644
index 0000000000..1897d0682c
--- /dev/null
+++ b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioSix.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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/ScenarioSix.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* sobota, 16 sierpień 2008 15:31:35 CEST
+*/
+
+public interface ScenarioSix extends ScenarioSixOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity
+{
+} // interface ScenarioSix
diff --git a/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioSixHelper.java b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioSixHelper.java
new file mode 100644
index 0000000000..c8c88ef91d
--- /dev/null
+++ b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioSixHelper.java
@@ -0,0 +1,104 @@
+/*
+ * 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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/ScenarioSixHelper.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* sobota, 16 sierpień 2008 15:31:35 CEST
+*/
+
+abstract public class ScenarioSixHelper
+{
+ private static String _id = "IDL:org/apache/tuscany/sca/test/corba/generated/ScenarioSix:1.0";
+
+ public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.test.corba.generated.ScenarioSix that)
+ {
+ org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
+ a.type (type ());
+ write (out, that);
+ a.read_value (out.create_input_stream (), type ());
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.ScenarioSix extract (org.omg.CORBA.Any a)
+ {
+ return read (a.create_input_stream ());
+ }
+
+ private static org.omg.CORBA.TypeCode __typeCode = null;
+ synchronized public static org.omg.CORBA.TypeCode type ()
+ {
+ if (__typeCode == null)
+ {
+ __typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (org.apache.tuscany.sca.test.corba.generated.ScenarioSixHelper.id (), "ScenarioSix");
+ }
+ return __typeCode;
+ }
+
+ public static String id ()
+ {
+ return _id;
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.ScenarioSix read (org.omg.CORBA.portable.InputStream istream)
+ {
+ return narrow (istream.read_Object (_ScenarioSixStub.class));
+ }
+
+ public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.test.corba.generated.ScenarioSix value)
+ {
+ ostream.write_Object ((org.omg.CORBA.Object) value);
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.ScenarioSix narrow (org.omg.CORBA.Object obj)
+ {
+ if (obj == null)
+ return null;
+ else if (obj instanceof org.apache.tuscany.sca.test.corba.generated.ScenarioSix)
+ return (org.apache.tuscany.sca.test.corba.generated.ScenarioSix)obj;
+ else if (!obj._is_a (id ()))
+ throw new org.omg.CORBA.BAD_PARAM ();
+ else
+ {
+ org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate ();
+ org.apache.tuscany.sca.test.corba.generated._ScenarioSixStub stub = new org.apache.tuscany.sca.test.corba.generated._ScenarioSixStub ();
+ stub._set_delegate(delegate);
+ return stub;
+ }
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.ScenarioSix unchecked_narrow (org.omg.CORBA.Object obj)
+ {
+ if (obj == null)
+ return null;
+ else if (obj instanceof org.apache.tuscany.sca.test.corba.generated.ScenarioSix)
+ return (org.apache.tuscany.sca.test.corba.generated.ScenarioSix)obj;
+ else
+ {
+ org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate ();
+ org.apache.tuscany.sca.test.corba.generated._ScenarioSixStub stub = new org.apache.tuscany.sca.test.corba.generated._ScenarioSixStub ();
+ stub._set_delegate(delegate);
+ return stub;
+ }
+ }
+
+}
diff --git a/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioSixHolder.java b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioSixHolder.java
new file mode 100644
index 0000000000..5540b98c21
--- /dev/null
+++ b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioSixHolder.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.test.corba.generated;
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/ScenarioSixHolder.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* sobota, 16 sierpień 2008 15:31:35 CEST
+*/
+
+public final class ScenarioSixHolder implements org.omg.CORBA.portable.Streamable
+{
+ public org.apache.tuscany.sca.test.corba.generated.ScenarioSix value = null;
+
+ public ScenarioSixHolder ()
+ {
+ }
+
+ public ScenarioSixHolder (org.apache.tuscany.sca.test.corba.generated.ScenarioSix initialValue)
+ {
+ value = initialValue;
+ }
+
+ public void _read (org.omg.CORBA.portable.InputStream i)
+ {
+ value = org.apache.tuscany.sca.test.corba.generated.ScenarioSixHelper.read (i);
+ }
+
+ public void _write (org.omg.CORBA.portable.OutputStream o)
+ {
+ org.apache.tuscany.sca.test.corba.generated.ScenarioSixHelper.write (o, value);
+ }
+
+ public org.omg.CORBA.TypeCode _type ()
+ {
+ return org.apache.tuscany.sca.test.corba.generated.ScenarioSixHelper.type ();
+ }
+
+}
diff --git a/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioSixOperations.java b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioSixOperations.java
new file mode 100644
index 0000000000..4e7485a8ce
--- /dev/null
+++ b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/ScenarioSixOperations.java
@@ -0,0 +1,34 @@
+/*
+ * 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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/ScenarioSixOperations.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* sobota, 16 sierpień 2008 15:31:35 CEST
+*/
+
+public interface ScenarioSixOperations
+{
+ String[][] passStringArray (String[][] arg);
+ org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct passAnnotatedStruct (org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct arg);
+} // interface ScenarioSixOperations
diff --git a/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/StringArrayHelper.java b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/StringArrayHelper.java
new file mode 100644
index 0000000000..f2cc3adad5
--- /dev/null
+++ b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/StringArrayHelper.java
@@ -0,0 +1,95 @@
+/*
+ * 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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/StringArrayHelper.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* sobota, 16 sierpień 2008 15:31:35 CEST
+*/
+
+abstract public class StringArrayHelper
+{
+ private static String _id = "IDL:org/apache/tuscany/sca/test/corba/generated/StringArray:1.0";
+
+ public static void insert (org.omg.CORBA.Any a, String[][] that)
+ {
+ org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
+ a.type (type ());
+ write (out, that);
+ a.read_value (out.create_input_stream (), type ());
+ }
+
+ public static String[][] extract (org.omg.CORBA.Any a)
+ {
+ return read (a.create_input_stream ());
+ }
+
+ private static org.omg.CORBA.TypeCode __typeCode = null;
+ synchronized public static org.omg.CORBA.TypeCode type ()
+ {
+ if (__typeCode == null)
+ {
+ __typeCode = org.omg.CORBA.ORB.init ().create_string_tc (0);
+ __typeCode = org.omg.CORBA.ORB.init ().create_array_tc (2, __typeCode );
+ __typeCode = org.omg.CORBA.ORB.init ().create_array_tc (2, __typeCode );
+ __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.test.corba.generated.StringArrayHelper.id (), "StringArray", __typeCode);
+ }
+ return __typeCode;
+ }
+
+ public static String id ()
+ {
+ return _id;
+ }
+
+ public static String[][] read (org.omg.CORBA.portable.InputStream istream)
+ {
+ String value[][] = null;
+ value = new String[2][];
+ for (int _o0 = 0;_o0 < (2); ++_o0)
+ {
+ value[_o0] = new String[2];
+ for (int _o1 = 0;_o1 < (2); ++_o1)
+ {
+ value[_o0][_o1] = istream.read_string ();
+ }
+ }
+ return value;
+ }
+
+ public static void write (org.omg.CORBA.portable.OutputStream ostream, String[][] value)
+ {
+ if (value.length != (2))
+ throw new org.omg.CORBA.MARSHAL (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
+ for (int _i0 = 0;_i0 < (2); ++_i0)
+ {
+ if (value[_i0].length != (2))
+ throw new org.omg.CORBA.MARSHAL (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
+ for (int _i1 = 0;_i1 < (2); ++_i1)
+ {
+ ostream.write_string (value[_i0][_i1]);
+ }
+ }
+ }
+
+}
diff --git a/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/StringArrayHolder.java b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/StringArrayHolder.java
new file mode 100644
index 0000000000..dbad550222
--- /dev/null
+++ b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/StringArrayHolder.java
@@ -0,0 +1,58 @@
+/*
+ * 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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/StringArrayHolder.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* sobota, 16 sierpień 2008 15:31:35 CEST
+*/
+
+public final class StringArrayHolder implements org.omg.CORBA.portable.Streamable
+{
+ public String value[][] = null;
+
+ public StringArrayHolder ()
+ {
+ }
+
+ public StringArrayHolder (String[][] initialValue)
+ {
+ value = initialValue;
+ }
+
+ public void _read (org.omg.CORBA.portable.InputStream i)
+ {
+ value = org.apache.tuscany.sca.test.corba.generated.StringArrayHelper.read (i);
+ }
+
+ public void _write (org.omg.CORBA.portable.OutputStream o)
+ {
+ org.apache.tuscany.sca.test.corba.generated.StringArrayHelper.write (o, value);
+ }
+
+ public org.omg.CORBA.TypeCode _type ()
+ {
+ return org.apache.tuscany.sca.test.corba.generated.StringArrayHelper.type ();
+ }
+
+}
diff --git a/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/_ScenarioSixImplBase.java b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/_ScenarioSixImplBase.java
new file mode 100644
index 0000000000..2b67d1bffa
--- /dev/null
+++ b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/_ScenarioSixImplBase.java
@@ -0,0 +1,94 @@
+/*
+ * 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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/_ScenarioSixImplBase.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* sobota, 16 sierpień 2008 15:31:35 CEST
+*/
+
+public abstract class _ScenarioSixImplBase extends org.omg.CORBA.portable.ObjectImpl
+ implements org.apache.tuscany.sca.test.corba.generated.ScenarioSix, org.omg.CORBA.portable.InvokeHandler
+{
+
+ // Constructors
+ public _ScenarioSixImplBase ()
+ {
+ }
+
+ private static java.util.Hashtable _methods = new java.util.Hashtable ();
+ static
+ {
+ _methods.put ("passStringArray", new java.lang.Integer (0));
+ _methods.put ("passAnnotatedStruct", new java.lang.Integer (1));
+ }
+
+ public org.omg.CORBA.portable.OutputStream _invoke (String $method,
+ org.omg.CORBA.portable.InputStream in,
+ org.omg.CORBA.portable.ResponseHandler $rh)
+ {
+ org.omg.CORBA.portable.OutputStream out = null;
+ java.lang.Integer __method = (java.lang.Integer)_methods.get ($method);
+ if (__method == null)
+ throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
+
+ switch (__method.intValue ())
+ {
+ case 0: // org/apache/tuscany/sca/test/corba/generated/ScenarioSix/passStringArray
+ {
+ String arg[][] = org.apache.tuscany.sca.test.corba.generated.StringArrayHelper.read (in);
+ String $result[][] = null;
+ $result = this.passStringArray (arg);
+ out = $rh.createReply();
+ org.apache.tuscany.sca.test.corba.generated.StringArrayHelper.write (out, $result);
+ break;
+ }
+
+ case 1: // org/apache/tuscany/sca/test/corba/generated/ScenarioSix/passAnnotatedStruct
+ {
+ org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct arg = org.apache.tuscany.sca.test.corba.generated.AnnotatedStructHelper.read (in);
+ org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct $result = null;
+ $result = this.passAnnotatedStruct (arg);
+ out = $rh.createReply();
+ org.apache.tuscany.sca.test.corba.generated.AnnotatedStructHelper.write (out, $result);
+ break;
+ }
+
+ default:
+ throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
+ }
+
+ return out;
+ } // _invoke
+
+ // Type-specific CORBA::Object operations
+ private static String[] __ids = {
+ "IDL:org/apache/tuscany/sca/test/corba/generated/ScenarioSix:1.0"};
+
+ public String[] _ids ()
+ {
+ return (String[])__ids.clone ();
+ }
+
+
+} // class _ScenarioSixImplBase
diff --git a/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/_ScenarioSixStub.java b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/_ScenarioSixStub.java
new file mode 100644
index 0000000000..4f64b9b4d4
--- /dev/null
+++ b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/_ScenarioSixStub.java
@@ -0,0 +1,99 @@
+/*
+ * 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.test.corba.generated;
+
+
+/**
+* org/apache/tuscany/sca/test/corba/generated/_ScenarioSixStub.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* sobota, 16 sierpień 2008 15:31:35 CEST
+*/
+
+public class _ScenarioSixStub extends org.omg.CORBA.portable.ObjectImpl implements org.apache.tuscany.sca.test.corba.generated.ScenarioSix
+{
+
+ public String[][] passStringArray (String[][] arg)
+ {
+ org.omg.CORBA.portable.InputStream $in = null;
+ try {
+ org.omg.CORBA.portable.OutputStream $out = _request ("passStringArray", true);
+ org.apache.tuscany.sca.test.corba.generated.StringArrayHelper.write ($out, arg);
+ $in = _invoke ($out);
+ String $result[][] = org.apache.tuscany.sca.test.corba.generated.StringArrayHelper.read ($in);
+ return $result;
+ } catch (org.omg.CORBA.portable.ApplicationException $ex) {
+ $in = $ex.getInputStream ();
+ String _id = $ex.getId ();
+ throw new org.omg.CORBA.MARSHAL (_id);
+ } catch (org.omg.CORBA.portable.RemarshalException $rm) {
+ return passStringArray (arg );
+ } finally {
+ _releaseReply ($in);
+ }
+ } // passStringArray
+
+ public org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct passAnnotatedStruct (org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct arg)
+ {
+ org.omg.CORBA.portable.InputStream $in = null;
+ try {
+ org.omg.CORBA.portable.OutputStream $out = _request ("passAnnotatedStruct", true);
+ org.apache.tuscany.sca.test.corba.generated.AnnotatedStructHelper.write ($out, arg);
+ $in = _invoke ($out);
+ org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct $result = org.apache.tuscany.sca.test.corba.generated.AnnotatedStructHelper.read ($in);
+ return $result;
+ } catch (org.omg.CORBA.portable.ApplicationException $ex) {
+ $in = $ex.getInputStream ();
+ String _id = $ex.getId ();
+ throw new org.omg.CORBA.MARSHAL (_id);
+ } catch (org.omg.CORBA.portable.RemarshalException $rm) {
+ return passAnnotatedStruct (arg );
+ } finally {
+ _releaseReply ($in);
+ }
+ } // passAnnotatedStruct
+
+ // Type-specific CORBA::Object operations
+ private static String[] __ids = {
+ "IDL:org/apache/tuscany/sca/test/corba/generated/ScenarioSix:1.0"};
+
+ public String[] _ids ()
+ {
+ return (String[])__ids.clone ();
+ }
+
+ private void readObject (java.io.ObjectInputStream s) throws java.io.IOException
+ {
+ String str = s.readUTF ();
+ String[] args = null;
+ java.util.Properties props = null;
+ org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str);
+ org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate ();
+ _set_delegate (delegate);
+ }
+
+ private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException
+ {
+ String[] args = null;
+ java.util.Properties props = null;
+ String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this);
+ s.writeUTF (str);
+ }
+} // class _ScenarioSixStub
diff --git a/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioSixServant.java b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioSixServant.java
new file mode 100644
index 0000000000..35185cdf8b
--- /dev/null
+++ b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/ScenarioSixServant.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.test.corba.types;
+
+import org.apache.tuscany.sca.test.corba.generated.AnnotatedStruct;
+import org.apache.tuscany.sca.test.corba.generated._ScenarioSixImplBase;
+
+/**
+ * @version $Rev$ $Date$
+ * Scenario six servant for generated interface.
+ */
+public class ScenarioSixServant extends _ScenarioSixImplBase {
+
+ private static final long serialVersionUID = 1L;
+
+ public String[][] passStringArray(String[][] arg) {
+ return arg;
+ }
+
+ public AnnotatedStruct passAnnotatedStruct(AnnotatedStruct arg) {
+ return arg;
+ }
+
+}
diff --git a/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TAnnotatedStruct.java b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TAnnotatedStruct.java
new file mode 100644
index 0000000000..adb48aa159
--- /dev/null
+++ b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TAnnotatedStruct.java
@@ -0,0 +1,40 @@
+/*
+ * 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.test.corba.types;
+
+import org.apache.tuscany.sca.binding.corba.meta.CorbaArray;
+
+/**
+ * @version $Rev$ $Date$ Scenario six structure used by Tuscany.
+ */
+public final class TAnnotatedStruct {
+
+ @CorbaArray( {2, 2})
+ public String[][] stringArray;
+
+ public TAnnotatedStruct() {
+
+ }
+
+ public TAnnotatedStruct(String[][] stringArray) {
+ this.stringArray = stringArray;
+ }
+
+}
diff --git a/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioSix.java b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioSix.java
new file mode 100644
index 0000000000..8c8f2bb219
--- /dev/null
+++ b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioSix.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.test.corba.types;
+
+import org.apache.tuscany.sca.binding.corba.meta.CorbaArray;
+
+/**
+ * @version $Rev$ $Date$
+ * Operations for scenario six.
+ */
+public interface TScenarioSix {
+
+ @CorbaArray( {2, 2})
+ public String[][] passStringArray(@CorbaArray( {2, 2})String[][] arg);
+
+ public TAnnotatedStruct passAnnotatedStruct(TAnnotatedStruct arg);
+
+}
diff --git a/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioSixComponent.java b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioSixComponent.java
new file mode 100644
index 0000000000..7d43badb23
--- /dev/null
+++ b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioSixComponent.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.test.corba.types;
+
+import org.osoa.sca.annotations.Reference;
+
+/**
+ * @version $Rev$ $Date$
+ * Component for obtaining ScenartioSix reference.
+ */
+public class TScenarioSixComponent {
+
+ private TScenarioSix scenarioSix;
+
+ @Reference
+ public void setScenarioSix(TScenarioSix scenarioSix) {
+ this.scenarioSix = scenarioSix;
+ }
+
+ public TScenarioSix getScenarioSix() {
+ return scenarioSix;
+ }
+
+}
diff --git a/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioSixServant.java b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioSixServant.java
new file mode 100644
index 0000000000..aeda9bed52
--- /dev/null
+++ b/java/sca/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/types/TScenarioSixServant.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.test.corba.types;
+
+/**
+ * @version $Rev$ $Date$
+ * Tuscany scenario six servant.
+ */
+public class TScenarioSixServant implements TScenarioSix {
+
+ private static final long serialVersionUID = 1L;
+
+ public String[][] passStringArray(String[][] arg) {
+ return arg;
+ }
+
+ public TAnnotatedStruct passAnnotatedStruct(TAnnotatedStruct arg) {
+ return arg;
+ }
+
+}
diff --git a/java/sca/itest/corba/src/test/resources/ScenarioSix.composite b/java/sca/itest/corba/src/test/resources/ScenarioSix.composite
new file mode 100644
index 0000000000..88238478c1
--- /dev/null
+++ b/java/sca/itest/corba/src/test/resources/ScenarioSix.composite
@@ -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.
+-->
+
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
+ targetNamespace="http://sample"
+ xmlns:sample="http://sample"
+ name="Corba">
+
+ <component name="ScenarioSix">
+ <implementation.java class="org.apache.tuscany.sca.test.corba.types.TScenarioSixComponent" />
+ <reference name="scenarioSix">
+ <tuscany:binding.corba host="localhost" port="5050" name="ScenarioSix"/>
+ </reference>
+ </component>
+
+ <component name="ScenarionSixService">
+ <implementation.java class="org.apache.tuscany.sca.test.corba.types.TScenarioSixServant" />
+ </component>
+ <service name="ScenarionSixService" promote="ScenarionSixService">
+ <interface.java interface="org.apache.tuscany.sca.test.corba.types.TScenarioSix"/>
+ <tuscany:binding.corba host="localhost" port="5050" name="ScenarioSixTuscany" id="IDL:org/apache/tuscany/sca/test/corba/generated/ScenarioSix:1.0"/>
+ </service>
+
+</composite>
diff --git a/java/sca/itest/corba/src/test/resources/itest_scenario.idl b/java/sca/itest/corba/src/test/resources/itest_scenario.idl
index f38f49ceab..fb7697ce77 100644
--- a/java/sca/itest/corba/src/test/resources/itest_scenario.idl
+++ b/java/sca/itest/corba/src/test/resources/itest_scenario.idl
@@ -72,6 +72,20 @@ module org {
attribute string stringField;
};
+
+ typedef string StringArray[2][2];
+
+ struct AnnotatedStruct {
+ StringArray stringArray;
+ };
+
+ interface ScenarioSix {
+
+ StringArray passStringArray(in StringArray arg);
+
+ AnnotatedStruct passAnnotatedStruct(in AnnotatedStruct arg);
+
+ };
};
};
};