summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--branches/sca-java-1.4/distribution/src/main/assembly/src.xml1
-rw-r--r--branches/sca-java-1.4/itest/binding-sca-jms/client/src/test/java/itest/MyClientTestCase.java18
-rw-r--r--branches/sca-java-1.4/itest/binding-sca-jms/service/src/test/java/itest/MyServiceTestCase.java18
-rw-r--r--branches/sca-java-1.4/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerUnion.java242
-rw-r--r--branches/sca-java-1.4/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerUnionHelper.java230
-rw-r--r--branches/sca-java-1.4/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerUnionHolder.java94
-rw-r--r--branches/sca-java-1.4/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichUnion.java372
-rw-r--r--branches/sca-java-1.4/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichUnionHelper.java332
-rw-r--r--branches/sca-java-1.4/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichUnionHolder.java94
-rw-r--r--branches/sca-java-1.4/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomDeleteTestCase.java18
-rw-r--r--branches/sca-java-1.4/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomGetTestCase.java18
-rw-r--r--branches/sca-java-1.4/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomPostTestCase.java18
-rw-r--r--branches/sca-java-1.4/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomPutTestCase.java18
-rw-r--r--branches/sca-java-1.4/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/EnumTypeHelper.java18
-rw-r--r--branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTests.java44
-rw-r--r--branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTestsHelper.java188
-rw-r--r--branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTestsHolder.java94
-rw-r--r--branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTestsOperations.java50
-rw-r--r--branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/InnerUnion.java242
-rw-r--r--branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/InnerUnionHelper.java230
-rw-r--r--branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/InnerUnionHolder.java94
-rw-r--r--branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/RichUnion.java372
-rw-r--r--branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/RichUnionHelper.java332
-rw-r--r--branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/RichUnionHolder.java94
-rw-r--r--branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/StringArrayHelper.java170
-rw-r--r--branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/StringArrayHolder.java96
-rw-r--r--branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/TestStruct.java74
-rw-r--r--branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/TestStructHelper.java316
-rw-r--r--branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/TestStructHolder.java94
-rw-r--r--branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/_ArraysUnionsTestsImplBase.java190
-rw-r--r--branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/_ArraysUnionsTestsStub.java218
-rw-r--r--branches/sca-java-1.4/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/TuscanyNamespaceContext.java266
-rw-r--r--branches/sca-java-1.4/modules/host-openejb/src/main/java/org/apache/tuscany/sca/host/openejb/OpenEJBServer.java272
-rw-r--r--branches/sca-java-1.4/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxLauncherBundleHelper.java18
-rw-r--r--branches/sca-java-1.4/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/LauncherBundleActivator.java18
-rw-r--r--branches/sca-java-1.4/modules/tracing-aspectj/launcher.bat17
-rw-r--r--branches/sca-java-1.4/modules/tracing-aspectj/src/main/resources/META-INF/aop.xml18
37 files changed, 2823 insertions, 2175 deletions
diff --git a/branches/sca-java-1.4/distribution/src/main/assembly/src.xml b/branches/sca-java-1.4/distribution/src/main/assembly/src.xml
index 889fe71b0c..b15961d636 100644
--- a/branches/sca-java-1.4/distribution/src/main/assembly/src.xml
+++ b/branches/sca-java-1.4/distribution/src/main/assembly/src.xml
@@ -75,6 +75,7 @@
<exclude>**/surefire*</exclude>
<exclude>**/cobertura.ser</exclude>
<exclude>**/log/*.dat</exclude>
+ <exclude>**/orbtrc.*.txt</exclude>
<exclude>bin</exclude>
<exclude>bin/*</exclude>
<exclude>**/var/journal</exclude>
diff --git a/branches/sca-java-1.4/itest/binding-sca-jms/client/src/test/java/itest/MyClientTestCase.java b/branches/sca-java-1.4/itest/binding-sca-jms/client/src/test/java/itest/MyClientTestCase.java
index 5c56dbaf84..d28d4a51b5 100644
--- a/branches/sca-java-1.4/itest/binding-sca-jms/client/src/test/java/itest/MyClientTestCase.java
+++ b/branches/sca-java-1.4/itest/binding-sca-jms/client/src/test/java/itest/MyClientTestCase.java
@@ -1,3 +1,21 @@
+/*
+ * 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 itest;
diff --git a/branches/sca-java-1.4/itest/binding-sca-jms/service/src/test/java/itest/MyServiceTestCase.java b/branches/sca-java-1.4/itest/binding-sca-jms/service/src/test/java/itest/MyServiceTestCase.java
index cb79ae050a..3ec979065d 100644
--- a/branches/sca-java-1.4/itest/binding-sca-jms/service/src/test/java/itest/MyServiceTestCase.java
+++ b/branches/sca-java-1.4/itest/binding-sca-jms/service/src/test/java/itest/MyServiceTestCase.java
@@ -1,3 +1,21 @@
+/*
+ * 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 itest;
diff --git a/branches/sca-java-1.4/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerUnion.java b/branches/sca-java-1.4/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerUnion.java
index 40c017dd29..05bb29058f 100644
--- a/branches/sca-java-1.4/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerUnion.java
+++ b/branches/sca-java-1.4/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerUnion.java
@@ -1,112 +1,130 @@
-package org.apache.tuscany.sca.test.corba.generated;
-
-
-/**
-* org/apache/tuscany/sca/test/corba/generated/InnerUnion.java .
-* Generated by the IDL-to-Java compiler (portable), version "3.2"
-* from itest_scenario.idl
-* niedziela, 17 sierpień 2008 19:07:14 CEST
-*/
-
-public final class InnerUnion implements org.omg.CORBA.portable.IDLEntity
-{
- private int ___x;
- private float ___y;
- private int __discriminator;
- private boolean __uninitialized = true;
-
- public InnerUnion ()
- {
- }
-
- public int discriminator ()
- {
- if (__uninitialized)
- throw new org.omg.CORBA.BAD_OPERATION ();
- return __discriminator;
- }
-
- public int x ()
- {
- if (__uninitialized)
- throw new org.omg.CORBA.BAD_OPERATION ();
- verifyx (__discriminator);
- return ___x;
- }
-
- public void x (int value)
- {
- __discriminator = 1;
- ___x = value;
- __uninitialized = false;
- }
-
- public void x (int discriminator, int value)
- {
- verifyx (discriminator);
- __discriminator = discriminator;
- ___x = value;
- __uninitialized = false;
- }
-
- private void verifyx (int discriminator)
- {
- if (discriminator != 1)
- throw new org.omg.CORBA.BAD_OPERATION ();
- }
-
- public float y ()
- {
- if (__uninitialized)
- throw new org.omg.CORBA.BAD_OPERATION ();
- verifyy (__discriminator);
- return ___y;
- }
-
- public void y (float value)
- {
- __discriminator = 2;
- ___y = value;
- __uninitialized = false;
- }
-
- public void y (int discriminator, float value)
- {
- verifyy (discriminator);
- __discriminator = discriminator;
- ___y = value;
- __uninitialized = false;
- }
-
- private void verifyy (int discriminator)
- {
- if (discriminator != 2)
- throw new org.omg.CORBA.BAD_OPERATION ();
- }
-
- public void _default ()
- {
- __discriminator = -2147483648;
- __uninitialized = false;
- }
-
- public void _default (int discriminator)
- {
- verifyDefault( discriminator ) ;
- __discriminator = discriminator ;
- __uninitialized = false;
- }
-
- private void verifyDefault( int value )
- {
- switch (value) {
- case 1:
- case 2:
- throw new org.omg.CORBA.BAD_OPERATION() ;
-
- default:
- return;
- }
- }
-
-} // class InnerUnion
+/*
+ * 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/InnerUnion.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* niedziela, 17 sierpień 2008 19:07:14 CEST
+*/
+
+public final class InnerUnion implements org.omg.CORBA.portable.IDLEntity
+{
+ private int ___x;
+ private float ___y;
+ private int __discriminator;
+ private boolean __uninitialized = true;
+
+ public InnerUnion ()
+ {
+ }
+
+ public int discriminator ()
+ {
+ if (__uninitialized)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ return __discriminator;
+ }
+
+ public int x ()
+ {
+ if (__uninitialized)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ verifyx (__discriminator);
+ return ___x;
+ }
+
+ public void x (int value)
+ {
+ __discriminator = 1;
+ ___x = value;
+ __uninitialized = false;
+ }
+
+ public void x (int discriminator, int value)
+ {
+ verifyx (discriminator);
+ __discriminator = discriminator;
+ ___x = value;
+ __uninitialized = false;
+ }
+
+ private void verifyx (int discriminator)
+ {
+ if (discriminator != 1)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ }
+
+ public float y ()
+ {
+ if (__uninitialized)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ verifyy (__discriminator);
+ return ___y;
+ }
+
+ public void y (float value)
+ {
+ __discriminator = 2;
+ ___y = value;
+ __uninitialized = false;
+ }
+
+ public void y (int discriminator, float value)
+ {
+ verifyy (discriminator);
+ __discriminator = discriminator;
+ ___y = value;
+ __uninitialized = false;
+ }
+
+ private void verifyy (int discriminator)
+ {
+ if (discriminator != 2)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ }
+
+ public void _default ()
+ {
+ __discriminator = -2147483648;
+ __uninitialized = false;
+ }
+
+ public void _default (int discriminator)
+ {
+ verifyDefault( discriminator ) ;
+ __discriminator = discriminator ;
+ __uninitialized = false;
+ }
+
+ private void verifyDefault( int value )
+ {
+ switch (value) {
+ case 1:
+ case 2:
+ throw new org.omg.CORBA.BAD_OPERATION() ;
+
+ default:
+ return;
+ }
+ }
+
+} // class InnerUnion
diff --git a/branches/sca-java-1.4/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerUnionHelper.java b/branches/sca-java-1.4/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerUnionHelper.java
index 6ec067521e..bc337d7af2 100644
--- a/branches/sca-java-1.4/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerUnionHelper.java
+++ b/branches/sca-java-1.4/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerUnionHelper.java
@@ -1,106 +1,124 @@
-package org.apache.tuscany.sca.test.corba.generated;
-
-
-/**
-* org/apache/tuscany/sca/test/corba/generated/InnerUnionHelper.java .
-* Generated by the IDL-to-Java compiler (portable), version "3.2"
-* from itest_scenario.idl
-* niedziela, 17 sierpień 2008 19:07:14 CEST
-*/
-
-abstract public class InnerUnionHelper
-{
- private static String _id = "IDL:org/apache/tuscany/sca/test/corba/generated/InnerUnion/InnerUnion:1.0";
-
- public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.test.corba.generated.InnerUnion 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.InnerUnion 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)
- {
- org.omg.CORBA.TypeCode _disTypeCode0;
- _disTypeCode0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
- org.omg.CORBA.UnionMember[] _members0 = new org.omg.CORBA.UnionMember [2];
- org.omg.CORBA.TypeCode _tcOf_members0;
- org.omg.CORBA.Any _anyOf_members0;
-
- // Branch for x (case label 1)
- _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
- _anyOf_members0.insert_long ((int)1);
- _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
- _members0[0] = new org.omg.CORBA.UnionMember (
- "x",
- _anyOf_members0,
- _tcOf_members0,
- null);
-
- // Branch for y (case label 2)
- _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
- _anyOf_members0.insert_long ((int)2);
- _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_float);
- _members0[1] = new org.omg.CORBA.UnionMember (
- "y",
- _anyOf_members0,
- _tcOf_members0,
- null);
- __typeCode = org.omg.CORBA.ORB.init ().create_union_tc (org.apache.tuscany.sca.test.corba.generated.InnerUnionHelper.id (), "InnerUnion", _disTypeCode0, _members0);
- }
- return __typeCode;
- }
-
- public static String id ()
- {
- return _id;
- }
-
- public static org.apache.tuscany.sca.test.corba.generated.InnerUnion read (org.omg.CORBA.portable.InputStream istream)
- {
- org.apache.tuscany.sca.test.corba.generated.InnerUnion value = new org.apache.tuscany.sca.test.corba.generated.InnerUnion ();
- int _dis0 = (int)0;
- _dis0 = istream.read_long ();
- switch (_dis0)
- {
- case 1:
- int _x = (int)0;
- _x = istream.read_long ();
- value.x (_x);
- break;
- case 2:
- float _y = (float)0;
- _y = istream.read_float ();
- value.y (_y);
- break;
- default:
- value._default( _dis0 ) ;
- break;
- }
- return value;
- }
-
- public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.test.corba.generated.InnerUnion value)
- {
- ostream.write_long (value.discriminator ());
- switch (value.discriminator ())
- {
- case 1:
- ostream.write_long (value.x ());
- break;
- case 2:
- ostream.write_float (value.y ());
- break;
- }
- }
-
-}
+/*
+ * 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/InnerUnionHelper.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* niedziela, 17 sierpień 2008 19:07:14 CEST
+*/
+
+abstract public class InnerUnionHelper
+{
+ private static String _id = "IDL:org/apache/tuscany/sca/test/corba/generated/InnerUnion/InnerUnion:1.0";
+
+ public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.test.corba.generated.InnerUnion 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.InnerUnion 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)
+ {
+ org.omg.CORBA.TypeCode _disTypeCode0;
+ _disTypeCode0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
+ org.omg.CORBA.UnionMember[] _members0 = new org.omg.CORBA.UnionMember [2];
+ org.omg.CORBA.TypeCode _tcOf_members0;
+ org.omg.CORBA.Any _anyOf_members0;
+
+ // Branch for x (case label 1)
+ _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
+ _anyOf_members0.insert_long ((int)1);
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
+ _members0[0] = new org.omg.CORBA.UnionMember (
+ "x",
+ _anyOf_members0,
+ _tcOf_members0,
+ null);
+
+ // Branch for y (case label 2)
+ _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
+ _anyOf_members0.insert_long ((int)2);
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_float);
+ _members0[1] = new org.omg.CORBA.UnionMember (
+ "y",
+ _anyOf_members0,
+ _tcOf_members0,
+ null);
+ __typeCode = org.omg.CORBA.ORB.init ().create_union_tc (org.apache.tuscany.sca.test.corba.generated.InnerUnionHelper.id (), "InnerUnion", _disTypeCode0, _members0);
+ }
+ return __typeCode;
+ }
+
+ public static String id ()
+ {
+ return _id;
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.InnerUnion read (org.omg.CORBA.portable.InputStream istream)
+ {
+ org.apache.tuscany.sca.test.corba.generated.InnerUnion value = new org.apache.tuscany.sca.test.corba.generated.InnerUnion ();
+ int _dis0 = (int)0;
+ _dis0 = istream.read_long ();
+ switch (_dis0)
+ {
+ case 1:
+ int _x = (int)0;
+ _x = istream.read_long ();
+ value.x (_x);
+ break;
+ case 2:
+ float _y = (float)0;
+ _y = istream.read_float ();
+ value.y (_y);
+ break;
+ default:
+ value._default( _dis0 ) ;
+ break;
+ }
+ return value;
+ }
+
+ public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.test.corba.generated.InnerUnion value)
+ {
+ ostream.write_long (value.discriminator ());
+ switch (value.discriminator ())
+ {
+ case 1:
+ ostream.write_long (value.x ());
+ break;
+ case 2:
+ ostream.write_float (value.y ());
+ break;
+ }
+ }
+
+}
diff --git a/branches/sca-java-1.4/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerUnionHolder.java b/branches/sca-java-1.4/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerUnionHolder.java
index 8955f81694..93a1cc763b 100644
--- a/branches/sca-java-1.4/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerUnionHolder.java
+++ b/branches/sca-java-1.4/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/InnerUnionHolder.java
@@ -1,38 +1,56 @@
-package org.apache.tuscany.sca.test.corba.generated;
-
-/**
-* org/apache/tuscany/sca/test/corba/generated/InnerUnionHolder.java .
-* Generated by the IDL-to-Java compiler (portable), version "3.2"
-* from itest_scenario.idl
-* niedziela, 17 sierpień 2008 19:07:14 CEST
-*/
-
-public final class InnerUnionHolder implements org.omg.CORBA.portable.Streamable
-{
- public org.apache.tuscany.sca.test.corba.generated.InnerUnion value = null;
-
- public InnerUnionHolder ()
- {
- }
-
- public InnerUnionHolder (org.apache.tuscany.sca.test.corba.generated.InnerUnion initialValue)
- {
- value = initialValue;
- }
-
- public void _read (org.omg.CORBA.portable.InputStream i)
- {
- value = org.apache.tuscany.sca.test.corba.generated.InnerUnionHelper.read (i);
- }
-
- public void _write (org.omg.CORBA.portable.OutputStream o)
- {
- org.apache.tuscany.sca.test.corba.generated.InnerUnionHelper.write (o, value);
- }
-
- public org.omg.CORBA.TypeCode _type ()
- {
- return org.apache.tuscany.sca.test.corba.generated.InnerUnionHelper.type ();
- }
-
-}
+/*
+ * 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/InnerUnionHolder.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* niedziela, 17 sierpień 2008 19:07:14 CEST
+*/
+
+public final class InnerUnionHolder implements org.omg.CORBA.portable.Streamable
+{
+ public org.apache.tuscany.sca.test.corba.generated.InnerUnion value = null;
+
+ public InnerUnionHolder ()
+ {
+ }
+
+ public InnerUnionHolder (org.apache.tuscany.sca.test.corba.generated.InnerUnion initialValue)
+ {
+ value = initialValue;
+ }
+
+ public void _read (org.omg.CORBA.portable.InputStream i)
+ {
+ value = org.apache.tuscany.sca.test.corba.generated.InnerUnionHelper.read (i);
+ }
+
+ public void _write (org.omg.CORBA.portable.OutputStream o)
+ {
+ org.apache.tuscany.sca.test.corba.generated.InnerUnionHelper.write (o, value);
+ }
+
+ public org.omg.CORBA.TypeCode _type ()
+ {
+ return org.apache.tuscany.sca.test.corba.generated.InnerUnionHelper.type ();
+ }
+
+}
diff --git a/branches/sca-java-1.4/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichUnion.java b/branches/sca-java-1.4/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichUnion.java
index 4a3376c476..a777c78707 100644
--- a/branches/sca-java-1.4/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichUnion.java
+++ b/branches/sca-java-1.4/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichUnion.java
@@ -1,177 +1,195 @@
-package org.apache.tuscany.sca.test.corba.generated;
-
-
-/**
-* org/apache/tuscany/sca/test/corba/generated/RichUnion.java .
-* Generated by the IDL-to-Java compiler (portable), version "3.2"
-* from itest_scenario.idl
-* niedziela, 17 sierpień 2008 19:07:14 CEST
-*/
-
-public final class RichUnion implements org.omg.CORBA.portable.IDLEntity
-{
- private int ___x;
- private float ___y;
- private String ___z;
- private org.apache.tuscany.sca.test.corba.generated.InnerUnion ___iu;
- private boolean ___a;
- private int __discriminator;
- private boolean __uninitialized = true;
-
- public RichUnion ()
- {
- }
-
- public int discriminator ()
- {
- if (__uninitialized)
- throw new org.omg.CORBA.BAD_OPERATION ();
- return __discriminator;
- }
-
- public int x ()
- {
- if (__uninitialized)
- throw new org.omg.CORBA.BAD_OPERATION ();
- verifyx (__discriminator);
- return ___x;
- }
-
- public void x (int value)
- {
- __discriminator = 1;
- ___x = value;
- __uninitialized = false;
- }
-
- public void x (int discriminator, int value)
- {
- verifyx (discriminator);
- __discriminator = discriminator;
- ___x = value;
- __uninitialized = false;
- }
-
- private void verifyx (int discriminator)
- {
- if (discriminator != 1)
- throw new org.omg.CORBA.BAD_OPERATION ();
- }
-
- public float y ()
- {
- if (__uninitialized)
- throw new org.omg.CORBA.BAD_OPERATION ();
- verifyy (__discriminator);
- return ___y;
- }
-
- public void y (float value)
- {
- __discriminator = 2;
- ___y = value;
- __uninitialized = false;
- }
-
- public void y (int discriminator, float value)
- {
- verifyy (discriminator);
- __discriminator = discriminator;
- ___y = value;
- __uninitialized = false;
- }
-
- private void verifyy (int discriminator)
- {
- if (discriminator != 2)
- throw new org.omg.CORBA.BAD_OPERATION ();
- }
-
- public String z ()
- {
- if (__uninitialized)
- throw new org.omg.CORBA.BAD_OPERATION ();
- verifyz (__discriminator);
- return ___z;
- }
-
- public void z (String value)
- {
- __discriminator = 3;
- ___z = value;
- __uninitialized = false;
- }
-
- public void z (int discriminator, String value)
- {
- verifyz (discriminator);
- __discriminator = discriminator;
- ___z = value;
- __uninitialized = false;
- }
-
- private void verifyz (int discriminator)
- {
- if (discriminator != 3)
- throw new org.omg.CORBA.BAD_OPERATION ();
- }
-
- public org.apache.tuscany.sca.test.corba.generated.InnerUnion iu ()
- {
- if (__uninitialized)
- throw new org.omg.CORBA.BAD_OPERATION ();
- verifyiu (__discriminator);
- return ___iu;
- }
-
- public void iu (org.apache.tuscany.sca.test.corba.generated.InnerUnion value)
- {
- __discriminator = 4;
- ___iu = value;
- __uninitialized = false;
- }
-
- public void iu (int discriminator, org.apache.tuscany.sca.test.corba.generated.InnerUnion value)
- {
- verifyiu (discriminator);
- __discriminator = discriminator;
- ___iu = value;
- __uninitialized = false;
- }
-
- private void verifyiu (int discriminator)
- {
- if (discriminator != 4)
- throw new org.omg.CORBA.BAD_OPERATION ();
- }
-
- public boolean a ()
- {
- if (__uninitialized)
- throw new org.omg.CORBA.BAD_OPERATION ();
- verifya (__discriminator);
- return ___a;
- }
-
- public void a (boolean value)
- {
- __discriminator = -2147483648;
- ___a = value;
- __uninitialized = false;
- }
-
- public void a (int discriminator, boolean value)
- {
- verifya (discriminator);
- __discriminator = discriminator;
- ___a = value;
- __uninitialized = false;
- }
-
- private void verifya (int discriminator)
- {
- if (discriminator == 1 || discriminator == 2 || discriminator == 3 || discriminator == 4)
- throw new org.omg.CORBA.BAD_OPERATION ();
- }
-
-} // class RichUnion
+/*
+ * 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/RichUnion.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* niedziela, 17 sierpień 2008 19:07:14 CEST
+*/
+
+public final class RichUnion implements org.omg.CORBA.portable.IDLEntity
+{
+ private int ___x;
+ private float ___y;
+ private String ___z;
+ private org.apache.tuscany.sca.test.corba.generated.InnerUnion ___iu;
+ private boolean ___a;
+ private int __discriminator;
+ private boolean __uninitialized = true;
+
+ public RichUnion ()
+ {
+ }
+
+ public int discriminator ()
+ {
+ if (__uninitialized)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ return __discriminator;
+ }
+
+ public int x ()
+ {
+ if (__uninitialized)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ verifyx (__discriminator);
+ return ___x;
+ }
+
+ public void x (int value)
+ {
+ __discriminator = 1;
+ ___x = value;
+ __uninitialized = false;
+ }
+
+ public void x (int discriminator, int value)
+ {
+ verifyx (discriminator);
+ __discriminator = discriminator;
+ ___x = value;
+ __uninitialized = false;
+ }
+
+ private void verifyx (int discriminator)
+ {
+ if (discriminator != 1)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ }
+
+ public float y ()
+ {
+ if (__uninitialized)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ verifyy (__discriminator);
+ return ___y;
+ }
+
+ public void y (float value)
+ {
+ __discriminator = 2;
+ ___y = value;
+ __uninitialized = false;
+ }
+
+ public void y (int discriminator, float value)
+ {
+ verifyy (discriminator);
+ __discriminator = discriminator;
+ ___y = value;
+ __uninitialized = false;
+ }
+
+ private void verifyy (int discriminator)
+ {
+ if (discriminator != 2)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ }
+
+ public String z ()
+ {
+ if (__uninitialized)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ verifyz (__discriminator);
+ return ___z;
+ }
+
+ public void z (String value)
+ {
+ __discriminator = 3;
+ ___z = value;
+ __uninitialized = false;
+ }
+
+ public void z (int discriminator, String value)
+ {
+ verifyz (discriminator);
+ __discriminator = discriminator;
+ ___z = value;
+ __uninitialized = false;
+ }
+
+ private void verifyz (int discriminator)
+ {
+ if (discriminator != 3)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ }
+
+ public org.apache.tuscany.sca.test.corba.generated.InnerUnion iu ()
+ {
+ if (__uninitialized)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ verifyiu (__discriminator);
+ return ___iu;
+ }
+
+ public void iu (org.apache.tuscany.sca.test.corba.generated.InnerUnion value)
+ {
+ __discriminator = 4;
+ ___iu = value;
+ __uninitialized = false;
+ }
+
+ public void iu (int discriminator, org.apache.tuscany.sca.test.corba.generated.InnerUnion value)
+ {
+ verifyiu (discriminator);
+ __discriminator = discriminator;
+ ___iu = value;
+ __uninitialized = false;
+ }
+
+ private void verifyiu (int discriminator)
+ {
+ if (discriminator != 4)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ }
+
+ public boolean a ()
+ {
+ if (__uninitialized)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ verifya (__discriminator);
+ return ___a;
+ }
+
+ public void a (boolean value)
+ {
+ __discriminator = -2147483648;
+ ___a = value;
+ __uninitialized = false;
+ }
+
+ public void a (int discriminator, boolean value)
+ {
+ verifya (discriminator);
+ __discriminator = discriminator;
+ ___a = value;
+ __uninitialized = false;
+ }
+
+ private void verifya (int discriminator)
+ {
+ if (discriminator == 1 || discriminator == 2 || discriminator == 3 || discriminator == 4)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ }
+
+} // class RichUnion
diff --git a/branches/sca-java-1.4/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichUnionHelper.java b/branches/sca-java-1.4/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichUnionHelper.java
index 9b89d7f98a..0a7e6e1285 100644
--- a/branches/sca-java-1.4/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichUnionHelper.java
+++ b/branches/sca-java-1.4/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichUnionHelper.java
@@ -1,157 +1,175 @@
-package org.apache.tuscany.sca.test.corba.generated;
-
-
-/**
-* org/apache/tuscany/sca/test/corba/generated/RichUnionHelper.java .
-* Generated by the IDL-to-Java compiler (portable), version "3.2"
-* from itest_scenario.idl
-* niedziela, 17 sierpień 2008 19:07:14 CEST
-*/
-
-abstract public class RichUnionHelper
-{
- private static String _id = "IDL:org/apache/tuscany/sca/test/corba/generated/RichUnion/RichUnion:1.0";
-
- public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.test.corba.generated.RichUnion 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.RichUnion 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)
- {
- org.omg.CORBA.TypeCode _disTypeCode0;
- _disTypeCode0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
- org.omg.CORBA.UnionMember[] _members0 = new org.omg.CORBA.UnionMember [5];
- org.omg.CORBA.TypeCode _tcOf_members0;
- org.omg.CORBA.Any _anyOf_members0;
-
- // Branch for x (case label 1)
- _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
- _anyOf_members0.insert_long ((int)1);
- _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
- _members0[0] = new org.omg.CORBA.UnionMember (
- "x",
- _anyOf_members0,
- _tcOf_members0,
- null);
-
- // Branch for y (case label 2)
- _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
- _anyOf_members0.insert_long ((int)2);
- _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_float);
- _members0[1] = new org.omg.CORBA.UnionMember (
- "y",
- _anyOf_members0,
- _tcOf_members0,
- null);
-
- // Branch for z (case label 3)
- _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
- _anyOf_members0.insert_long ((int)3);
- _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
- _members0[2] = new org.omg.CORBA.UnionMember (
- "z",
- _anyOf_members0,
- _tcOf_members0,
- null);
-
- // Branch for iu (case label 4)
- _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
- _anyOf_members0.insert_long ((int)4);
- _tcOf_members0 = org.apache.tuscany.sca.test.corba.generated.InnerUnionHelper.type ();
- _members0[3] = new org.omg.CORBA.UnionMember (
- "iu",
- _anyOf_members0,
- _tcOf_members0,
- null);
-
- // Branch for a (Default case)
- _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
- _anyOf_members0.insert_octet ((byte)0); // default member label
- _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_boolean);
- _members0[4] = new org.omg.CORBA.UnionMember (
- "a",
- _anyOf_members0,
- _tcOf_members0,
- null);
- __typeCode = org.omg.CORBA.ORB.init ().create_union_tc (org.apache.tuscany.sca.test.corba.generated.RichUnionHelper.id (), "RichUnion", _disTypeCode0, _members0);
- }
- return __typeCode;
- }
-
- public static String id ()
- {
- return _id;
- }
-
- public static org.apache.tuscany.sca.test.corba.generated.RichUnion read (org.omg.CORBA.portable.InputStream istream)
- {
- org.apache.tuscany.sca.test.corba.generated.RichUnion value = new org.apache.tuscany.sca.test.corba.generated.RichUnion ();
- int _dis0 = (int)0;
- _dis0 = istream.read_long ();
- switch (_dis0)
- {
- case 1:
- int _x = (int)0;
- _x = istream.read_long ();
- value.x (_x);
- break;
- case 2:
- float _y = (float)0;
- _y = istream.read_float ();
- value.y (_y);
- break;
- case 3:
- String _z = null;
- _z = istream.read_string ();
- value.z (_z);
- break;
- case 4:
- org.apache.tuscany.sca.test.corba.generated.InnerUnion _iu = null;
- _iu = org.apache.tuscany.sca.test.corba.generated.InnerUnionHelper.read (istream);
- value.iu (_iu);
- break;
- default:
- boolean _a = false;
- _a = istream.read_boolean ();
- value.a (_dis0, _a);
- break;
- }
- return value;
- }
-
- public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.test.corba.generated.RichUnion value)
- {
- ostream.write_long (value.discriminator ());
- switch (value.discriminator ())
- {
- case 1:
- ostream.write_long (value.x ());
- break;
- case 2:
- ostream.write_float (value.y ());
- break;
- case 3:
- ostream.write_string (value.z ());
- break;
- case 4:
- org.apache.tuscany.sca.test.corba.generated.InnerUnionHelper.write (ostream, value.iu ());
- break;
- default:
- ostream.write_boolean (value.a ());
- break;
- }
- }
-
-}
+/*
+ * 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/RichUnionHelper.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* niedziela, 17 sierpień 2008 19:07:14 CEST
+*/
+
+abstract public class RichUnionHelper
+{
+ private static String _id = "IDL:org/apache/tuscany/sca/test/corba/generated/RichUnion/RichUnion:1.0";
+
+ public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.test.corba.generated.RichUnion 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.RichUnion 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)
+ {
+ org.omg.CORBA.TypeCode _disTypeCode0;
+ _disTypeCode0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
+ org.omg.CORBA.UnionMember[] _members0 = new org.omg.CORBA.UnionMember [5];
+ org.omg.CORBA.TypeCode _tcOf_members0;
+ org.omg.CORBA.Any _anyOf_members0;
+
+ // Branch for x (case label 1)
+ _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
+ _anyOf_members0.insert_long ((int)1);
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
+ _members0[0] = new org.omg.CORBA.UnionMember (
+ "x",
+ _anyOf_members0,
+ _tcOf_members0,
+ null);
+
+ // Branch for y (case label 2)
+ _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
+ _anyOf_members0.insert_long ((int)2);
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_float);
+ _members0[1] = new org.omg.CORBA.UnionMember (
+ "y",
+ _anyOf_members0,
+ _tcOf_members0,
+ null);
+
+ // Branch for z (case label 3)
+ _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
+ _anyOf_members0.insert_long ((int)3);
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
+ _members0[2] = new org.omg.CORBA.UnionMember (
+ "z",
+ _anyOf_members0,
+ _tcOf_members0,
+ null);
+
+ // Branch for iu (case label 4)
+ _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
+ _anyOf_members0.insert_long ((int)4);
+ _tcOf_members0 = org.apache.tuscany.sca.test.corba.generated.InnerUnionHelper.type ();
+ _members0[3] = new org.omg.CORBA.UnionMember (
+ "iu",
+ _anyOf_members0,
+ _tcOf_members0,
+ null);
+
+ // Branch for a (Default case)
+ _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
+ _anyOf_members0.insert_octet ((byte)0); // default member label
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_boolean);
+ _members0[4] = new org.omg.CORBA.UnionMember (
+ "a",
+ _anyOf_members0,
+ _tcOf_members0,
+ null);
+ __typeCode = org.omg.CORBA.ORB.init ().create_union_tc (org.apache.tuscany.sca.test.corba.generated.RichUnionHelper.id (), "RichUnion", _disTypeCode0, _members0);
+ }
+ return __typeCode;
+ }
+
+ public static String id ()
+ {
+ return _id;
+ }
+
+ public static org.apache.tuscany.sca.test.corba.generated.RichUnion read (org.omg.CORBA.portable.InputStream istream)
+ {
+ org.apache.tuscany.sca.test.corba.generated.RichUnion value = new org.apache.tuscany.sca.test.corba.generated.RichUnion ();
+ int _dis0 = (int)0;
+ _dis0 = istream.read_long ();
+ switch (_dis0)
+ {
+ case 1:
+ int _x = (int)0;
+ _x = istream.read_long ();
+ value.x (_x);
+ break;
+ case 2:
+ float _y = (float)0;
+ _y = istream.read_float ();
+ value.y (_y);
+ break;
+ case 3:
+ String _z = null;
+ _z = istream.read_string ();
+ value.z (_z);
+ break;
+ case 4:
+ org.apache.tuscany.sca.test.corba.generated.InnerUnion _iu = null;
+ _iu = org.apache.tuscany.sca.test.corba.generated.InnerUnionHelper.read (istream);
+ value.iu (_iu);
+ break;
+ default:
+ boolean _a = false;
+ _a = istream.read_boolean ();
+ value.a (_dis0, _a);
+ break;
+ }
+ return value;
+ }
+
+ public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.test.corba.generated.RichUnion value)
+ {
+ ostream.write_long (value.discriminator ());
+ switch (value.discriminator ())
+ {
+ case 1:
+ ostream.write_long (value.x ());
+ break;
+ case 2:
+ ostream.write_float (value.y ());
+ break;
+ case 3:
+ ostream.write_string (value.z ());
+ break;
+ case 4:
+ org.apache.tuscany.sca.test.corba.generated.InnerUnionHelper.write (ostream, value.iu ());
+ break;
+ default:
+ ostream.write_boolean (value.a ());
+ break;
+ }
+ }
+
+}
diff --git a/branches/sca-java-1.4/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichUnionHolder.java b/branches/sca-java-1.4/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichUnionHolder.java
index 3c1a1c9a83..b239f8d93a 100644
--- a/branches/sca-java-1.4/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichUnionHolder.java
+++ b/branches/sca-java-1.4/itest/corba/src/test/java/org/apache/tuscany/sca/test/corba/generated/RichUnionHolder.java
@@ -1,38 +1,56 @@
-package org.apache.tuscany.sca.test.corba.generated;
-
-/**
-* org/apache/tuscany/sca/test/corba/generated/RichUnionHolder.java .
-* Generated by the IDL-to-Java compiler (portable), version "3.2"
-* from itest_scenario.idl
-* niedziela, 17 sierpień 2008 19:07:14 CEST
-*/
-
-public final class RichUnionHolder implements org.omg.CORBA.portable.Streamable
-{
- public org.apache.tuscany.sca.test.corba.generated.RichUnion value = null;
-
- public RichUnionHolder ()
- {
- }
-
- public RichUnionHolder (org.apache.tuscany.sca.test.corba.generated.RichUnion initialValue)
- {
- value = initialValue;
- }
-
- public void _read (org.omg.CORBA.portable.InputStream i)
- {
- value = org.apache.tuscany.sca.test.corba.generated.RichUnionHelper.read (i);
- }
-
- public void _write (org.omg.CORBA.portable.OutputStream o)
- {
- org.apache.tuscany.sca.test.corba.generated.RichUnionHelper.write (o, value);
- }
-
- public org.omg.CORBA.TypeCode _type ()
- {
- return org.apache.tuscany.sca.test.corba.generated.RichUnionHelper.type ();
- }
-
-}
+/*
+ * 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/RichUnionHolder.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from itest_scenario.idl
+* niedziela, 17 sierpień 2008 19:07:14 CEST
+*/
+
+public final class RichUnionHolder implements org.omg.CORBA.portable.Streamable
+{
+ public org.apache.tuscany.sca.test.corba.generated.RichUnion value = null;
+
+ public RichUnionHolder ()
+ {
+ }
+
+ public RichUnionHolder (org.apache.tuscany.sca.test.corba.generated.RichUnion initialValue)
+ {
+ value = initialValue;
+ }
+
+ public void _read (org.omg.CORBA.portable.InputStream i)
+ {
+ value = org.apache.tuscany.sca.test.corba.generated.RichUnionHelper.read (i);
+ }
+
+ public void _write (org.omg.CORBA.portable.OutputStream o)
+ {
+ org.apache.tuscany.sca.test.corba.generated.RichUnionHelper.write (o, value);
+ }
+
+ public org.omg.CORBA.TypeCode _type ()
+ {
+ return org.apache.tuscany.sca.test.corba.generated.RichUnionHelper.type ();
+ }
+
+}
diff --git a/branches/sca-java-1.4/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomDeleteTestCase.java b/branches/sca-java-1.4/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomDeleteTestCase.java
index f9ac5f9c78..7688a5dd26 100644
--- a/branches/sca-java-1.4/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomDeleteTestCase.java
+++ b/branches/sca-java-1.4/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomDeleteTestCase.java
@@ -1,3 +1,21 @@
+/*
+ * 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.binding.atom;
import java.util.UUID;
diff --git a/branches/sca-java-1.4/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomGetTestCase.java b/branches/sca-java-1.4/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomGetTestCase.java
index 8d78d167c3..03a427f11c 100644
--- a/branches/sca-java-1.4/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomGetTestCase.java
+++ b/branches/sca-java-1.4/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomGetTestCase.java
@@ -1,3 +1,21 @@
+/*
+ * 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.binding.atom;
import junit.framework.Assert;
diff --git a/branches/sca-java-1.4/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomPostTestCase.java b/branches/sca-java-1.4/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomPostTestCase.java
index ef5fe5a873..e9e0e315ab 100644
--- a/branches/sca-java-1.4/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomPostTestCase.java
+++ b/branches/sca-java-1.4/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomPostTestCase.java
@@ -1,3 +1,21 @@
+/*
+ * 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.binding.atom;
import junit.framework.Assert;
diff --git a/branches/sca-java-1.4/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomPutTestCase.java b/branches/sca-java-1.4/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomPutTestCase.java
index a5c1226780..c46634e784 100644
--- a/branches/sca-java-1.4/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomPutTestCase.java
+++ b/branches/sca-java-1.4/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomPutTestCase.java
@@ -1,3 +1,21 @@
+/*
+ * 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.binding.atom;
import java.util.UUID;
diff --git a/branches/sca-java-1.4/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/EnumTypeHelper.java b/branches/sca-java-1.4/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/EnumTypeHelper.java
index 30c3ac3a8a..6220802ce6 100644
--- a/branches/sca-java-1.4/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/EnumTypeHelper.java
+++ b/branches/sca-java-1.4/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/EnumTypeHelper.java
@@ -1,3 +1,21 @@
+/*
+ * 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.binding.corba.impl.types.util;
import java.lang.reflect.Method;
diff --git a/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTests.java b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTests.java
index f4ca1577f5..f8c7717fff 100644
--- a/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTests.java
+++ b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTests.java
@@ -1,13 +1,31 @@
-package org.apache.tuscany.sca.binding.corba.testing.arrays_unions;
-
-
-/**
-* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTests.java .
-* Generated by the IDL-to-Java compiler (portable), version "3.2"
-* from arrays_unions.idl
-* niedziela, 17 sierpień 2008 15:45:39 CEST
-*/
-
-public interface ArraysUnionsTests extends ArraysUnionsTestsOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity
-{
-} // interface ArraysUnionsTests
+/*
+ * 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.binding.corba.testing.arrays_unions;
+
+
+/**
+* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTests.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from arrays_unions.idl
+* niedziela, 17 sierpień 2008 15:45:39 CEST
+*/
+
+public interface ArraysUnionsTests extends ArraysUnionsTestsOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity
+{
+} // interface ArraysUnionsTests
diff --git a/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTestsHelper.java b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTestsHelper.java
index d10bc498b7..85dc2b3acc 100644
--- a/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTestsHelper.java
+++ b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTestsHelper.java
@@ -1,85 +1,103 @@
-package org.apache.tuscany.sca.binding.corba.testing.arrays_unions;
-
-
-/**
-* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTestsHelper.java .
-* Generated by the IDL-to-Java compiler (portable), version "3.2"
-* from arrays_unions.idl
-* niedziela, 17 sierpień 2008 15:45:39 CEST
-*/
-
-abstract public class ArraysUnionsTestsHelper
-{
- private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTests:1.0";
-
- public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.binding.corba.testing.arrays_unions.ArraysUnionsTests 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.binding.corba.testing.arrays_unions.ArraysUnionsTests 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.binding.corba.testing.arrays_unions.ArraysUnionsTestsHelper.id (), "ArraysUnionsTests");
- }
- return __typeCode;
- }
-
- public static String id ()
- {
- return _id;
- }
-
- public static org.apache.tuscany.sca.binding.corba.testing.arrays_unions.ArraysUnionsTests read (org.omg.CORBA.portable.InputStream istream)
- {
- return narrow (istream.read_Object (_ArraysUnionsTestsStub.class));
- }
-
- public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.binding.corba.testing.arrays_unions.ArraysUnionsTests value)
- {
- ostream.write_Object ((org.omg.CORBA.Object) value);
- }
-
- public static org.apache.tuscany.sca.binding.corba.testing.arrays_unions.ArraysUnionsTests narrow (org.omg.CORBA.Object obj)
- {
- if (obj == null)
- return null;
- else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.arrays_unions.ArraysUnionsTests)
- return (org.apache.tuscany.sca.binding.corba.testing.arrays_unions.ArraysUnionsTests)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.binding.corba.testing.arrays_unions._ArraysUnionsTestsStub stub = new org.apache.tuscany.sca.binding.corba.testing.arrays_unions._ArraysUnionsTestsStub ();
- stub._set_delegate(delegate);
- return stub;
- }
- }
-
- public static org.apache.tuscany.sca.binding.corba.testing.arrays_unions.ArraysUnionsTests unchecked_narrow (org.omg.CORBA.Object obj)
- {
- if (obj == null)
- return null;
- else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.arrays_unions.ArraysUnionsTests)
- return (org.apache.tuscany.sca.binding.corba.testing.arrays_unions.ArraysUnionsTests)obj;
- else
- {
- org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate ();
- org.apache.tuscany.sca.binding.corba.testing.arrays_unions._ArraysUnionsTestsStub stub = new org.apache.tuscany.sca.binding.corba.testing.arrays_unions._ArraysUnionsTestsStub ();
- stub._set_delegate(delegate);
- return stub;
- }
- }
-
-}
+/*
+ * 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.binding.corba.testing.arrays_unions;
+
+
+/**
+* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTestsHelper.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from arrays_unions.idl
+* niedziela, 17 sierpień 2008 15:45:39 CEST
+*/
+
+abstract public class ArraysUnionsTestsHelper
+{
+ private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTests:1.0";
+
+ public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.binding.corba.testing.arrays_unions.ArraysUnionsTests 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.binding.corba.testing.arrays_unions.ArraysUnionsTests 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.binding.corba.testing.arrays_unions.ArraysUnionsTestsHelper.id (), "ArraysUnionsTests");
+ }
+ return __typeCode;
+ }
+
+ public static String id ()
+ {
+ return _id;
+ }
+
+ public static org.apache.tuscany.sca.binding.corba.testing.arrays_unions.ArraysUnionsTests read (org.omg.CORBA.portable.InputStream istream)
+ {
+ return narrow (istream.read_Object (_ArraysUnionsTestsStub.class));
+ }
+
+ public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.binding.corba.testing.arrays_unions.ArraysUnionsTests value)
+ {
+ ostream.write_Object ((org.omg.CORBA.Object) value);
+ }
+
+ public static org.apache.tuscany.sca.binding.corba.testing.arrays_unions.ArraysUnionsTests narrow (org.omg.CORBA.Object obj)
+ {
+ if (obj == null)
+ return null;
+ else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.arrays_unions.ArraysUnionsTests)
+ return (org.apache.tuscany.sca.binding.corba.testing.arrays_unions.ArraysUnionsTests)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.binding.corba.testing.arrays_unions._ArraysUnionsTestsStub stub = new org.apache.tuscany.sca.binding.corba.testing.arrays_unions._ArraysUnionsTestsStub ();
+ stub._set_delegate(delegate);
+ return stub;
+ }
+ }
+
+ public static org.apache.tuscany.sca.binding.corba.testing.arrays_unions.ArraysUnionsTests unchecked_narrow (org.omg.CORBA.Object obj)
+ {
+ if (obj == null)
+ return null;
+ else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.arrays_unions.ArraysUnionsTests)
+ return (org.apache.tuscany.sca.binding.corba.testing.arrays_unions.ArraysUnionsTests)obj;
+ else
+ {
+ org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate ();
+ org.apache.tuscany.sca.binding.corba.testing.arrays_unions._ArraysUnionsTestsStub stub = new org.apache.tuscany.sca.binding.corba.testing.arrays_unions._ArraysUnionsTestsStub ();
+ stub._set_delegate(delegate);
+ return stub;
+ }
+ }
+
+}
diff --git a/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTestsHolder.java b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTestsHolder.java
index 98987c1252..f1b84e492b 100644
--- a/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTestsHolder.java
+++ b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTestsHolder.java
@@ -1,38 +1,56 @@
-package org.apache.tuscany.sca.binding.corba.testing.arrays_unions;
-
-/**
-* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTestsHolder.java .
-* Generated by the IDL-to-Java compiler (portable), version "3.2"
-* from arrays_unions.idl
-* niedziela, 17 sierpień 2008 15:45:39 CEST
-*/
-
-public final class ArraysUnionsTestsHolder implements org.omg.CORBA.portable.Streamable
-{
- public org.apache.tuscany.sca.binding.corba.testing.arrays_unions.ArraysUnionsTests value = null;
-
- public ArraysUnionsTestsHolder ()
- {
- }
-
- public ArraysUnionsTestsHolder (org.apache.tuscany.sca.binding.corba.testing.arrays_unions.ArraysUnionsTests initialValue)
- {
- value = initialValue;
- }
-
- public void _read (org.omg.CORBA.portable.InputStream i)
- {
- value = org.apache.tuscany.sca.binding.corba.testing.arrays_unions.ArraysUnionsTestsHelper.read (i);
- }
-
- public void _write (org.omg.CORBA.portable.OutputStream o)
- {
- org.apache.tuscany.sca.binding.corba.testing.arrays_unions.ArraysUnionsTestsHelper.write (o, value);
- }
-
- public org.omg.CORBA.TypeCode _type ()
- {
- return org.apache.tuscany.sca.binding.corba.testing.arrays_unions.ArraysUnionsTestsHelper.type ();
- }
-
-}
+/*
+ * 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.binding.corba.testing.arrays_unions;
+
+/**
+* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTestsHolder.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from arrays_unions.idl
+* niedziela, 17 sierpień 2008 15:45:39 CEST
+*/
+
+public final class ArraysUnionsTestsHolder implements org.omg.CORBA.portable.Streamable
+{
+ public org.apache.tuscany.sca.binding.corba.testing.arrays_unions.ArraysUnionsTests value = null;
+
+ public ArraysUnionsTestsHolder ()
+ {
+ }
+
+ public ArraysUnionsTestsHolder (org.apache.tuscany.sca.binding.corba.testing.arrays_unions.ArraysUnionsTests initialValue)
+ {
+ value = initialValue;
+ }
+
+ public void _read (org.omg.CORBA.portable.InputStream i)
+ {
+ value = org.apache.tuscany.sca.binding.corba.testing.arrays_unions.ArraysUnionsTestsHelper.read (i);
+ }
+
+ public void _write (org.omg.CORBA.portable.OutputStream o)
+ {
+ org.apache.tuscany.sca.binding.corba.testing.arrays_unions.ArraysUnionsTestsHelper.write (o, value);
+ }
+
+ public org.omg.CORBA.TypeCode _type ()
+ {
+ return org.apache.tuscany.sca.binding.corba.testing.arrays_unions.ArraysUnionsTestsHelper.type ();
+ }
+
+}
diff --git a/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTestsOperations.java b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTestsOperations.java
index d80adb476a..13b2c6afb6 100644
--- a/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTestsOperations.java
+++ b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTestsOperations.java
@@ -1,16 +1,34 @@
-package org.apache.tuscany.sca.binding.corba.testing.arrays_unions;
-
-
-/**
-* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTestsOperations.java .
-* Generated by the IDL-to-Java compiler (portable), version "3.2"
-* from arrays_unions.idl
-* niedziela, 17 sierpień 2008 15:45:39 CEST
-*/
-
-public interface ArraysUnionsTestsOperations
-{
- org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStruct passTestStruct (org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStruct arg);
- String[][] passStringArray (String[][] arg);
- org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnion passRichUnion (org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnion arg);
-} // interface ArraysUnionsTestsOperations
+/*
+ * 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.binding.corba.testing.arrays_unions;
+
+
+/**
+* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTestsOperations.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from arrays_unions.idl
+* niedziela, 17 sierpień 2008 15:45:39 CEST
+*/
+
+public interface ArraysUnionsTestsOperations
+{
+ org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStruct passTestStruct (org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStruct arg);
+ String[][] passStringArray (String[][] arg);
+ org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnion passRichUnion (org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnion arg);
+} // interface ArraysUnionsTestsOperations
diff --git a/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/InnerUnion.java b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/InnerUnion.java
index 9f520f3c5d..0128f70126 100644
--- a/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/InnerUnion.java
+++ b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/InnerUnion.java
@@ -1,112 +1,130 @@
-package org.apache.tuscany.sca.binding.corba.testing.arrays_unions;
-
-
-/**
-* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/InnerUnion.java .
-* Generated by the IDL-to-Java compiler (portable), version "3.2"
-* from arrays_unions.idl
-* niedziela, 17 sierpień 2008 15:45:39 CEST
-*/
-
-public final class InnerUnion implements org.omg.CORBA.portable.IDLEntity
-{
- private int ___x;
- private float ___y;
- private int __discriminator;
- private boolean __uninitialized = true;
-
- public InnerUnion ()
- {
- }
-
- public int discriminator ()
- {
- if (__uninitialized)
- throw new org.omg.CORBA.BAD_OPERATION ();
- return __discriminator;
- }
-
- public int x ()
- {
- if (__uninitialized)
- throw new org.omg.CORBA.BAD_OPERATION ();
- verifyx (__discriminator);
- return ___x;
- }
-
- public void x (int value)
- {
- __discriminator = 1;
- ___x = value;
- __uninitialized = false;
- }
-
- public void x (int discriminator, int value)
- {
- verifyx (discriminator);
- __discriminator = discriminator;
- ___x = value;
- __uninitialized = false;
- }
-
- private void verifyx (int discriminator)
- {
- if (discriminator != 1)
- throw new org.omg.CORBA.BAD_OPERATION ();
- }
-
- public float y ()
- {
- if (__uninitialized)
- throw new org.omg.CORBA.BAD_OPERATION ();
- verifyy (__discriminator);
- return ___y;
- }
-
- public void y (float value)
- {
- __discriminator = 2;
- ___y = value;
- __uninitialized = false;
- }
-
- public void y (int discriminator, float value)
- {
- verifyy (discriminator);
- __discriminator = discriminator;
- ___y = value;
- __uninitialized = false;
- }
-
- private void verifyy (int discriminator)
- {
- if (discriminator != 2)
- throw new org.omg.CORBA.BAD_OPERATION ();
- }
-
- public void _default ()
- {
- __discriminator = -2147483648;
- __uninitialized = false;
- }
-
- public void _default (int discriminator)
- {
- verifyDefault( discriminator ) ;
- __discriminator = discriminator ;
- __uninitialized = false;
- }
-
- private void verifyDefault( int value )
- {
- switch (value) {
- case 1:
- case 2:
- throw new org.omg.CORBA.BAD_OPERATION() ;
-
- default:
- return;
- }
- }
-
-} // class InnerUnion
+/*
+ * 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.binding.corba.testing.arrays_unions;
+
+
+/**
+* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/InnerUnion.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from arrays_unions.idl
+* niedziela, 17 sierpień 2008 15:45:39 CEST
+*/
+
+public final class InnerUnion implements org.omg.CORBA.portable.IDLEntity
+{
+ private int ___x;
+ private float ___y;
+ private int __discriminator;
+ private boolean __uninitialized = true;
+
+ public InnerUnion ()
+ {
+ }
+
+ public int discriminator ()
+ {
+ if (__uninitialized)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ return __discriminator;
+ }
+
+ public int x ()
+ {
+ if (__uninitialized)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ verifyx (__discriminator);
+ return ___x;
+ }
+
+ public void x (int value)
+ {
+ __discriminator = 1;
+ ___x = value;
+ __uninitialized = false;
+ }
+
+ public void x (int discriminator, int value)
+ {
+ verifyx (discriminator);
+ __discriminator = discriminator;
+ ___x = value;
+ __uninitialized = false;
+ }
+
+ private void verifyx (int discriminator)
+ {
+ if (discriminator != 1)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ }
+
+ public float y ()
+ {
+ if (__uninitialized)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ verifyy (__discriminator);
+ return ___y;
+ }
+
+ public void y (float value)
+ {
+ __discriminator = 2;
+ ___y = value;
+ __uninitialized = false;
+ }
+
+ public void y (int discriminator, float value)
+ {
+ verifyy (discriminator);
+ __discriminator = discriminator;
+ ___y = value;
+ __uninitialized = false;
+ }
+
+ private void verifyy (int discriminator)
+ {
+ if (discriminator != 2)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ }
+
+ public void _default ()
+ {
+ __discriminator = -2147483648;
+ __uninitialized = false;
+ }
+
+ public void _default (int discriminator)
+ {
+ verifyDefault( discriminator ) ;
+ __discriminator = discriminator ;
+ __uninitialized = false;
+ }
+
+ private void verifyDefault( int value )
+ {
+ switch (value) {
+ case 1:
+ case 2:
+ throw new org.omg.CORBA.BAD_OPERATION() ;
+
+ default:
+ return;
+ }
+ }
+
+} // class InnerUnion
diff --git a/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/InnerUnionHelper.java b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/InnerUnionHelper.java
index 11c22f1d72..9492ab19f7 100644
--- a/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/InnerUnionHelper.java
+++ b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/InnerUnionHelper.java
@@ -1,106 +1,124 @@
-package org.apache.tuscany.sca.binding.corba.testing.arrays_unions;
-
-
-/**
-* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/InnerUnionHelper.java .
-* Generated by the IDL-to-Java compiler (portable), version "3.2"
-* from arrays_unions.idl
-* niedziela, 17 sierpień 2008 15:45:39 CEST
-*/
-
-abstract public class InnerUnionHelper
-{
- private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/arrays_unions/InnerUnion/InnerUnion:1.0";
-
- public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnion 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.binding.corba.testing.arrays_unions.InnerUnion 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)
- {
- org.omg.CORBA.TypeCode _disTypeCode0;
- _disTypeCode0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
- org.omg.CORBA.UnionMember[] _members0 = new org.omg.CORBA.UnionMember [2];
- org.omg.CORBA.TypeCode _tcOf_members0;
- org.omg.CORBA.Any _anyOf_members0;
-
- // Branch for x (case label 1)
- _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
- _anyOf_members0.insert_long ((int)1);
- _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
- _members0[0] = new org.omg.CORBA.UnionMember (
- "x",
- _anyOf_members0,
- _tcOf_members0,
- null);
-
- // Branch for y (case label 2)
- _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
- _anyOf_members0.insert_long ((int)2);
- _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_float);
- _members0[1] = new org.omg.CORBA.UnionMember (
- "y",
- _anyOf_members0,
- _tcOf_members0,
- null);
- __typeCode = org.omg.CORBA.ORB.init ().create_union_tc (org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnionHelper.id (), "InnerUnion", _disTypeCode0, _members0);
- }
- return __typeCode;
- }
-
- public static String id ()
- {
- return _id;
- }
-
- public static org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnion read (org.omg.CORBA.portable.InputStream istream)
- {
- org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnion value = new org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnion ();
- int _dis0 = (int)0;
- _dis0 = istream.read_long ();
- switch (_dis0)
- {
- case 1:
- int _x = (int)0;
- _x = istream.read_long ();
- value.x (_x);
- break;
- case 2:
- float _y = (float)0;
- _y = istream.read_float ();
- value.y (_y);
- break;
- default:
- value._default( _dis0 ) ;
- break;
- }
- return value;
- }
-
- public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnion value)
- {
- ostream.write_long (value.discriminator ());
- switch (value.discriminator ())
- {
- case 1:
- ostream.write_long (value.x ());
- break;
- case 2:
- ostream.write_float (value.y ());
- break;
- }
- }
-
-}
+/*
+ * 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.binding.corba.testing.arrays_unions;
+
+
+/**
+* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/InnerUnionHelper.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from arrays_unions.idl
+* niedziela, 17 sierpień 2008 15:45:39 CEST
+*/
+
+abstract public class InnerUnionHelper
+{
+ private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/arrays_unions/InnerUnion/InnerUnion:1.0";
+
+ public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnion 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.binding.corba.testing.arrays_unions.InnerUnion 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)
+ {
+ org.omg.CORBA.TypeCode _disTypeCode0;
+ _disTypeCode0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
+ org.omg.CORBA.UnionMember[] _members0 = new org.omg.CORBA.UnionMember [2];
+ org.omg.CORBA.TypeCode _tcOf_members0;
+ org.omg.CORBA.Any _anyOf_members0;
+
+ // Branch for x (case label 1)
+ _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
+ _anyOf_members0.insert_long ((int)1);
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
+ _members0[0] = new org.omg.CORBA.UnionMember (
+ "x",
+ _anyOf_members0,
+ _tcOf_members0,
+ null);
+
+ // Branch for y (case label 2)
+ _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
+ _anyOf_members0.insert_long ((int)2);
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_float);
+ _members0[1] = new org.omg.CORBA.UnionMember (
+ "y",
+ _anyOf_members0,
+ _tcOf_members0,
+ null);
+ __typeCode = org.omg.CORBA.ORB.init ().create_union_tc (org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnionHelper.id (), "InnerUnion", _disTypeCode0, _members0);
+ }
+ return __typeCode;
+ }
+
+ public static String id ()
+ {
+ return _id;
+ }
+
+ public static org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnion read (org.omg.CORBA.portable.InputStream istream)
+ {
+ org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnion value = new org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnion ();
+ int _dis0 = (int)0;
+ _dis0 = istream.read_long ();
+ switch (_dis0)
+ {
+ case 1:
+ int _x = (int)0;
+ _x = istream.read_long ();
+ value.x (_x);
+ break;
+ case 2:
+ float _y = (float)0;
+ _y = istream.read_float ();
+ value.y (_y);
+ break;
+ default:
+ value._default( _dis0 ) ;
+ break;
+ }
+ return value;
+ }
+
+ public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnion value)
+ {
+ ostream.write_long (value.discriminator ());
+ switch (value.discriminator ())
+ {
+ case 1:
+ ostream.write_long (value.x ());
+ break;
+ case 2:
+ ostream.write_float (value.y ());
+ break;
+ }
+ }
+
+}
diff --git a/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/InnerUnionHolder.java b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/InnerUnionHolder.java
index ca9233c77f..2712ac38f1 100644
--- a/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/InnerUnionHolder.java
+++ b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/InnerUnionHolder.java
@@ -1,38 +1,56 @@
-package org.apache.tuscany.sca.binding.corba.testing.arrays_unions;
-
-/**
-* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/InnerUnionHolder.java .
-* Generated by the IDL-to-Java compiler (portable), version "3.2"
-* from arrays_unions.idl
-* niedziela, 17 sierpień 2008 15:45:39 CEST
-*/
-
-public final class InnerUnionHolder implements org.omg.CORBA.portable.Streamable
-{
- public org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnion value = null;
-
- public InnerUnionHolder ()
- {
- }
-
- public InnerUnionHolder (org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnion initialValue)
- {
- value = initialValue;
- }
-
- public void _read (org.omg.CORBA.portable.InputStream i)
- {
- value = org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnionHelper.read (i);
- }
-
- public void _write (org.omg.CORBA.portable.OutputStream o)
- {
- org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnionHelper.write (o, value);
- }
-
- public org.omg.CORBA.TypeCode _type ()
- {
- return org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnionHelper.type ();
- }
-
-}
+/*
+ * 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.binding.corba.testing.arrays_unions;
+
+/**
+* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/InnerUnionHolder.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from arrays_unions.idl
+* niedziela, 17 sierpień 2008 15:45:39 CEST
+*/
+
+public final class InnerUnionHolder implements org.omg.CORBA.portable.Streamable
+{
+ public org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnion value = null;
+
+ public InnerUnionHolder ()
+ {
+ }
+
+ public InnerUnionHolder (org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnion initialValue)
+ {
+ value = initialValue;
+ }
+
+ public void _read (org.omg.CORBA.portable.InputStream i)
+ {
+ value = org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnionHelper.read (i);
+ }
+
+ public void _write (org.omg.CORBA.portable.OutputStream o)
+ {
+ org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnionHelper.write (o, value);
+ }
+
+ public org.omg.CORBA.TypeCode _type ()
+ {
+ return org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnionHelper.type ();
+ }
+
+}
diff --git a/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/RichUnion.java b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/RichUnion.java
index 1a1a36fd16..9d9e4ff494 100644
--- a/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/RichUnion.java
+++ b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/RichUnion.java
@@ -1,177 +1,195 @@
-package org.apache.tuscany.sca.binding.corba.testing.arrays_unions;
-
-
-/**
-* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/RichUnion.java .
-* Generated by the IDL-to-Java compiler (portable), version "3.2"
-* from arrays_unions.idl
-* niedziela, 17 sierpień 2008 15:45:39 CEST
-*/
-
-public final class RichUnion implements org.omg.CORBA.portable.IDLEntity
-{
- private int ___x;
- private float ___y;
- private String ___z;
- private org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnion ___iu;
- private boolean ___a;
- private int __discriminator;
- private boolean __uninitialized = true;
-
- public RichUnion ()
- {
- }
-
- public int discriminator ()
- {
- if (__uninitialized)
- throw new org.omg.CORBA.BAD_OPERATION ();
- return __discriminator;
- }
-
- public int x ()
- {
- if (__uninitialized)
- throw new org.omg.CORBA.BAD_OPERATION ();
- verifyx (__discriminator);
- return ___x;
- }
-
- public void x (int value)
- {
- __discriminator = 1;
- ___x = value;
- __uninitialized = false;
- }
-
- public void x (int discriminator, int value)
- {
- verifyx (discriminator);
- __discriminator = discriminator;
- ___x = value;
- __uninitialized = false;
- }
-
- private void verifyx (int discriminator)
- {
- if (discriminator != 1)
- throw new org.omg.CORBA.BAD_OPERATION ();
- }
-
- public float y ()
- {
- if (__uninitialized)
- throw new org.omg.CORBA.BAD_OPERATION ();
- verifyy (__discriminator);
- return ___y;
- }
-
- public void y (float value)
- {
- __discriminator = 2;
- ___y = value;
- __uninitialized = false;
- }
-
- public void y (int discriminator, float value)
- {
- verifyy (discriminator);
- __discriminator = discriminator;
- ___y = value;
- __uninitialized = false;
- }
-
- private void verifyy (int discriminator)
- {
- if (discriminator != 2)
- throw new org.omg.CORBA.BAD_OPERATION ();
- }
-
- public String z ()
- {
- if (__uninitialized)
- throw new org.omg.CORBA.BAD_OPERATION ();
- verifyz (__discriminator);
- return ___z;
- }
-
- public void z (String value)
- {
- __discriminator = 3;
- ___z = value;
- __uninitialized = false;
- }
-
- public void z (int discriminator, String value)
- {
- verifyz (discriminator);
- __discriminator = discriminator;
- ___z = value;
- __uninitialized = false;
- }
-
- private void verifyz (int discriminator)
- {
- if (discriminator != 3)
- throw new org.omg.CORBA.BAD_OPERATION ();
- }
-
- public org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnion iu ()
- {
- if (__uninitialized)
- throw new org.omg.CORBA.BAD_OPERATION ();
- verifyiu (__discriminator);
- return ___iu;
- }
-
- public void iu (org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnion value)
- {
- __discriminator = 4;
- ___iu = value;
- __uninitialized = false;
- }
-
- public void iu (int discriminator, org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnion value)
- {
- verifyiu (discriminator);
- __discriminator = discriminator;
- ___iu = value;
- __uninitialized = false;
- }
-
- private void verifyiu (int discriminator)
- {
- if (discriminator != 4)
- throw new org.omg.CORBA.BAD_OPERATION ();
- }
-
- public boolean a ()
- {
- if (__uninitialized)
- throw new org.omg.CORBA.BAD_OPERATION ();
- verifya (__discriminator);
- return ___a;
- }
-
- public void a (boolean value)
- {
- __discriminator = -2147483648;
- ___a = value;
- __uninitialized = false;
- }
-
- public void a (int discriminator, boolean value)
- {
- verifya (discriminator);
- __discriminator = discriminator;
- ___a = value;
- __uninitialized = false;
- }
-
- private void verifya (int discriminator)
- {
- if (discriminator == 1 || discriminator == 2 || discriminator == 3 || discriminator == 4)
- throw new org.omg.CORBA.BAD_OPERATION ();
- }
-
-} // class RichUnion
+/*
+ * 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.binding.corba.testing.arrays_unions;
+
+
+/**
+* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/RichUnion.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from arrays_unions.idl
+* niedziela, 17 sierpień 2008 15:45:39 CEST
+*/
+
+public final class RichUnion implements org.omg.CORBA.portable.IDLEntity
+{
+ private int ___x;
+ private float ___y;
+ private String ___z;
+ private org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnion ___iu;
+ private boolean ___a;
+ private int __discriminator;
+ private boolean __uninitialized = true;
+
+ public RichUnion ()
+ {
+ }
+
+ public int discriminator ()
+ {
+ if (__uninitialized)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ return __discriminator;
+ }
+
+ public int x ()
+ {
+ if (__uninitialized)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ verifyx (__discriminator);
+ return ___x;
+ }
+
+ public void x (int value)
+ {
+ __discriminator = 1;
+ ___x = value;
+ __uninitialized = false;
+ }
+
+ public void x (int discriminator, int value)
+ {
+ verifyx (discriminator);
+ __discriminator = discriminator;
+ ___x = value;
+ __uninitialized = false;
+ }
+
+ private void verifyx (int discriminator)
+ {
+ if (discriminator != 1)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ }
+
+ public float y ()
+ {
+ if (__uninitialized)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ verifyy (__discriminator);
+ return ___y;
+ }
+
+ public void y (float value)
+ {
+ __discriminator = 2;
+ ___y = value;
+ __uninitialized = false;
+ }
+
+ public void y (int discriminator, float value)
+ {
+ verifyy (discriminator);
+ __discriminator = discriminator;
+ ___y = value;
+ __uninitialized = false;
+ }
+
+ private void verifyy (int discriminator)
+ {
+ if (discriminator != 2)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ }
+
+ public String z ()
+ {
+ if (__uninitialized)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ verifyz (__discriminator);
+ return ___z;
+ }
+
+ public void z (String value)
+ {
+ __discriminator = 3;
+ ___z = value;
+ __uninitialized = false;
+ }
+
+ public void z (int discriminator, String value)
+ {
+ verifyz (discriminator);
+ __discriminator = discriminator;
+ ___z = value;
+ __uninitialized = false;
+ }
+
+ private void verifyz (int discriminator)
+ {
+ if (discriminator != 3)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ }
+
+ public org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnion iu ()
+ {
+ if (__uninitialized)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ verifyiu (__discriminator);
+ return ___iu;
+ }
+
+ public void iu (org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnion value)
+ {
+ __discriminator = 4;
+ ___iu = value;
+ __uninitialized = false;
+ }
+
+ public void iu (int discriminator, org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnion value)
+ {
+ verifyiu (discriminator);
+ __discriminator = discriminator;
+ ___iu = value;
+ __uninitialized = false;
+ }
+
+ private void verifyiu (int discriminator)
+ {
+ if (discriminator != 4)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ }
+
+ public boolean a ()
+ {
+ if (__uninitialized)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ verifya (__discriminator);
+ return ___a;
+ }
+
+ public void a (boolean value)
+ {
+ __discriminator = -2147483648;
+ ___a = value;
+ __uninitialized = false;
+ }
+
+ public void a (int discriminator, boolean value)
+ {
+ verifya (discriminator);
+ __discriminator = discriminator;
+ ___a = value;
+ __uninitialized = false;
+ }
+
+ private void verifya (int discriminator)
+ {
+ if (discriminator == 1 || discriminator == 2 || discriminator == 3 || discriminator == 4)
+ throw new org.omg.CORBA.BAD_OPERATION ();
+ }
+
+} // class RichUnion
diff --git a/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/RichUnionHelper.java b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/RichUnionHelper.java
index 7cef0ea189..0b185c78eb 100644
--- a/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/RichUnionHelper.java
+++ b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/RichUnionHelper.java
@@ -1,157 +1,175 @@
-package org.apache.tuscany.sca.binding.corba.testing.arrays_unions;
-
-
-/**
-* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/RichUnionHelper.java .
-* Generated by the IDL-to-Java compiler (portable), version "3.2"
-* from arrays_unions.idl
-* niedziela, 17 sierpień 2008 15:45:39 CEST
-*/
-
-abstract public class RichUnionHelper
-{
- private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/arrays_unions/RichUnion/RichUnion:1.0";
-
- public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnion 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.binding.corba.testing.arrays_unions.RichUnion 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)
- {
- org.omg.CORBA.TypeCode _disTypeCode0;
- _disTypeCode0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
- org.omg.CORBA.UnionMember[] _members0 = new org.omg.CORBA.UnionMember [5];
- org.omg.CORBA.TypeCode _tcOf_members0;
- org.omg.CORBA.Any _anyOf_members0;
-
- // Branch for x (case label 1)
- _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
- _anyOf_members0.insert_long ((int)1);
- _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
- _members0[0] = new org.omg.CORBA.UnionMember (
- "x",
- _anyOf_members0,
- _tcOf_members0,
- null);
-
- // Branch for y (case label 2)
- _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
- _anyOf_members0.insert_long ((int)2);
- _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_float);
- _members0[1] = new org.omg.CORBA.UnionMember (
- "y",
- _anyOf_members0,
- _tcOf_members0,
- null);
-
- // Branch for z (case label 3)
- _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
- _anyOf_members0.insert_long ((int)3);
- _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
- _members0[2] = new org.omg.CORBA.UnionMember (
- "z",
- _anyOf_members0,
- _tcOf_members0,
- null);
-
- // Branch for iu (case label 4)
- _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
- _anyOf_members0.insert_long ((int)4);
- _tcOf_members0 = org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnionHelper.type ();
- _members0[3] = new org.omg.CORBA.UnionMember (
- "iu",
- _anyOf_members0,
- _tcOf_members0,
- null);
-
- // Branch for a (Default case)
- _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
- _anyOf_members0.insert_octet ((byte)0); // default member label
- _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_boolean);
- _members0[4] = new org.omg.CORBA.UnionMember (
- "a",
- _anyOf_members0,
- _tcOf_members0,
- null);
- __typeCode = org.omg.CORBA.ORB.init ().create_union_tc (org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnionHelper.id (), "RichUnion", _disTypeCode0, _members0);
- }
- return __typeCode;
- }
-
- public static String id ()
- {
- return _id;
- }
-
- public static org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnion read (org.omg.CORBA.portable.InputStream istream)
- {
- org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnion value = new org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnion ();
- int _dis0 = (int)0;
- _dis0 = istream.read_long ();
- switch (_dis0)
- {
- case 1:
- int _x = (int)0;
- _x = istream.read_long ();
- value.x (_x);
- break;
- case 2:
- float _y = (float)0;
- _y = istream.read_float ();
- value.y (_y);
- break;
- case 3:
- String _z = null;
- _z = istream.read_string ();
- value.z (_z);
- break;
- case 4:
- org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnion _iu = null;
- _iu = org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnionHelper.read (istream);
- value.iu (_iu);
- break;
- default:
- boolean _a = false;
- _a = istream.read_boolean ();
- value.a (_dis0, _a);
- break;
- }
- return value;
- }
-
- public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnion value)
- {
- ostream.write_long (value.discriminator ());
- switch (value.discriminator ())
- {
- case 1:
- ostream.write_long (value.x ());
- break;
- case 2:
- ostream.write_float (value.y ());
- break;
- case 3:
- ostream.write_string (value.z ());
- break;
- case 4:
- org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnionHelper.write (ostream, value.iu ());
- break;
- default:
- ostream.write_boolean (value.a ());
- break;
- }
- }
-
-}
+/*
+ * 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.binding.corba.testing.arrays_unions;
+
+
+/**
+* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/RichUnionHelper.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from arrays_unions.idl
+* niedziela, 17 sierpień 2008 15:45:39 CEST
+*/
+
+abstract public class RichUnionHelper
+{
+ private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/arrays_unions/RichUnion/RichUnion:1.0";
+
+ public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnion 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.binding.corba.testing.arrays_unions.RichUnion 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)
+ {
+ org.omg.CORBA.TypeCode _disTypeCode0;
+ _disTypeCode0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
+ org.omg.CORBA.UnionMember[] _members0 = new org.omg.CORBA.UnionMember [5];
+ org.omg.CORBA.TypeCode _tcOf_members0;
+ org.omg.CORBA.Any _anyOf_members0;
+
+ // Branch for x (case label 1)
+ _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
+ _anyOf_members0.insert_long ((int)1);
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
+ _members0[0] = new org.omg.CORBA.UnionMember (
+ "x",
+ _anyOf_members0,
+ _tcOf_members0,
+ null);
+
+ // Branch for y (case label 2)
+ _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
+ _anyOf_members0.insert_long ((int)2);
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_float);
+ _members0[1] = new org.omg.CORBA.UnionMember (
+ "y",
+ _anyOf_members0,
+ _tcOf_members0,
+ null);
+
+ // Branch for z (case label 3)
+ _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
+ _anyOf_members0.insert_long ((int)3);
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
+ _members0[2] = new org.omg.CORBA.UnionMember (
+ "z",
+ _anyOf_members0,
+ _tcOf_members0,
+ null);
+
+ // Branch for iu (case label 4)
+ _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
+ _anyOf_members0.insert_long ((int)4);
+ _tcOf_members0 = org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnionHelper.type ();
+ _members0[3] = new org.omg.CORBA.UnionMember (
+ "iu",
+ _anyOf_members0,
+ _tcOf_members0,
+ null);
+
+ // Branch for a (Default case)
+ _anyOf_members0 = org.omg.CORBA.ORB.init ().create_any ();
+ _anyOf_members0.insert_octet ((byte)0); // default member label
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_boolean);
+ _members0[4] = new org.omg.CORBA.UnionMember (
+ "a",
+ _anyOf_members0,
+ _tcOf_members0,
+ null);
+ __typeCode = org.omg.CORBA.ORB.init ().create_union_tc (org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnionHelper.id (), "RichUnion", _disTypeCode0, _members0);
+ }
+ return __typeCode;
+ }
+
+ public static String id ()
+ {
+ return _id;
+ }
+
+ public static org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnion read (org.omg.CORBA.portable.InputStream istream)
+ {
+ org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnion value = new org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnion ();
+ int _dis0 = (int)0;
+ _dis0 = istream.read_long ();
+ switch (_dis0)
+ {
+ case 1:
+ int _x = (int)0;
+ _x = istream.read_long ();
+ value.x (_x);
+ break;
+ case 2:
+ float _y = (float)0;
+ _y = istream.read_float ();
+ value.y (_y);
+ break;
+ case 3:
+ String _z = null;
+ _z = istream.read_string ();
+ value.z (_z);
+ break;
+ case 4:
+ org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnion _iu = null;
+ _iu = org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnionHelper.read (istream);
+ value.iu (_iu);
+ break;
+ default:
+ boolean _a = false;
+ _a = istream.read_boolean ();
+ value.a (_dis0, _a);
+ break;
+ }
+ return value;
+ }
+
+ public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnion value)
+ {
+ ostream.write_long (value.discriminator ());
+ switch (value.discriminator ())
+ {
+ case 1:
+ ostream.write_long (value.x ());
+ break;
+ case 2:
+ ostream.write_float (value.y ());
+ break;
+ case 3:
+ ostream.write_string (value.z ());
+ break;
+ case 4:
+ org.apache.tuscany.sca.binding.corba.testing.arrays_unions.InnerUnionHelper.write (ostream, value.iu ());
+ break;
+ default:
+ ostream.write_boolean (value.a ());
+ break;
+ }
+ }
+
+}
diff --git a/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/RichUnionHolder.java b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/RichUnionHolder.java
index 5498104905..5d1df4f68f 100644
--- a/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/RichUnionHolder.java
+++ b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/RichUnionHolder.java
@@ -1,38 +1,56 @@
-package org.apache.tuscany.sca.binding.corba.testing.arrays_unions;
-
-/**
-* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/RichUnionHolder.java .
-* Generated by the IDL-to-Java compiler (portable), version "3.2"
-* from arrays_unions.idl
-* niedziela, 17 sierpień 2008 15:45:39 CEST
-*/
-
-public final class RichUnionHolder implements org.omg.CORBA.portable.Streamable
-{
- public org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnion value = null;
-
- public RichUnionHolder ()
- {
- }
-
- public RichUnionHolder (org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnion initialValue)
- {
- value = initialValue;
- }
-
- public void _read (org.omg.CORBA.portable.InputStream i)
- {
- value = org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnionHelper.read (i);
- }
-
- public void _write (org.omg.CORBA.portable.OutputStream o)
- {
- org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnionHelper.write (o, value);
- }
-
- public org.omg.CORBA.TypeCode _type ()
- {
- return org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnionHelper.type ();
- }
-
-}
+/*
+ * 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.binding.corba.testing.arrays_unions;
+
+/**
+* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/RichUnionHolder.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from arrays_unions.idl
+* niedziela, 17 sierpień 2008 15:45:39 CEST
+*/
+
+public final class RichUnionHolder implements org.omg.CORBA.portable.Streamable
+{
+ public org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnion value = null;
+
+ public RichUnionHolder ()
+ {
+ }
+
+ public RichUnionHolder (org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnion initialValue)
+ {
+ value = initialValue;
+ }
+
+ public void _read (org.omg.CORBA.portable.InputStream i)
+ {
+ value = org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnionHelper.read (i);
+ }
+
+ public void _write (org.omg.CORBA.portable.OutputStream o)
+ {
+ org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnionHelper.write (o, value);
+ }
+
+ public org.omg.CORBA.TypeCode _type ()
+ {
+ return org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnionHelper.type ();
+ }
+
+}
diff --git a/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/StringArrayHelper.java b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/StringArrayHelper.java
index 72beff0537..c97fcbcc97 100644
--- a/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/StringArrayHelper.java
+++ b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/StringArrayHelper.java
@@ -1,76 +1,94 @@
-package org.apache.tuscany.sca.binding.corba.testing.arrays_unions;
-
-
-/**
-* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/StringArrayHelper.java .
-* Generated by the IDL-to-Java compiler (portable), version "3.2"
-* from arrays_unions.idl
-* niedziela, 17 sierpień 2008 15:45:39 CEST
-*/
-
-abstract public class StringArrayHelper
-{
- private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/arrays_unions/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.binding.corba.testing.arrays_unions.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]);
- }
- }
- }
-
-}
+/*
+ * 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.binding.corba.testing.arrays_unions;
+
+
+/**
+* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/StringArrayHelper.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from arrays_unions.idl
+* niedziela, 17 sierpień 2008 15:45:39 CEST
+*/
+
+abstract public class StringArrayHelper
+{
+ private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/arrays_unions/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.binding.corba.testing.arrays_unions.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/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/StringArrayHolder.java b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/StringArrayHolder.java
index 747337597c..a456843599 100644
--- a/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/StringArrayHolder.java
+++ b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/StringArrayHolder.java
@@ -1,39 +1,57 @@
-package org.apache.tuscany.sca.binding.corba.testing.arrays_unions;
-
-
-/**
-* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/StringArrayHolder.java .
-* Generated by the IDL-to-Java compiler (portable), version "3.2"
-* from arrays_unions.idl
-* niedziela, 17 sierpień 2008 15:45:39 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.binding.corba.testing.arrays_unions.StringArrayHelper.read (i);
- }
-
- public void _write (org.omg.CORBA.portable.OutputStream o)
- {
- org.apache.tuscany.sca.binding.corba.testing.arrays_unions.StringArrayHelper.write (o, value);
- }
-
- public org.omg.CORBA.TypeCode _type ()
- {
- return org.apache.tuscany.sca.binding.corba.testing.arrays_unions.StringArrayHelper.type ();
- }
-
-}
+/*
+ * 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.binding.corba.testing.arrays_unions;
+
+
+/**
+* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/StringArrayHolder.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from arrays_unions.idl
+* niedziela, 17 sierpień 2008 15:45:39 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.binding.corba.testing.arrays_unions.StringArrayHelper.read (i);
+ }
+
+ public void _write (org.omg.CORBA.portable.OutputStream o)
+ {
+ org.apache.tuscany.sca.binding.corba.testing.arrays_unions.StringArrayHelper.write (o, value);
+ }
+
+ public org.omg.CORBA.TypeCode _type ()
+ {
+ return org.apache.tuscany.sca.binding.corba.testing.arrays_unions.StringArrayHelper.type ();
+ }
+
+}
diff --git a/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/TestStruct.java b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/TestStruct.java
index 2b239deadc..4021b1f17d 100644
--- a/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/TestStruct.java
+++ b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/TestStruct.java
@@ -1,28 +1,46 @@
-package org.apache.tuscany.sca.binding.corba.testing.arrays_unions;
-
-
-/**
-* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/TestStruct.java .
-* Generated by the IDL-to-Java compiler (portable), version "3.2"
-* from arrays_unions.idl
-* niedziela, 17 sierpień 2008 15:45:39 CEST
-*/
-
-public final class TestStruct implements org.omg.CORBA.portable.IDLEntity
-{
- public String oneDimArray[] = null;
- public int twoDimArray[][] = null;
- public float threeDimArray[][][] = null;
-
- public TestStruct ()
- {
- } // ctor
-
- public TestStruct (String[] _oneDimArray, int[][] _twoDimArray, float[][][] _threeDimArray)
- {
- oneDimArray = _oneDimArray;
- twoDimArray = _twoDimArray;
- threeDimArray = _threeDimArray;
- } // ctor
-
-} // class TestStruct
+/*
+ * 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.binding.corba.testing.arrays_unions;
+
+
+/**
+* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/TestStruct.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from arrays_unions.idl
+* niedziela, 17 sierpień 2008 15:45:39 CEST
+*/
+
+public final class TestStruct implements org.omg.CORBA.portable.IDLEntity
+{
+ public String oneDimArray[] = null;
+ public int twoDimArray[][] = null;
+ public float threeDimArray[][][] = null;
+
+ public TestStruct ()
+ {
+ } // ctor
+
+ public TestStruct (String[] _oneDimArray, int[][] _twoDimArray, float[][][] _threeDimArray)
+ {
+ oneDimArray = _oneDimArray;
+ twoDimArray = _twoDimArray;
+ threeDimArray = _threeDimArray;
+ } // ctor
+
+} // class TestStruct
diff --git a/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/TestStructHelper.java b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/TestStructHelper.java
index 6427d9d200..88d6e033f1 100644
--- a/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/TestStructHelper.java
+++ b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/TestStructHelper.java
@@ -1,149 +1,167 @@
-package org.apache.tuscany.sca.binding.corba.testing.arrays_unions;
-
-
-/**
-* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/TestStructHelper.java .
-* Generated by the IDL-to-Java compiler (portable), version "3.2"
-* from arrays_unions.idl
-* niedziela, 17 sierpień 2008 15:45:39 CEST
-*/
-
-abstract public class TestStructHelper
-{
- private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/arrays_unions/TestStruct/TestStruct:1.0";
-
- public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStruct 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.binding.corba.testing.arrays_unions.TestStruct 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 [3];
- 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 );
- _members0[0] = new org.omg.CORBA.StructMember (
- "oneDimArray",
- _tcOf_members0,
- null);
- _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
- _tcOf_members0 = org.omg.CORBA.ORB.init ().create_array_tc (2, _tcOf_members0 );
- _tcOf_members0 = org.omg.CORBA.ORB.init ().create_array_tc (4, _tcOf_members0 );
- _members0[1] = new org.omg.CORBA.StructMember (
- "twoDimArray",
- _tcOf_members0,
- null);
- _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_float);
- _tcOf_members0 = org.omg.CORBA.ORB.init ().create_array_tc (2, _tcOf_members0 );
- _tcOf_members0 = org.omg.CORBA.ORB.init ().create_array_tc (4, _tcOf_members0 );
- _tcOf_members0 = org.omg.CORBA.ORB.init ().create_array_tc (2, _tcOf_members0 );
- _members0[2] = new org.omg.CORBA.StructMember (
- "threeDimArray",
- _tcOf_members0,
- null);
- __typeCode = org.omg.CORBA.ORB.init ().create_struct_tc (org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStructHelper.id (), "TestStruct", _members0);
- __active = false;
- }
- }
- }
- return __typeCode;
- }
-
- public static String id ()
- {
- return _id;
- }
-
- public static org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStruct read (org.omg.CORBA.portable.InputStream istream)
- {
- org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStruct value = new org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStruct ();
- value.oneDimArray = new String[2];
- for (int _o0 = 0;_o0 < (2); ++_o0)
- {
- value.oneDimArray[_o0] = istream.read_string ();
- }
- value.twoDimArray = new int[2][];
- for (int _o1 = 0;_o1 < (2); ++_o1)
- {
- value.twoDimArray[_o1] = new int[4];
- for (int _o2 = 0;_o2 < (4); ++_o2)
- {
- value.twoDimArray[_o1][_o2] = istream.read_long ();
- }
- }
- value.threeDimArray = new float[2][][];
- for (int _o3 = 0;_o3 < (2); ++_o3)
- {
- value.threeDimArray[_o3] = new float[4][];
- for (int _o4 = 0;_o4 < (4); ++_o4)
- {
- value.threeDimArray[_o3][_o4] = new float[2];
- for (int _o5 = 0;_o5 < (2); ++_o5)
- {
- value.threeDimArray[_o3][_o4][_o5] = istream.read_float ();
- }
- }
- }
- return value;
- }
-
- public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStruct value)
- {
- if (value.oneDimArray.length != (2))
- throw new org.omg.CORBA.MARSHAL (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
- for (int _i0 = 0;_i0 < (2); ++_i0)
- {
- ostream.write_string (value.oneDimArray[_i0]);
- }
- if (value.twoDimArray.length != (2))
- throw new org.omg.CORBA.MARSHAL (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
- for (int _i1 = 0;_i1 < (2); ++_i1)
- {
- if (value.twoDimArray[_i1].length != (4))
- throw new org.omg.CORBA.MARSHAL (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
- for (int _i2 = 0;_i2 < (4); ++_i2)
- {
- ostream.write_long (value.twoDimArray[_i1][_i2]);
- }
- }
- if (value.threeDimArray.length != (2))
- throw new org.omg.CORBA.MARSHAL (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
- for (int _i3 = 0;_i3 < (2); ++_i3)
- {
- if (value.threeDimArray[_i3].length != (4))
- throw new org.omg.CORBA.MARSHAL (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
- for (int _i4 = 0;_i4 < (4); ++_i4)
- {
- if (value.threeDimArray[_i3][_i4].length != (2))
- throw new org.omg.CORBA.MARSHAL (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
- for (int _i5 = 0;_i5 < (2); ++_i5)
- {
- ostream.write_float (value.threeDimArray[_i3][_i4][_i5]);
- }
- }
- }
- }
-
-}
+/*
+ * 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.binding.corba.testing.arrays_unions;
+
+
+/**
+* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/TestStructHelper.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from arrays_unions.idl
+* niedziela, 17 sierpień 2008 15:45:39 CEST
+*/
+
+abstract public class TestStructHelper
+{
+ private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/arrays_unions/TestStruct/TestStruct:1.0";
+
+ public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStruct 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.binding.corba.testing.arrays_unions.TestStruct 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 [3];
+ 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 );
+ _members0[0] = new org.omg.CORBA.StructMember (
+ "oneDimArray",
+ _tcOf_members0,
+ null);
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().create_array_tc (2, _tcOf_members0 );
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().create_array_tc (4, _tcOf_members0 );
+ _members0[1] = new org.omg.CORBA.StructMember (
+ "twoDimArray",
+ _tcOf_members0,
+ null);
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_float);
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().create_array_tc (2, _tcOf_members0 );
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().create_array_tc (4, _tcOf_members0 );
+ _tcOf_members0 = org.omg.CORBA.ORB.init ().create_array_tc (2, _tcOf_members0 );
+ _members0[2] = new org.omg.CORBA.StructMember (
+ "threeDimArray",
+ _tcOf_members0,
+ null);
+ __typeCode = org.omg.CORBA.ORB.init ().create_struct_tc (org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStructHelper.id (), "TestStruct", _members0);
+ __active = false;
+ }
+ }
+ }
+ return __typeCode;
+ }
+
+ public static String id ()
+ {
+ return _id;
+ }
+
+ public static org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStruct read (org.omg.CORBA.portable.InputStream istream)
+ {
+ org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStruct value = new org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStruct ();
+ value.oneDimArray = new String[2];
+ for (int _o0 = 0;_o0 < (2); ++_o0)
+ {
+ value.oneDimArray[_o0] = istream.read_string ();
+ }
+ value.twoDimArray = new int[2][];
+ for (int _o1 = 0;_o1 < (2); ++_o1)
+ {
+ value.twoDimArray[_o1] = new int[4];
+ for (int _o2 = 0;_o2 < (4); ++_o2)
+ {
+ value.twoDimArray[_o1][_o2] = istream.read_long ();
+ }
+ }
+ value.threeDimArray = new float[2][][];
+ for (int _o3 = 0;_o3 < (2); ++_o3)
+ {
+ value.threeDimArray[_o3] = new float[4][];
+ for (int _o4 = 0;_o4 < (4); ++_o4)
+ {
+ value.threeDimArray[_o3][_o4] = new float[2];
+ for (int _o5 = 0;_o5 < (2); ++_o5)
+ {
+ value.threeDimArray[_o3][_o4][_o5] = istream.read_float ();
+ }
+ }
+ }
+ return value;
+ }
+
+ public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStruct value)
+ {
+ if (value.oneDimArray.length != (2))
+ throw new org.omg.CORBA.MARSHAL (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
+ for (int _i0 = 0;_i0 < (2); ++_i0)
+ {
+ ostream.write_string (value.oneDimArray[_i0]);
+ }
+ if (value.twoDimArray.length != (2))
+ throw new org.omg.CORBA.MARSHAL (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
+ for (int _i1 = 0;_i1 < (2); ++_i1)
+ {
+ if (value.twoDimArray[_i1].length != (4))
+ throw new org.omg.CORBA.MARSHAL (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
+ for (int _i2 = 0;_i2 < (4); ++_i2)
+ {
+ ostream.write_long (value.twoDimArray[_i1][_i2]);
+ }
+ }
+ if (value.threeDimArray.length != (2))
+ throw new org.omg.CORBA.MARSHAL (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
+ for (int _i3 = 0;_i3 < (2); ++_i3)
+ {
+ if (value.threeDimArray[_i3].length != (4))
+ throw new org.omg.CORBA.MARSHAL (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
+ for (int _i4 = 0;_i4 < (4); ++_i4)
+ {
+ if (value.threeDimArray[_i3][_i4].length != (2))
+ throw new org.omg.CORBA.MARSHAL (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
+ for (int _i5 = 0;_i5 < (2); ++_i5)
+ {
+ ostream.write_float (value.threeDimArray[_i3][_i4][_i5]);
+ }
+ }
+ }
+ }
+
+}
diff --git a/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/TestStructHolder.java b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/TestStructHolder.java
index 94683e0327..711f9edbaa 100644
--- a/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/TestStructHolder.java
+++ b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/TestStructHolder.java
@@ -1,38 +1,56 @@
-package org.apache.tuscany.sca.binding.corba.testing.arrays_unions;
-
-/**
-* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/TestStructHolder.java .
-* Generated by the IDL-to-Java compiler (portable), version "3.2"
-* from arrays_unions.idl
-* niedziela, 17 sierpień 2008 15:45:39 CEST
-*/
-
-public final class TestStructHolder implements org.omg.CORBA.portable.Streamable
-{
- public org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStruct value = null;
-
- public TestStructHolder ()
- {
- }
-
- public TestStructHolder (org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStruct initialValue)
- {
- value = initialValue;
- }
-
- public void _read (org.omg.CORBA.portable.InputStream i)
- {
- value = org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStructHelper.read (i);
- }
-
- public void _write (org.omg.CORBA.portable.OutputStream o)
- {
- org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStructHelper.write (o, value);
- }
-
- public org.omg.CORBA.TypeCode _type ()
- {
- return org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStructHelper.type ();
- }
-
-}
+/*
+ * 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.binding.corba.testing.arrays_unions;
+
+/**
+* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/TestStructHolder.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from arrays_unions.idl
+* niedziela, 17 sierpień 2008 15:45:39 CEST
+*/
+
+public final class TestStructHolder implements org.omg.CORBA.portable.Streamable
+{
+ public org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStruct value = null;
+
+ public TestStructHolder ()
+ {
+ }
+
+ public TestStructHolder (org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStruct initialValue)
+ {
+ value = initialValue;
+ }
+
+ public void _read (org.omg.CORBA.portable.InputStream i)
+ {
+ value = org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStructHelper.read (i);
+ }
+
+ public void _write (org.omg.CORBA.portable.OutputStream o)
+ {
+ org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStructHelper.write (o, value);
+ }
+
+ public org.omg.CORBA.TypeCode _type ()
+ {
+ return org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStructHelper.type ();
+ }
+
+}
diff --git a/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/_ArraysUnionsTestsImplBase.java b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/_ArraysUnionsTestsImplBase.java
index e4cac28e4f..481ca29621 100644
--- a/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/_ArraysUnionsTestsImplBase.java
+++ b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/_ArraysUnionsTestsImplBase.java
@@ -1,86 +1,104 @@
-package org.apache.tuscany.sca.binding.corba.testing.arrays_unions;
-
-
-/**
-* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/_ArraysUnionsTestsImplBase.java .
-* Generated by the IDL-to-Java compiler (portable), version "3.2"
-* from arrays_unions.idl
-* niedziela, 17 sierpień 2008 15:45:39 CEST
-*/
-
-public abstract class _ArraysUnionsTestsImplBase extends org.omg.CORBA.portable.ObjectImpl
- implements org.apache.tuscany.sca.binding.corba.testing.arrays_unions.ArraysUnionsTests, org.omg.CORBA.portable.InvokeHandler
-{
-
- // Constructors
- public _ArraysUnionsTestsImplBase ()
- {
- }
-
- private static java.util.Hashtable _methods = new java.util.Hashtable ();
- static
- {
- _methods.put ("passTestStruct", new java.lang.Integer (0));
- _methods.put ("passStringArray", new java.lang.Integer (1));
- _methods.put ("passRichUnion", new java.lang.Integer (2));
- }
-
- 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/binding/corba/testing/arrays_unions/ArraysUnionsTests/passTestStruct
- {
- org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStruct arg = org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStructHelper.read (in);
- org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStruct $result = null;
- $result = this.passTestStruct (arg);
- out = $rh.createReply();
- org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStructHelper.write (out, $result);
- break;
- }
-
- case 1: // org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTests/passStringArray
- {
- String arg[][] = org.apache.tuscany.sca.binding.corba.testing.arrays_unions.StringArrayHelper.read (in);
- String $result[][] = null;
- $result = this.passStringArray (arg);
- out = $rh.createReply();
- org.apache.tuscany.sca.binding.corba.testing.arrays_unions.StringArrayHelper.write (out, $result);
- break;
- }
-
- case 2: // org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTests/passRichUnion
- {
- org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnion arg = org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnionHelper.read (in);
- org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnion $result = null;
- $result = this.passRichUnion (arg);
- out = $rh.createReply();
- org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnionHelper.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/binding/corba/testing/arrays_unions/ArraysUnionsTests:1.0"};
-
- public String[] _ids ()
- {
- return (String[])__ids.clone ();
- }
-
-
-} // class _ArraysUnionsTestsImplBase
+/*
+ * 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.binding.corba.testing.arrays_unions;
+
+
+/**
+* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/_ArraysUnionsTestsImplBase.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from arrays_unions.idl
+* niedziela, 17 sierpień 2008 15:45:39 CEST
+*/
+
+public abstract class _ArraysUnionsTestsImplBase extends org.omg.CORBA.portable.ObjectImpl
+ implements org.apache.tuscany.sca.binding.corba.testing.arrays_unions.ArraysUnionsTests, org.omg.CORBA.portable.InvokeHandler
+{
+
+ // Constructors
+ public _ArraysUnionsTestsImplBase ()
+ {
+ }
+
+ private static java.util.Hashtable _methods = new java.util.Hashtable ();
+ static
+ {
+ _methods.put ("passTestStruct", new java.lang.Integer (0));
+ _methods.put ("passStringArray", new java.lang.Integer (1));
+ _methods.put ("passRichUnion", new java.lang.Integer (2));
+ }
+
+ 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/binding/corba/testing/arrays_unions/ArraysUnionsTests/passTestStruct
+ {
+ org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStruct arg = org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStructHelper.read (in);
+ org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStruct $result = null;
+ $result = this.passTestStruct (arg);
+ out = $rh.createReply();
+ org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStructHelper.write (out, $result);
+ break;
+ }
+
+ case 1: // org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTests/passStringArray
+ {
+ String arg[][] = org.apache.tuscany.sca.binding.corba.testing.arrays_unions.StringArrayHelper.read (in);
+ String $result[][] = null;
+ $result = this.passStringArray (arg);
+ out = $rh.createReply();
+ org.apache.tuscany.sca.binding.corba.testing.arrays_unions.StringArrayHelper.write (out, $result);
+ break;
+ }
+
+ case 2: // org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTests/passRichUnion
+ {
+ org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnion arg = org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnionHelper.read (in);
+ org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnion $result = null;
+ $result = this.passRichUnion (arg);
+ out = $rh.createReply();
+ org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnionHelper.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/binding/corba/testing/arrays_unions/ArraysUnionsTests:1.0"};
+
+ public String[] _ids ()
+ {
+ return (String[])__ids.clone ();
+ }
+
+
+} // class _ArraysUnionsTestsImplBase
diff --git a/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/_ArraysUnionsTestsStub.java b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/_ArraysUnionsTestsStub.java
index 38e29c0d63..da24ea3746 100644
--- a/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/_ArraysUnionsTestsStub.java
+++ b/branches/sca-java-1.4/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/arrays_unions/_ArraysUnionsTestsStub.java
@@ -1,100 +1,118 @@
-package org.apache.tuscany.sca.binding.corba.testing.arrays_unions;
-
-
-/**
-* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/_ArraysUnionsTestsStub.java .
-* Generated by the IDL-to-Java compiler (portable), version "3.2"
-* from arrays_unions.idl
-* niedziela, 17 sierpień 2008 15:45:39 CEST
-*/
-
-public class _ArraysUnionsTestsStub extends org.omg.CORBA.portable.ObjectImpl implements org.apache.tuscany.sca.binding.corba.testing.arrays_unions.ArraysUnionsTests
-{
-
- public org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStruct passTestStruct (org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStruct arg)
- {
- org.omg.CORBA.portable.InputStream $in = null;
- try {
- org.omg.CORBA.portable.OutputStream $out = _request ("passTestStruct", true);
- org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStructHelper.write ($out, arg);
- $in = _invoke ($out);
- org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStruct $result = org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStructHelper.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 passTestStruct (arg );
- } finally {
- _releaseReply ($in);
- }
- } // passTestStruct
-
- 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.binding.corba.testing.arrays_unions.StringArrayHelper.write ($out, arg);
- $in = _invoke ($out);
- String $result[][] = org.apache.tuscany.sca.binding.corba.testing.arrays_unions.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.binding.corba.testing.arrays_unions.RichUnion passRichUnion (org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnion arg)
- {
- org.omg.CORBA.portable.InputStream $in = null;
- try {
- org.omg.CORBA.portable.OutputStream $out = _request ("passRichUnion", true);
- org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnionHelper.write ($out, arg);
- $in = _invoke ($out);
- org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnion $result = org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnionHelper.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 passRichUnion (arg );
- } finally {
- _releaseReply ($in);
- }
- } // passRichUnion
-
- // Type-specific CORBA::Object operations
- private static String[] __ids = {
- "IDL:org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTests: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 _ArraysUnionsTestsStub
+/*
+ * 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.binding.corba.testing.arrays_unions;
+
+
+/**
+* org/apache/tuscany/sca/binding/corba/testing/arrays_unions/_ArraysUnionsTestsStub.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.2"
+* from arrays_unions.idl
+* niedziela, 17 sierpień 2008 15:45:39 CEST
+*/
+
+public class _ArraysUnionsTestsStub extends org.omg.CORBA.portable.ObjectImpl implements org.apache.tuscany.sca.binding.corba.testing.arrays_unions.ArraysUnionsTests
+{
+
+ public org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStruct passTestStruct (org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStruct arg)
+ {
+ org.omg.CORBA.portable.InputStream $in = null;
+ try {
+ org.omg.CORBA.portable.OutputStream $out = _request ("passTestStruct", true);
+ org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStructHelper.write ($out, arg);
+ $in = _invoke ($out);
+ org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStruct $result = org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStructHelper.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 passTestStruct (arg );
+ } finally {
+ _releaseReply ($in);
+ }
+ } // passTestStruct
+
+ 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.binding.corba.testing.arrays_unions.StringArrayHelper.write ($out, arg);
+ $in = _invoke ($out);
+ String $result[][] = org.apache.tuscany.sca.binding.corba.testing.arrays_unions.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.binding.corba.testing.arrays_unions.RichUnion passRichUnion (org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnion arg)
+ {
+ org.omg.CORBA.portable.InputStream $in = null;
+ try {
+ org.omg.CORBA.portable.OutputStream $out = _request ("passRichUnion", true);
+ org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnionHelper.write ($out, arg);
+ $in = _invoke ($out);
+ org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnion $result = org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnionHelper.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 passRichUnion (arg );
+ } finally {
+ _releaseReply ($in);
+ }
+ } // passRichUnion
+
+ // Type-specific CORBA::Object operations
+ private static String[] __ids = {
+ "IDL:org/apache/tuscany/sca/binding/corba/testing/arrays_unions/ArraysUnionsTests: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 _ArraysUnionsTestsStub
diff --git a/branches/sca-java-1.4/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/TuscanyNamespaceContext.java b/branches/sca-java-1.4/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/TuscanyNamespaceContext.java
index 8b1e40cee9..d0448356ef 100644
--- a/branches/sca-java-1.4/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/TuscanyNamespaceContext.java
+++ b/branches/sca-java-1.4/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/TuscanyNamespaceContext.java
@@ -1,124 +1,142 @@
-package org.apache.tuscany.sca.contribution.processor;
-
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.Stack;
-
-import javax.xml.XMLConstants;
-import javax.xml.namespace.NamespaceContext;
-
-@SuppressWarnings("unused")
-public class TuscanyNamespaceContext implements NamespaceContext {
-
- private Stack<ArrayList<ArrayList<String>>> context = null;
-
- public TuscanyNamespaceContext(Stack<ArrayList<ArrayList<String>>> context){
- this.context = context;
- }
-
- public String getNamespaceURI(String prefix) {
- if (prefix == null) {
- throw new IllegalArgumentException();
- }
- return (String) getResult("getNSUri",prefix);
- }
-
- public String getPrefix(String namespaceURI) {
- if (namespaceURI == null) {
- throw new IllegalArgumentException();
- }
- return (String) getResult("getPrefix",namespaceURI);
- }
-
- @SuppressWarnings("unchecked")
- public Iterator<String> getPrefixes(String namespaceURI) {
- if (namespaceURI == null) {
- throw new IllegalArgumentException();
- }
-
- Iterator<String> iterator = new Itr<String>((Iterator<String>) getResult("getPrefixes",namespaceURI));
- return iterator;
- }
-
- /*
- * Generic method to Iterate through the Stack and return required result(s)
- */
- private Object getResult(String operation,String arg){
-
- ArrayList<ArrayList<String>> contextList = null;
- Iterator<String> prefItr = null;
- Iterator<String> uriItr = null;
-
- List<String> list = new ArrayList<String>();;
-
- String toCompare = null;
-
- String tempPrefix = null;
- String tempUri = null ;
-
- for(int i = context.size()-1; i>=0;i--){
- contextList = context.get(i);
- prefItr = ((ArrayList<String>)contextList.get(0)).iterator();
- uriItr = ((ArrayList<String>)contextList.get(1)).iterator();
- for(int j = 0;uriItr.hasNext();j++){
- tempPrefix = (String) prefItr.next();
- tempUri = (String) uriItr.next();
- if(operation.equalsIgnoreCase("getNSUri")){
- toCompare = tempPrefix;
- }
- else if(operation.equalsIgnoreCase("getPrefix")){
- toCompare = tempUri;
- }
- else if(operation.equalsIgnoreCase("getPrefixes")){
- toCompare = tempUri;
- }
- if(toCompare != null && arg.equalsIgnoreCase(toCompare)){
- if(operation.equalsIgnoreCase("getNSUri")){
- return tempUri;
- }
- else if(operation.equalsIgnoreCase("getPrefix")){
- return tempPrefix;
- }
- else if(operation.equalsIgnoreCase("getPrefixes")){
- list.add(tempPrefix);
-
- }
-
- }
- }
- }
-
- if(operation.equalsIgnoreCase("getPrefixes")){
- return list.iterator();
- }
-
- return null;
- }
-
- /*
- * Custom implementation of the Iterator interface to override the behavior of the remove() method.
- * The iterator should not be modifiable and invocation of the remove() method should throw UnsupportedOperationException.
- */
- private class Itr<E> implements Iterator<E>{
- Iterator<E> iterator = null;
-
- Itr(Iterator<E> inputItr){
- this.iterator = inputItr;
- }
-
- public boolean hasNext() {
- return this.iterator.hasNext();
- }
-
- public E next() {
- return (E) this.iterator.next();
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
- } //end of class Itr<E>
-
-
-} //end of Class
+/*
+ * 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.contribution.processor;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Stack;
+
+import javax.xml.XMLConstants;
+import javax.xml.namespace.NamespaceContext;
+
+@SuppressWarnings("unused")
+public class TuscanyNamespaceContext implements NamespaceContext {
+
+ private Stack<ArrayList<ArrayList<String>>> context = null;
+
+ public TuscanyNamespaceContext(Stack<ArrayList<ArrayList<String>>> context){
+ this.context = context;
+ }
+
+ public String getNamespaceURI(String prefix) {
+ if (prefix == null) {
+ throw new IllegalArgumentException();
+ }
+ return (String) getResult("getNSUri",prefix);
+ }
+
+ public String getPrefix(String namespaceURI) {
+ if (namespaceURI == null) {
+ throw new IllegalArgumentException();
+ }
+ return (String) getResult("getPrefix",namespaceURI);
+ }
+
+ @SuppressWarnings("unchecked")
+ public Iterator<String> getPrefixes(String namespaceURI) {
+ if (namespaceURI == null) {
+ throw new IllegalArgumentException();
+ }
+
+ Iterator<String> iterator = new Itr<String>((Iterator<String>) getResult("getPrefixes",namespaceURI));
+ return iterator;
+ }
+
+ /*
+ * Generic method to Iterate through the Stack and return required result(s)
+ */
+ private Object getResult(String operation,String arg){
+
+ ArrayList<ArrayList<String>> contextList = null;
+ Iterator<String> prefItr = null;
+ Iterator<String> uriItr = null;
+
+ List<String> list = new ArrayList<String>();;
+
+ String toCompare = null;
+
+ String tempPrefix = null;
+ String tempUri = null ;
+
+ for(int i = context.size()-1; i>=0;i--){
+ contextList = context.get(i);
+ prefItr = ((ArrayList<String>)contextList.get(0)).iterator();
+ uriItr = ((ArrayList<String>)contextList.get(1)).iterator();
+ for(int j = 0;uriItr.hasNext();j++){
+ tempPrefix = (String) prefItr.next();
+ tempUri = (String) uriItr.next();
+ if(operation.equalsIgnoreCase("getNSUri")){
+ toCompare = tempPrefix;
+ }
+ else if(operation.equalsIgnoreCase("getPrefix")){
+ toCompare = tempUri;
+ }
+ else if(operation.equalsIgnoreCase("getPrefixes")){
+ toCompare = tempUri;
+ }
+ if(toCompare != null && arg.equalsIgnoreCase(toCompare)){
+ if(operation.equalsIgnoreCase("getNSUri")){
+ return tempUri;
+ }
+ else if(operation.equalsIgnoreCase("getPrefix")){
+ return tempPrefix;
+ }
+ else if(operation.equalsIgnoreCase("getPrefixes")){
+ list.add(tempPrefix);
+
+ }
+
+ }
+ }
+ }
+
+ if(operation.equalsIgnoreCase("getPrefixes")){
+ return list.iterator();
+ }
+
+ return null;
+ }
+
+ /*
+ * Custom implementation of the Iterator interface to override the behavior of the remove() method.
+ * The iterator should not be modifiable and invocation of the remove() method should throw UnsupportedOperationException.
+ */
+ private class Itr<E> implements Iterator<E>{
+ Iterator<E> iterator = null;
+
+ Itr(Iterator<E> inputItr){
+ this.iterator = inputItr;
+ }
+
+ public boolean hasNext() {
+ return this.iterator.hasNext();
+ }
+
+ public E next() {
+ return (E) this.iterator.next();
+ }
+
+ public void remove() {
+ throw new UnsupportedOperationException();
+ }
+ } //end of class Itr<E>
+
+
+} //end of Class
diff --git a/branches/sca-java-1.4/modules/host-openejb/src/main/java/org/apache/tuscany/sca/host/openejb/OpenEJBServer.java b/branches/sca-java-1.4/modules/host-openejb/src/main/java/org/apache/tuscany/sca/host/openejb/OpenEJBServer.java
index 0da02c284d..82e619ddbe 100644
--- a/branches/sca-java-1.4/modules/host-openejb/src/main/java/org/apache/tuscany/sca/host/openejb/OpenEJBServer.java
+++ b/branches/sca-java-1.4/modules/host-openejb/src/main/java/org/apache/tuscany/sca/host/openejb/OpenEJBServer.java
@@ -1,127 +1,145 @@
-package org.apache.tuscany.sca.host.openejb;
-
-import java.io.IOException;
-import java.util.Properties;
-
-import javax.naming.Context;
-import javax.naming.NamingException;
-
-import org.apache.openejb.OpenEJB;
-import org.apache.openejb.OpenEJBException;
-import org.apache.openejb.assembler.classic.Assembler;
-import org.apache.openejb.assembler.classic.StatelessSessionContainerInfo;
-import org.apache.openejb.config.ConfigurationFactory;
-import org.apache.openejb.core.ServerFederation;
-import org.apache.openejb.jee.EjbJar;
-import org.apache.openejb.jee.StatelessBean;
-import org.apache.openejb.loader.SystemInstance;
-import org.apache.openejb.server.ServiceDaemon;
-import org.apache.openejb.server.ServiceException;
-import org.apache.openejb.server.ejbd.EjbServer;
-import org.apache.tuscany.sca.host.ejb.EJBHost;
-import org.apache.tuscany.sca.host.ejb.EJBRegistrationException;
-import org.apache.tuscany.sca.host.ejb.EJBSessionBean;
-
-/**
- * OpenEJB-based EJB host implementation.
- *
- * @version $Rev: $ $Date: $
- */
-public class OpenEJBServer implements EJBHost {
-
- private boolean started;
- private EjbServer ejbServer;
- private ServiceDaemon serviceDaemon;
- private ConfigurationFactory config;
- private Assembler assembler;
-
- public void addSessionBean(String ejbName, EJBSessionBean sessionBean) throws EJBRegistrationException {
- if (!started) {
- start();
- }
-
- try {
- StatelessBean bean = new StatelessBean(ejbName, sessionBean.getImplementationClass());
- bean.addBusinessRemote(sessionBean.getRemoteInterface().getName());
- bean.addPostConstruct("init");
- bean.addPreDestroy("destroy");
-
- EjbJar ejbJar = new EjbJar();
- ejbJar.addEnterpriseBean(bean);
-
- assembler.createApplication(config.configureApplication(ejbJar));
-
- } catch (NamingException e) {
- throw new EJBRegistrationException(e);
- } catch (IOException e) {
- throw new EJBRegistrationException(e);
- } catch (OpenEJBException e) {
- throw new EJBRegistrationException(e);
- }
- }
-
- public EJBSessionBean getSessionBean(String ejbName) throws EJBRegistrationException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public EJBSessionBean removeSessionBean(String ejbName) throws EJBRegistrationException {
- // TODO Auto-generated method stub
- return null;
- }
-
- /**
- * Start the OpenEJB server.
- *
- * @throws EJBRegistrationException
- */
- private void start() throws EJBRegistrationException {
- try {
- Properties properties = new Properties();
- properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.RemoteInitialContextFactory");
- properties.put(Context.PROVIDER_URL, "ejbd://localhost:2888");
- SystemInstance.init(properties);
-
- ejbServer = new EjbServer();
- SystemInstance.get().setComponent(EjbServer.class, ejbServer);
- OpenEJB.init(properties, new ServerFederation());
- ejbServer.init(properties);
-
- serviceDaemon = new ServiceDaemon(ejbServer, 2888, "localhost");
- serviceDaemon.start();
-
- config = new ConfigurationFactory();
- assembler = (Assembler)SystemInstance.get().getComponent(org.apache.openejb.spi.Assembler.class);
-
- // containers
- StatelessSessionContainerInfo statelessContainerInfo = config.configureService(StatelessSessionContainerInfo.class);
- statelessContainerInfo.properties.setProperty("TimeOut", "10");
- statelessContainerInfo.properties.setProperty("PoolSize", "0");
- statelessContainerInfo.properties.setProperty("StrictPooling", "false");
- assembler.createContainer(statelessContainerInfo);
-
- } catch (OpenEJBException e) {
- throw new EJBRegistrationException(e);
- } catch (Exception e) {
- throw new EJBRegistrationException(e);
- }
-
- started = true;
- }
-
- /**
- * Stop the OpenEJB server.
- */
- void stop() {
- if (started) {
- try {
- serviceDaemon.stop();
- } catch (ServiceException e) {
- throw new EJBRegistrationException(e);
- }
- }
- SystemInstance.get().removeComponent(EjbServer.class);
- OpenEJB.destroy();
- }
-
-}
+/*
+ * 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.host.openejb;
+
+import java.io.IOException;
+import java.util.Properties;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+
+import org.apache.openejb.OpenEJB;
+import org.apache.openejb.OpenEJBException;
+import org.apache.openejb.assembler.classic.Assembler;
+import org.apache.openejb.assembler.classic.StatelessSessionContainerInfo;
+import org.apache.openejb.config.ConfigurationFactory;
+import org.apache.openejb.core.ServerFederation;
+import org.apache.openejb.jee.EjbJar;
+import org.apache.openejb.jee.StatelessBean;
+import org.apache.openejb.loader.SystemInstance;
+import org.apache.openejb.server.ServiceDaemon;
+import org.apache.openejb.server.ServiceException;
+import org.apache.openejb.server.ejbd.EjbServer;
+import org.apache.tuscany.sca.host.ejb.EJBHost;
+import org.apache.tuscany.sca.host.ejb.EJBRegistrationException;
+import org.apache.tuscany.sca.host.ejb.EJBSessionBean;
+
+/**
+ * OpenEJB-based EJB host implementation.
+ *
+ * @version $Rev: $ $Date: $
+ */
+public class OpenEJBServer implements EJBHost {
+
+ private boolean started;
+ private EjbServer ejbServer;
+ private ServiceDaemon serviceDaemon;
+ private ConfigurationFactory config;
+ private Assembler assembler;
+
+ public void addSessionBean(String ejbName, EJBSessionBean sessionBean) throws EJBRegistrationException {
+ if (!started) {
+ start();
+ }
+
+ try {
+ StatelessBean bean = new StatelessBean(ejbName, sessionBean.getImplementationClass());
+ bean.addBusinessRemote(sessionBean.getRemoteInterface().getName());
+ bean.addPostConstruct("init");
+ bean.addPreDestroy("destroy");
+
+ EjbJar ejbJar = new EjbJar();
+ ejbJar.addEnterpriseBean(bean);
+
+ assembler.createApplication(config.configureApplication(ejbJar));
+
+ } catch (NamingException e) {
+ throw new EJBRegistrationException(e);
+ } catch (IOException e) {
+ throw new EJBRegistrationException(e);
+ } catch (OpenEJBException e) {
+ throw new EJBRegistrationException(e);
+ }
+ }
+
+ public EJBSessionBean getSessionBean(String ejbName) throws EJBRegistrationException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public EJBSessionBean removeSessionBean(String ejbName) throws EJBRegistrationException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /**
+ * Start the OpenEJB server.
+ *
+ * @throws EJBRegistrationException
+ */
+ private void start() throws EJBRegistrationException {
+ try {
+ Properties properties = new Properties();
+ properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.RemoteInitialContextFactory");
+ properties.put(Context.PROVIDER_URL, "ejbd://localhost:2888");
+ SystemInstance.init(properties);
+
+ ejbServer = new EjbServer();
+ SystemInstance.get().setComponent(EjbServer.class, ejbServer);
+ OpenEJB.init(properties, new ServerFederation());
+ ejbServer.init(properties);
+
+ serviceDaemon = new ServiceDaemon(ejbServer, 2888, "localhost");
+ serviceDaemon.start();
+
+ config = new ConfigurationFactory();
+ assembler = (Assembler)SystemInstance.get().getComponent(org.apache.openejb.spi.Assembler.class);
+
+ // containers
+ StatelessSessionContainerInfo statelessContainerInfo = config.configureService(StatelessSessionContainerInfo.class);
+ statelessContainerInfo.properties.setProperty("TimeOut", "10");
+ statelessContainerInfo.properties.setProperty("PoolSize", "0");
+ statelessContainerInfo.properties.setProperty("StrictPooling", "false");
+ assembler.createContainer(statelessContainerInfo);
+
+ } catch (OpenEJBException e) {
+ throw new EJBRegistrationException(e);
+ } catch (Exception e) {
+ throw new EJBRegistrationException(e);
+ }
+
+ started = true;
+ }
+
+ /**
+ * Stop the OpenEJB server.
+ */
+ void stop() {
+ if (started) {
+ try {
+ serviceDaemon.stop();
+ } catch (ServiceException e) {
+ throw new EJBRegistrationException(e);
+ }
+ }
+ SystemInstance.get().removeComponent(EjbServer.class);
+ OpenEJB.destroy();
+ }
+
+}
diff --git a/branches/sca-java-1.4/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxLauncherBundleHelper.java b/branches/sca-java-1.4/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxLauncherBundleHelper.java
index 97cc094f2b..90d682a74b 100644
--- a/branches/sca-java-1.4/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxLauncherBundleHelper.java
+++ b/branches/sca-java-1.4/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxLauncherBundleHelper.java
@@ -1,3 +1,21 @@
+/*
+ * 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.node.equinox.launcher;
import java.io.ByteArrayInputStream;
diff --git a/branches/sca-java-1.4/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/LauncherBundleActivator.java b/branches/sca-java-1.4/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/LauncherBundleActivator.java
index 13af11238e..afd6804ad2 100644
--- a/branches/sca-java-1.4/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/LauncherBundleActivator.java
+++ b/branches/sca-java-1.4/modules/node-launcher-osgi/src/main/java/org/apache/tuscany/sca/node/osgi/launcher/LauncherBundleActivator.java
@@ -1,3 +1,21 @@
+/*
+ * 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.node.osgi.launcher;
import java.io.ByteArrayInputStream;
diff --git a/branches/sca-java-1.4/modules/tracing-aspectj/launcher.bat b/branches/sca-java-1.4/modules/tracing-aspectj/launcher.bat
index a5305f486d..d50ec6513d 100644
--- a/branches/sca-java-1.4/modules/tracing-aspectj/launcher.bat
+++ b/branches/sca-java-1.4/modules/tracing-aspectj/launcher.bat
@@ -1,4 +1,21 @@
@echo off
+REM Licensed to the Apache Software Foundation (ASF) under one
+REM or more contributor license agreements. See the NOTICE file
+REM distributed with this work for additional information
+REM regarding copyright ownership. The ASF licenses this file
+REM to you under the Apache License, Version 2.0 (the
+REM "License"); you may not use this file except in compliance
+REM with the License. You may obtain a copy of the License at
+REM
+REM http://www.apache.org/licenses/LICENSE-2.0
+REM
+REM Unless required by applicable law or agreed to in writing,
+REM software distributed under the License is distributed on an
+REM # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+REM KIND, either express or implied. See the License for the
+REM specific language governing permissions and limitations
+REM under the License.
+
set TUSCANY_HOME=C:\Apache\tuscany-sca-1.3
set ASPECTJ_WEAVER=%HOMEPATH%\.m2\repository\org\aspectj\aspectjweaver\1.6.1\aspectjweaver-1.6.1.jar
set CP=%ASPECTJ_WEAVER%;%TUSCANY_HOME%\lib\tuscany-sca-manifest.jar;%TUSCANY_HOME%\samples\calculator\target\sample-calculator.jar
diff --git a/branches/sca-java-1.4/modules/tracing-aspectj/src/main/resources/META-INF/aop.xml b/branches/sca-java-1.4/modules/tracing-aspectj/src/main/resources/META-INF/aop.xml
index f699a140e3..c5b623d27f 100644
--- a/branches/sca-java-1.4/modules/tracing-aspectj/src/main/resources/META-INF/aop.xml
+++ b/branches/sca-java-1.4/modules/tracing-aspectj/src/main/resources/META-INF/aop.xml
@@ -1,3 +1,21 @@
+<!--
+ * 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.
+-->
<aspectj>
<aspects>