/**
* Tests passing multiple complex attributes.
*/
@Test
public void test_TestObject_pickStructFromArgs() {
SomeStruct arg1 = new SomeStruct();
SomeStruct arg2 = new SomeStruct();
SomeStruct arg3 = new SomeStruct();
SimpleStruct inner = new SimpleStruct();
inner.field1 = TestConstants.STR_1;
inner.field2 = TestConstants.INT_1;
arg1.innerStruct = inner;
arg2.innerStruct = inner;
arg3.innerStruct = inner;
arg1.str = TestConstants.STR_1;
arg2.str = TestConstants.STR_2;
arg3.str = TestConstants.STR_3;
arg1.str_list = TestConstants.STR_ARR_1;
arg2.str_list = TestConstants.STR_ARR_2;
arg3.str_list = TestConstants.STR_ARR_2;
arg1.threeDimSeq = TestConstants.INT_ARRAY_3_DIM;
arg2.threeDimSeq = TestConstants.INT_ARRAY_3_DIM;
arg3.threeDimSeq = TestConstants.INT_ARRAY_3_DIM;
arg1.twoDimSeq = TestConstants.INT_ARRAY_2_DIM;
arg2.twoDimSeq = TestConstants.INT_ARRAY_2_DIM;
arg3.twoDimSeq = TestConstants.INT_ARRAY_2_DIM;
DynaCorbaRequest request = new DynaCorbaRequest(refTestObject, "pickStructFromArgs");
try {
request.setOutputType(SomeStruct.class);
request.addArgument(arg1);
request.addArgument(arg2);
request.addArgument(arg3);
request.addArgument(1);
DynaCorbaResponse response = request.invoke();
SomeStruct result = (SomeStruct)response.getContent();
// just make sure that servant returned right structure
assertTrue(result.str.equals(TestConstants.STR_1));
} catch (Exception e) {
fail("Exception occured during tests " + e);