From b771a05508db61cb1748d2fed0eb92daf173ff92 Mon Sep 17 00:00:00 2001 From: rsivaram Date: Thu, 16 Oct 2008 11:51:49 +0000 Subject: Copy modules for event prototype git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@705212 13f79535-47bb-0310-9956-ffa450edef68 --- .../testing/servants/ArraysSetterServant.java | 89 ++++++++++++++++++++++ .../testing/servants/ArraysUnionsServant.java | 42 ++++++++++ .../servants/ArraysUnionsTuscanyServant.java | 43 +++++++++++ .../corba/testing/servants/CalcServant.java | 52 +++++++++++++ .../corba/testing/servants/DummyObjectServant.java | 42 ++++++++++ .../corba/testing/servants/EnumManagerServant.java | 33 ++++++++ .../testing/servants/InvalidTestObjectServant.java | 24 ++++++ .../testing/servants/InvalidTypesServant.java | 34 +++++++++ .../corba/testing/servants/NonCorbaServant.java | 36 +++++++++ .../testing/servants/ObjectManagerServant.java | 37 +++++++++ .../testing/servants/PrimitivesSetterServant.java | 89 ++++++++++++++++++++++ .../corba/testing/servants/TestObjectServant.java | 71 +++++++++++++++++ 12 files changed, 592 insertions(+) create mode 100644 sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/ArraysSetterServant.java create mode 100644 sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/ArraysUnionsServant.java create mode 100644 sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/ArraysUnionsTuscanyServant.java create mode 100644 sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/CalcServant.java create mode 100644 sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/DummyObjectServant.java create mode 100644 sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/EnumManagerServant.java create mode 100644 sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/InvalidTestObjectServant.java create mode 100644 sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/InvalidTypesServant.java create mode 100644 sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/NonCorbaServant.java create mode 100644 sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/ObjectManagerServant.java create mode 100644 sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/PrimitivesSetterServant.java create mode 100644 sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/TestObjectServant.java (limited to 'sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants') diff --git a/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/ArraysSetterServant.java b/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/ArraysSetterServant.java new file mode 100644 index 0000000000..0aec4d278d --- /dev/null +++ b/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/ArraysSetterServant.java @@ -0,0 +1,89 @@ +/* + * 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.servants; + +import org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject; +import org.apache.tuscany.sca.binding.corba.testing.generated._ArraysSetterImplBase; + +public class ArraysSetterServant extends _ArraysSetterImplBase { + + private static final long serialVersionUID = 1L; + + public boolean[] setBoolean(boolean[] arg) { + return arg; + } + + public char[] setChar(char[] arg) { + return arg; + } + + public double[] setDouble(double[] arg) { + return arg; + } + + public float[] setFloat(float[] arg) { + return arg; + } + + public int[] setLong(int[] arg) { + return arg; + } + + public long[] setLongLong(long[] arg) { + return arg; + } + + public byte[] setOctet(byte[] arg) { + return arg; + } + + public RemoteObject[] setRemoteObject(RemoteObject[] obj) { + return obj; + } + + public short[] setShort(short[] arg) { + return arg; + } + + public String[] setString(String[] arg) { + return arg; + } + + public int[] setUnsignedLong(int[] arg) { + return arg; + } + + public long[] setUnsignedLongLong(long[] arg) { + return arg; + } + + public short[] setUnsignedShort(short[] arg) { + return arg; + } + + public char[] setWchar(char[] arg) { + return arg; + } + + public String[] setWstring(String[] arg) { + return arg; + } + +} diff --git a/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/ArraysUnionsServant.java b/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/ArraysUnionsServant.java new file mode 100644 index 0000000000..d9bde48a5a --- /dev/null +++ b/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/ArraysUnionsServant.java @@ -0,0 +1,42 @@ +/* + * 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.servants; + +import org.apache.tuscany.sca.binding.corba.testing.arrays_unions.RichUnion; +import org.apache.tuscany.sca.binding.corba.testing.arrays_unions.TestStruct; +import org.apache.tuscany.sca.binding.corba.testing.arrays_unions._ArraysUnionsTestsImplBase; + +public class ArraysUnionsServant extends _ArraysUnionsTestsImplBase { + + private static final long serialVersionUID = 1L; + + public TestStruct passTestStruct(TestStruct arg) { + return arg; + } + + public String[][] passStringArray(String[][] arg) { + return arg; + } + + public RichUnion passRichUnion(RichUnion arg) { + return arg; + } + +} diff --git a/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/ArraysUnionsTuscanyServant.java b/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/ArraysUnionsTuscanyServant.java new file mode 100644 index 0000000000..cd78588363 --- /dev/null +++ b/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/ArraysUnionsTuscanyServant.java @@ -0,0 +1,43 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.binding.corba.testing.servants; + +import org.apache.tuscany.sca.binding.corba.meta.CorbaArray; +import org.apache.tuscany.sca.binding.corba.testing.hierarchy.ArraysTestStruct; +import org.apache.tuscany.sca.binding.corba.testing.hierarchy.RichUnion; + +public class ArraysUnionsTuscanyServant { + + private static final long serialVersionUID = 1L; + + public ArraysTestStruct passTestStruct(ArraysTestStruct arg) { + return arg; + } + + @CorbaArray( {2, 2}) + public String[][] passStringArray(@CorbaArray( {2, 2})String[][] arg) { + return arg; + } + + public RichUnion passRichUnion(RichUnion arg) { + return arg; + } + +} diff --git a/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/CalcServant.java b/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/CalcServant.java new file mode 100644 index 0000000000..fd789e19cb --- /dev/null +++ b/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/CalcServant.java @@ -0,0 +1,52 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.binding.corba.testing.servants; + +import org.apache.tuscany.sca.binding.corba.testing.exceptions._CalcImplBase; +import org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.Arguments; +import org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZero; +import org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupported; + +public class CalcServant extends _CalcImplBase { + + private static final long serialVersionUID = 1L; + + public double div(double arg1, double arg2) throws DivByZero { + if (arg2 == 0) { + DivByZero exception = new DivByZero(); + exception.arguments = new Arguments(arg1, arg2); + exception.info = "Error occured during div: div by zero"; + throw exception; + } else { + return arg1 / arg2; + } + } + + public double divForSmallArgs(double arg1, double arg2) throws DivByZero, NotSupported { + if (arg1 > 100 || arg2 > 100) { + NotSupported exception = new NotSupported(); + exception.info = "arg1: " + arg1 + ", arg2: " + arg2; + throw exception; + } else { + return div(arg1, arg2); + } + } + +} diff --git a/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/DummyObjectServant.java b/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/DummyObjectServant.java new file mode 100644 index 0000000000..2e205f1d0f --- /dev/null +++ b/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/DummyObjectServant.java @@ -0,0 +1,42 @@ +/* + * 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.servants; + +import org.apache.tuscany.sca.binding.corba.testing.references.DummyObject; +import org.apache.tuscany.sca.binding.corba.testing.references._DummyObjectImplBase; + +public class DummyObjectServant extends _DummyObjectImplBase { + + private static final long serialVersionUID = 1L; + private int retVal; + + public DummyObjectServant() { + retVal = (int)System.currentTimeMillis(); + } + + public int getLong() { + return retVal; + } + + public DummyObject cloneObject() { + return new DummyObjectServant(); + } + +} diff --git a/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/EnumManagerServant.java b/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/EnumManagerServant.java new file mode 100644 index 0000000000..52386aeef7 --- /dev/null +++ b/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/EnumManagerServant.java @@ -0,0 +1,33 @@ +/* + * 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.servants; + +import org.apache.tuscany.sca.binding.corba.testing.enums.Color; +import org.apache.tuscany.sca.binding.corba.testing.enums._EnumManagerImplBase; + +public class EnumManagerServant extends _EnumManagerImplBase { + + private static final long serialVersionUID = 1L; + + public Color getColor(Color color) { + return color; + } + +} diff --git a/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/InvalidTestObjectServant.java b/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/InvalidTestObjectServant.java new file mode 100644 index 0000000000..b7fbb69627 --- /dev/null +++ b/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/InvalidTestObjectServant.java @@ -0,0 +1,24 @@ +/* + * 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.servants; + +public class InvalidTestObjectServant { + +} diff --git a/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/InvalidTypesServant.java b/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/InvalidTypesServant.java new file mode 100644 index 0000000000..dda8203f79 --- /dev/null +++ b/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/InvalidTypesServant.java @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.tuscany.sca.binding.corba.testing.servants; + +import org.apache.tuscany.sca.binding.corba.testing.hierarchy.InvalidStruct1; + +public class InvalidTypesServant { + + public InvalidStruct1 firstMethodWithInvalidArg() { + return null; + } + + public void secondMethodWithInvalidArg(InvalidStruct1 arg) { + + } + +} diff --git a/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/NonCorbaServant.java b/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/NonCorbaServant.java new file mode 100644 index 0000000000..20700a0392 --- /dev/null +++ b/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/NonCorbaServant.java @@ -0,0 +1,36 @@ +/* + * 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.servants; + +import org.apache.tuscany.sca.binding.corba.testing.hierarchy.NonCorbaException; + +public class NonCorbaServant { + + public String setString(String arg) { + return arg; + } + + public void throwException() throws NonCorbaException { + NonCorbaException e = new NonCorbaException(); + e.someField = "test"; + throw e; + } + +} diff --git a/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/ObjectManagerServant.java b/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/ObjectManagerServant.java new file mode 100644 index 0000000000..213c7fbd7c --- /dev/null +++ b/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/ObjectManagerServant.java @@ -0,0 +1,37 @@ +/* + * 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.servants; + +import org.apache.tuscany.sca.binding.corba.testing.references.DummyObject; +import org.apache.tuscany.sca.binding.corba.testing.references._ObjectManagerImplBase; + +public class ObjectManagerServant extends _ObjectManagerImplBase { + + private static final long serialVersionUID = 1L; + + public DummyObject getObjectByArgument(DummyObject arg) { + return arg; + } + + public DummyObject getDummyObject() { + return new DummyObjectServant(); + } + +} diff --git a/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/PrimitivesSetterServant.java b/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/PrimitivesSetterServant.java new file mode 100644 index 0000000000..92e18741ae --- /dev/null +++ b/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/PrimitivesSetterServant.java @@ -0,0 +1,89 @@ +/* + * 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.servants; + +import org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject; +import org.apache.tuscany.sca.binding.corba.testing.generated._PrimitivesSetterImplBase; + +public class PrimitivesSetterServant extends _PrimitivesSetterImplBase { + + private static final long serialVersionUID = 1L; + + public boolean setBoolean(boolean arg) { + return arg; + } + + public char setChar(char arg) { + return arg; + } + + public double setDouble(double arg) { + return arg; + } + + public float setFloat(float arg) { + return arg; + } + + public int setLong(int arg) { + return arg; + } + + public long setLongLong(long arg) { + return arg; + } + + public byte setOctet(byte arg) { + return arg; + } + + public RemoteObject setRemoteObject(RemoteObject obj) { + return obj; + } + + public short setShort(short arg) { + return arg; + } + + public String setString(String arg) { + return arg; + } + + public int setUnsignedLong(int arg) { + return arg; + } + + public long setUnsignedLongLong(long arg) { + return arg; + } + + public short setUnsignedShort(short arg) { + return arg; + } + + public char setWchar(char arg) { + return arg; + } + + public String setWstring(String arg) { + return arg; + } + +} diff --git a/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/TestObjectServant.java b/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/TestObjectServant.java new file mode 100644 index 0000000000..153268983f --- /dev/null +++ b/sandbox/event/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/TestObjectServant.java @@ -0,0 +1,71 @@ +/* + * 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.servants; + +import org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStruct; +import org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHolder; +import org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct; +import org.apache.tuscany.sca.binding.corba.testing.generated._TestObjectImplBase; +import org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Holder; +import org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Holder; +import org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Holder; + +/** + * @version $Rev$ $Date$ + */ +public class TestObjectServant extends _TestObjectImplBase { + + private static final long serialVersionUID = 1L; + + public int[] setLongSeq1(long_seq1Holder arg) { + return arg.value; + } + + public int[][] setLongSeq2(long_seq2Holder arg) { + + return arg.value; + } + + public int[][][] setLongSeq3(long_seq3Holder arg) { + return arg.value; + } + + public SimpleStruct setSimpleStruct(SimpleStructHolder arg) { + return arg.value; + } + + public SomeStruct setStruct(SomeStruct arg) { + return arg; + } + + public SomeStruct pickStructFromArgs(SomeStruct arg1, SomeStruct arg2, SomeStruct arg3, int structNumber) { + switch (structNumber) { + case 1: + return arg1; + case 2: + return arg2; + case 3: + return arg3; + default: + return arg1; + } + } + +} -- cgit v1.2.3