You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by am...@apache.org on 2007/08/13 07:06:04 UTC
svn commit: r565239 [4/5] - in /webservices/axis2/trunk/java: ./
modules/distribution/ modules/distribution/src/main/assembly/
modules/kernel/conf/ modules/rmi/ modules/rmi/src/ modules/rmi/src/org/
modules/rmi/src/org/apache/ modules/rmi/src/org/apach...
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/ExtensionTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/ExtensionTest.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/ExtensionTest.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/ExtensionTest.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.databind;
+
+import org.apache.axis2.rmi.databind.dto.TestClass1;
+import org.apache.axis2.rmi.databind.dto.TestClass10;
+import org.apache.axis2.rmi.metadata.Parameter;
+
+
+public class ExtensionTest extends DataBindTest {
+
+ public void testTestClass101() {
+
+ Class testClass = TestClass10.class;
+ Parameter parameter = new Parameter(testClass, "Param1");
+ TestClass10 testObject = new TestClass10();
+ testObject.setParam1("Test String");
+ TestClass10 result = (TestClass10) getReturnObject(parameter, testObject);
+ assertEquals(result.getParam1(), "Test String");
+ }
+
+ public void testTestClass102() {
+
+ Class testClass = TestClass10.class;
+ Parameter parameter = new Parameter(testClass, "Param1");
+ TestClass10 testObject = new TestClass10();
+ testObject.setParam1(new Integer(5));
+ TestClass10 result = (TestClass10) getReturnObject(parameter, testObject);
+ assertEquals(result.getParam1(), new Integer(5));
+ }
+
+ public void testTestClass103() {
+
+ Class testClass = TestClass10.class;
+ Parameter parameter = new Parameter(testClass, "Param1");
+ TestClass10 testObject = new TestClass10();
+ testObject.setParam2(new Object[]{"test String", new Integer(5)});
+ TestClass10 result = (TestClass10) getReturnObject(parameter, testObject);
+ assertEquals(result.getParam2()[0], "test String");
+ assertEquals(result.getParam2()[1], new Integer(5));
+
+ }
+
+
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/RequestResponseTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/RequestResponseTest.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/RequestResponseTest.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/RequestResponseTest.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,91 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.databind;
+
+import org.apache.axis2.rmi.metadata.Service;
+import org.apache.axis2.rmi.metadata.Operation;
+import org.apache.axis2.rmi.exception.XmlSerializingException;
+import org.apache.axis2.rmi.exception.XmlParsingException;
+import org.apache.axiom.om.util.StAXUtils;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+import javax.xml.stream.XMLStreamReader;
+import java.util.List;
+import java.io.StringWriter;
+import java.io.ByteArrayInputStream;
+
+public class RequestResponseTest extends DataBindTest {
+
+ protected Service service;
+ protected Object serviceObject;
+ protected Class serviceClass;
+
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ this.service = new Service(this.serviceClass,this.configurator);
+ this.service.populateMetaData();
+ this.service.generateWSDL();
+ this.javaObjectSerializer = new JavaObjectSerializer(service.getProcessedTypeMap(),
+ this.service.getConfigurator(),
+ this.service.getSchemaMap());
+ this.xmlStreamParser = new XmlStreamParser(service.getProcessedTypeMap(),
+ this.service.getConfigurator(),
+ this.service.getSchemaMap());
+
+ }
+
+ protected Object[] getInputObject(List inputObjects, Operation operation)
+ throws XMLStreamException, XmlSerializingException, XmlParsingException {
+ StringWriter inputStringWriter = new StringWriter();
+ XMLStreamWriter inputXmlStreamWriter = StAXUtils.createXMLStreamWriter(inputStringWriter);
+ this.javaObjectSerializer.serializeInputElement(inputObjects,
+ operation.getInputElement(),
+ operation.getInputParameters(),
+ inputXmlStreamWriter);
+ inputXmlStreamWriter.flush();
+ String inputXmlString = inputStringWriter.toString();
+
+ System.out.println("input Xml String ==> " + inputXmlString);
+
+ XMLStreamReader xmlReader = StAXUtils.createXMLStreamReader(new ByteArrayInputStream(inputXmlString.getBytes()));
+ Object[] objects = this.xmlStreamParser.getInputParameters(xmlReader, operation);
+ return objects;
+ }
+
+ protected Object getReturnObject(Object returnObject, Operation operation)
+ throws XMLStreamException, XmlSerializingException, XmlParsingException {
+ // get the response xml serializer
+ StringWriter outputStringWriter = new StringWriter();
+ XMLStreamWriter outputXMLStringWriter = StAXUtils.createXMLStreamWriter(outputStringWriter);
+
+ this.javaObjectSerializer.serializeOutputElement(returnObject,
+ operation.getOutPutElement(),
+ operation.getOutputParameter(),
+ outputXMLStringWriter);
+ outputXMLStringWriter.flush();
+ String outputXmlString = outputStringWriter.toString();
+ System.out.println("output Xml String ==> " + outputXmlString);
+
+ XMLStreamReader outputXmlReader =
+ StAXUtils.createXMLStreamReader(new ByteArrayInputStream(outputXmlString.getBytes()));
+
+ return this.xmlStreamParser.getOutputObject(outputXmlReader, operation);
+ }
+
+
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/SimpleArraysTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/SimpleArraysTest.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/SimpleArraysTest.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/SimpleArraysTest.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,139 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.databind;
+
+import org.apache.axis2.rmi.databind.dto.TestClass4;
+import org.apache.axis2.rmi.databind.dto.TestClass8;
+import org.apache.axis2.rmi.metadata.Parameter;
+
+public class SimpleArraysTest extends DataBindTest {
+
+ public void testClass41() {
+ Class testClass = TestClass4.class;
+ Parameter parameter = new Parameter(testClass, "Param1");
+ TestClass4 testObject = new TestClass4();
+ TestClass4 result = (TestClass4) getReturnObject(parameter, testObject);
+ assertEquals(result.getParam1(), null);
+ assertEquals(result.getParam2(), null);
+ assertEquals(result.getParam3(), null);
+ assertEquals(result.getParam4(), null);
+
+ }
+
+ public void testClass42() {
+ Class testClass = TestClass4.class;
+ Parameter parameter = new Parameter(testClass, "Param1");
+ TestClass4 testObject = new TestClass4();
+ testObject.setParam1(new int[]{2, 3});
+ TestClass4 result = (TestClass4) getReturnObject(parameter, testObject);
+ assertEquals(result.getParam1()[0], 2);
+ assertEquals(result.getParam1()[1], 3);
+ assertEquals(result.getParam2(), null);
+ assertEquals(result.getParam3(), null);
+ assertEquals(result.getParam4(), null);
+
+ }
+
+ public void testClass43() {
+ Class testClass = TestClass4.class;
+ Parameter parameter = new Parameter(testClass, "Param1");
+ TestClass4 testObject = new TestClass4();
+ testObject.setParam2(new Integer[]{new Integer(2), new Integer(3), null, new Integer(4)});
+ TestClass4 result = (TestClass4) getReturnObject(parameter, testObject);
+ assertEquals(result.getParam1(), null);
+ assertEquals(result.getParam2()[0], new Integer(2));
+ assertEquals(result.getParam2()[1], new Integer(3));
+ assertEquals(result.getParam2()[2], null);
+ assertEquals(result.getParam2()[3], new Integer(4));
+ assertEquals(result.getParam3(), null);
+ assertEquals(result.getParam4(), null);
+
+ }
+
+ public void testClass432() {
+ Class testClass = TestClass8.class;
+ Parameter parameter = new Parameter(testClass, "Param1");
+ TestClass8 testObject = new TestClass8();
+ testObject.setParam1(new Integer[]{null, null});
+ TestClass8 result = (TestClass8) getReturnObject(parameter, testObject);
+ assertEquals(result.getParam1()[0], null);
+ assertEquals(result.getParam1()[1], null);
+
+ }
+
+ public void testClass433() {
+ Class testClass = TestClass8.class;
+ Parameter parameter = new Parameter(testClass, "Param1");
+ TestClass8 testObject = new TestClass8();
+ TestClass8 result = (TestClass8) getReturnObject(parameter, testObject);
+ assertEquals(result.getParam1(), null);
+ assertEquals(result.getParam2(), null);
+
+ }
+
+
+ public void testClass44() {
+ Class testClass = TestClass4.class;
+ Parameter parameter = new Parameter(testClass, "Param1");
+ TestClass4 testObject = new TestClass4();
+ testObject.setParam3(new String[]{"test String1", null,null, "test String2"});
+ TestClass4 result = (TestClass4) getReturnObject(parameter, testObject);
+ assertEquals(result.getParam1(), null);
+ assertEquals(result.getParam2(), null);
+ assertEquals(result.getParam3()[0], "test String1");
+ assertEquals(result.getParam3()[1], null);
+ assertEquals(result.getParam3()[2], null);
+ assertEquals(result.getParam3()[3], "test String2");
+ assertEquals(result.getParam4(), null);
+
+ }
+
+ public void testClass45() {
+ Class testClass = TestClass4.class;
+ Parameter parameter = new Parameter(testClass, "Param1");
+ TestClass4 testObject = new TestClass4();
+ testObject.setParam4(new float[]{34.5f, 44.5f});
+ TestClass4 result = (TestClass4) getReturnObject(parameter, testObject);
+ assertEquals(result.getParam1(), null);
+ assertEquals(result.getParam2(), null);
+ assertEquals(result.getParam3(), null);
+ assertTrue(result.getParam4()[0] == 34.5);
+ assertTrue(result.getParam4()[1] == 44.5);
+
+ }
+
+ public void testClass46() {
+ Class testClass = TestClass4.class;
+ Parameter parameter = new Parameter(testClass, "Param1");
+ TestClass4 testObject = new TestClass4();
+ testObject.setParam1(new int[]{2, 3});
+ testObject.setParam2(new Integer[]{new Integer(2), new Integer(3)});
+ testObject.setParam3(new String[]{"test String1", "test String2"});
+ testObject.setParam4(new float[]{34.5f, 44.5f});
+ TestClass4 result = (TestClass4) getReturnObject(parameter, testObject);
+ assertEquals(result.getParam1()[0], 2);
+ assertEquals(result.getParam1()[1], 3);
+ assertEquals(result.getParam2()[0], new Integer(2));
+ assertEquals(result.getParam2()[1], new Integer(3));
+ assertEquals(result.getParam3()[0], "test String1");
+ assertEquals(result.getParam3()[1], "test String2");
+ assertTrue(result.getParam4()[0] == 34.5);
+ assertTrue(result.getParam4()[1] == 44.5);
+
+ }
+
+
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/SimpleDataBindTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/SimpleDataBindTest.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/SimpleDataBindTest.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/SimpleDataBindTest.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.databind;
+
+import org.apache.axis2.rmi.databind.dto.TestClass1;
+import org.apache.axis2.rmi.databind.dto.TestClass2;
+import org.apache.axis2.rmi.databind.dto.TestClass3;
+import org.apache.axis2.rmi.metadata.Parameter;
+
+public class SimpleDataBindTest extends DataBindTest {
+
+ public void testTestClass1() {
+
+ Class testClass = TestClass1.class;
+ Parameter parameter = new Parameter(testClass, "Param1");
+ TestClass1 testObject = new TestClass1();
+ TestClass1 result = (TestClass1) getReturnObject(parameter, testObject);
+
+ }
+
+ public void testTestInt() {
+
+ Parameter parameter = new Parameter(int.class, "Param1");
+ Integer result = (Integer) getReturnObject(parameter, new Integer(3));
+ assertEquals(result, new Integer(3));
+
+ }
+
+ public void testTestString() {
+
+ Parameter parameter = new Parameter(String.class, "Param1");
+ String result = (String) getReturnObject(parameter, "test String");
+ assertEquals(result, "test String");
+ result = (String) getReturnObject(parameter, null);
+ assertEquals(result, null);
+
+
+ }
+
+ public void testTestClass2() {
+ Class testClass = TestClass2.class;
+ Parameter parameter = new Parameter(testClass, "Parameter1");
+ TestClass2 testObject = new TestClass2();
+ testObject.setParam1(3);
+ testObject.setParam2(3.45f);
+ testObject.setParam3(4.5678);
+
+ TestClass2 result = (TestClass2) getReturnObject(parameter, testObject);
+ assertEquals(result.getParam1(), 3);
+ assertTrue(result.getParam2() == 3.45f);
+ assertTrue(result.getParam3() == 4.5678);
+
+ }
+
+ public void testTestClass3() {
+ Class testClass = TestClass3.class;
+ Parameter parameter = new Parameter(testClass, "Param1");
+ TestClass3 testObject = new TestClass3();
+
+ testObject.setParam1(new Integer(3));
+ testObject.setParam2(new Float(34.5f));
+ testObject.setParam3(new Double(23.4));
+ testObject.setParam4("test String");
+
+ TestClass3 result;
+ result = (TestClass3) getReturnObject(parameter, testObject);
+ assertEquals(result.getParam1(), new Integer(3));
+ assertEquals(result.getParam2(), new Float(34.5f));
+ assertEquals(result.getParam3(), new Double(23.4));
+ assertEquals(result.getParam4(), "test String");
+
+ testObject = new TestClass3();
+ result = (TestClass3) getReturnObject(parameter, testObject);
+ assertEquals(result.getParam1(), null);
+ assertEquals(result.getParam2(), null);
+ assertEquals(result.getParam3(), null);
+ assertEquals(result.getParam4(), null);
+
+
+ }
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/SimpleRequestResponseTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/SimpleRequestResponseTest.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/SimpleRequestResponseTest.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/SimpleRequestResponseTest.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,207 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.databind;
+
+import org.apache.axis2.rmi.databind.service.Service1;
+import org.apache.axis2.rmi.metadata.Operation;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+public class SimpleRequestResponseTest extends RequestResponseTest {
+
+
+
+ protected void setUp() throws Exception {
+ this.serviceClass = Service1.class;
+ this.serviceObject = new Service1();
+ super.setUp();
+ }
+
+ public void testMethod1() {
+
+ try {
+ // first create service data
+
+ Operation operation = this.service.getOperation("method1");
+ // get objects after serialization and deserialization.
+ // this returned objects mustbe identical with the original array list elements
+ List inputObjects = new ArrayList();
+ Object[] objects = getInputObject(inputObjects, operation);
+
+ Object object = operation.getJavaMethod().invoke(this.serviceObject, objects);
+ Object returnObject = getReturnObject(object, operation);
+
+ assertNull(returnObject);
+ } catch (Exception e) {
+ fail();
+ }
+ }
+
+ public void testMethod2() {
+
+ try {
+ // first create service data
+
+ Operation operation = this.service.getOperation("method2");
+ // get objects after serialization and deserialization.
+ // this returned objects mustbe identical with the original array list elements
+ List inputObjects = new ArrayList();
+ inputObjects.add(new Integer(3));
+ Object[] objects = getInputObject(inputObjects, operation);
+
+ Integer object = (Integer) operation.getJavaMethod().invoke(this.serviceObject, objects);
+ Integer returnObject = (Integer) getReturnObject(object, operation);
+
+ assertEquals(returnObject.intValue(), 3);
+ } catch (Exception e) {
+ fail();
+ }
+ }
+
+ public void testMethod31() {
+
+ try {
+ // first create service data
+
+ Operation operation = this.service.getOperation("method3");
+ // get objects after serialization and deserialization.
+ // this returned objects mustbe identical with the original array list elements
+ List inputObjects = new ArrayList();
+ inputObjects.add(null);
+ Object[] objects = getInputObject(inputObjects, operation);
+
+ Object object = operation.getJavaMethod().invoke(this.serviceObject, objects);
+ Object returnObject = getReturnObject(object, operation);
+
+ assertNull(returnObject);
+ } catch (Exception e) {
+ fail();
+ }
+ }
+
+ public void testMethod32() {
+
+ try {
+ // first create service data
+
+ Operation operation = this.service.getOperation("method3");
+ // get objects after serialization and deserialization.
+ // this returned objects mustbe identical with the original array list elements
+ List inputObjects = new ArrayList();
+ inputObjects.add("test String");
+ Object[] objects = getInputObject(inputObjects, operation);
+
+ String object = (String) operation.getJavaMethod().invoke(this.serviceObject, objects);
+ String returnObject = (String) getReturnObject(object, operation);
+
+ assertEquals(returnObject, "test String");
+ } catch (Exception e) {
+ fail();
+ }
+ }
+
+ public void testMethod41() {
+ try {
+ // first create service data
+
+ Operation operation = this.service.getOperation("method4");
+ // get objects after serialization and deserialization.
+ // this returned objects mustbe identical with the original array list elements
+ List inputObjects = new ArrayList();
+ inputObjects.add(new int[]{2, 3, 5});
+ Object[] objects = getInputObject(inputObjects, operation);
+
+ int[] object = (int[]) operation.getJavaMethod().invoke(this.serviceObject, objects);
+ int[] returnObject = (int[]) getReturnObject(object, operation);
+
+ assertEquals(returnObject[0], 2);
+ assertEquals(returnObject[1], 3);
+ assertEquals(returnObject[2], 5);
+ } catch (Exception e) {
+ fail();
+ }
+ }
+
+ public void testMethod42() {
+ try {
+ // first create service data
+
+ Operation operation = this.service.getOperation("method4");
+ // get objects after serialization and deserialization.
+ // this returned objects mustbe identical with the original array list elements
+ List inputObjects = new ArrayList();
+ inputObjects.add(null);
+ Object[] objects = getInputObject(inputObjects, operation);
+
+ int[] object = (int[]) operation.getJavaMethod().invoke(this.serviceObject, objects);
+ int[] returnObject = (int[]) getReturnObject(object, operation);
+
+ assertNull(returnObject);
+ } catch (Exception e) {
+ fail();
+ }
+ }
+
+ public void testMethod51() {
+ try {
+ // first create service data
+
+ Operation operation = this.service.getOperation("method5");
+ // get objects after serialization and deserialization.
+ // this returned objects mustbe identical with the original array list elements
+ List inputObjects = new ArrayList();
+ inputObjects.add(new String[]{"string1", "string2", "string3"});
+ Object[] objects = getInputObject(inputObjects, operation);
+
+ String[] object = (String[]) operation.getJavaMethod().invoke(this.serviceObject, objects);
+ String[] returnObject = (String[]) getReturnObject(object, operation);
+
+ assertEquals(returnObject[0], "string1");
+ assertEquals(returnObject[1], "string2");
+ assertEquals(returnObject[2], "string3");
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+ public void testMethod52() {
+ try {
+ // first create service data
+
+ Operation operation = this.service.getOperation("method5");
+ // get objects after serialization and deserialization.
+ // this returned objects mustbe identical with the original array list elements
+ List inputObjects = new ArrayList();
+ inputObjects.add(new String[]{null, "string2", null, "string4"});
+ Object[] objects = getInputObject(inputObjects, operation);
+
+ String[] object = (String[]) operation.getJavaMethod().invoke(this.serviceObject, objects);
+ String[] returnObject = (String[]) getReturnObject(object, operation);
+
+ assertEquals(returnObject[0], null);
+ assertEquals(returnObject[1], "string2");
+ assertEquals(returnObject[2], null);
+ assertEquals(returnObject[3], "string4");
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/ChildClass.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/ChildClass.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/ChildClass.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/ChildClass.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.databind.dto;
+
+
+public class ChildClass extends ParentClass{
+
+ private float param3;
+ private double param4;
+
+ public float getParam3() {
+ return param3;
+ }
+
+ public void setParam3(float param3) {
+ this.param3 = param3;
+ }
+
+ public double getParam4() {
+ return param4;
+ }
+
+ public void setParam4(double param4) {
+ this.param4 = param4;
+ }
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/ParentClass.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/ParentClass.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/ParentClass.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/ParentClass.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.databind.dto;
+
+
+public class ParentClass {
+
+ private String param1;
+ private int param2;
+
+ public String getParam1() {
+ return param1;
+ }
+
+ public void setParam1(String param1) {
+ this.param1 = param1;
+ }
+
+ public int getParam2() {
+ return param2;
+ }
+
+ public void setParam2(int param2) {
+ this.param2 = param2;
+ }
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass1.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass1.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass1.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass1.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.databind.dto;
+
+
+public class TestClass1 {
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass10.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass10.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass10.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass10.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.databind.dto;
+
+
+public class TestClass10 {
+
+ private Object param1;
+ private Object[] param2;
+
+ public Object getParam1() {
+ return param1;
+ }
+
+ public void setParam1(Object param1) {
+ this.param1 = param1;
+ }
+
+ public Object[] getParam2() {
+ return param2;
+ }
+
+ public void setParam2(Object[] param2) {
+ this.param2 = param2;
+ }
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass11.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass11.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass11.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass11.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.databind.dto;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Set;
+
+
+public class TestClass11 {
+
+ private List param1;
+ private ArrayList param2;
+ private Set param3;
+
+ public List getParam1() {
+ return param1;
+ }
+
+ public void setParam1(List param1) {
+ this.param1 = param1;
+ }
+
+ public ArrayList getParam2() {
+ return param2;
+ }
+
+ public void setParam2(ArrayList param2) {
+ this.param2 = param2;
+ }
+
+ public Set getParam3() {
+ return param3;
+ }
+
+ public void setParam3(Set param3) {
+ this.param3 = param3;
+ }
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass2.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass2.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass2.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass2.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.databind.dto;
+
+/**
+ * Author: amila
+ * Date: Jul 21, 2007
+ */
+public class TestClass2 {
+
+ private int param1;
+ private float param2;
+ private double param3;
+
+ public int getParam1() {
+ return param1;
+ }
+
+ public void setParam1(int param1) {
+ this.param1 = param1;
+ }
+
+ public float getParam2() {
+ return param2;
+ }
+
+ public void setParam2(float param2) {
+ this.param2 = param2;
+ }
+
+ public double getParam3() {
+ return param3;
+ }
+
+ public void setParam3(double param3) {
+ this.param3 = param3;
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass3.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass3.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass3.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass3.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.databind.dto;
+
+
+public class TestClass3 {
+
+ private Integer param1;
+ private Float param2;
+ private Double param3;
+ private String param4;
+
+ public Integer getParam1() {
+ return param1;
+ }
+
+ public void setParam1(Integer param1) {
+ this.param1 = param1;
+ }
+
+ public Float getParam2() {
+ return param2;
+ }
+
+ public void setParam2(Float param2) {
+ this.param2 = param2;
+ }
+
+ public Double getParam3() {
+ return param3;
+ }
+
+ public void setParam3(Double param3) {
+ this.param3 = param3;
+ }
+
+ public String getParam4() {
+ return param4;
+ }
+
+ public void setParam4(String param4) {
+ this.param4 = param4;
+ }
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass4.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass4.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass4.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass4.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.databind.dto;
+
+public class TestClass4 {
+
+ private int[] param1;
+ private Integer[] param2;
+ private String[] param3;
+ private float[] param4;
+
+ public int[] getParam1() {
+ return param1;
+ }
+
+ public void setParam1(int[] param1) {
+ this.param1 = param1;
+ }
+
+ public Integer[] getParam2() {
+ return param2;
+ }
+
+ public void setParam2(Integer[] param2) {
+ this.param2 = param2;
+ }
+
+ public String[] getParam3() {
+ return param3;
+ }
+
+ public void setParam3(String[] param3) {
+ this.param3 = param3;
+ }
+
+ public float[] getParam4() {
+ return param4;
+ }
+
+ public void setParam4(float[] param4) {
+ this.param4 = param4;
+ }
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass5.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass5.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass5.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass5.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.databind.dto;
+
+public class TestClass5 {
+
+ private TestClass1 param1;
+
+ public TestClass1 getParam1() {
+ return param1;
+ }
+
+ public void setParam1(TestClass1 param1) {
+ this.param1 = param1;
+ }
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass6.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass6.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass6.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass6.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.databind.dto;
+
+
+public class TestClass6 {
+
+ private TestClass2 param1;
+ private String param2;
+ private int param3;
+
+ public TestClass2 getParam1() {
+ return param1;
+ }
+
+ public void setParam1(TestClass2 param1) {
+ this.param1 = param1;
+ }
+
+ public String getParam2() {
+ return param2;
+ }
+
+ public void setParam2(String param2) {
+ this.param2 = param2;
+ }
+
+ public int getParam3() {
+ return param3;
+ }
+
+ public void setParam3(int param3) {
+ this.param3 = param3;
+ }
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass7.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass7.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass7.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass7.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.databind.dto;
+
+public class TestClass7 {
+
+ private TestClass4[] param1;
+ private TestClass3 param2;
+
+ public TestClass4[] getParam1() {
+ return param1;
+ }
+
+ public void setParam1(TestClass4[] param1) {
+ this.param1 = param1;
+ }
+
+ public TestClass3 getParam2() {
+ return param2;
+ }
+
+ public void setParam2(TestClass3 param2) {
+ this.param2 = param2;
+ }
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass8.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass8.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass8.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass8.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.databind.dto;
+
+/**
+ * Author: amila
+ * Date: Jul 28, 2007
+ */
+public class TestClass8 {
+
+ private Integer[] param1;
+ private String[] param2;
+
+ public Integer[] getParam1() {
+ return param1;
+ }
+
+ public void setParam1(Integer[] param1) {
+ this.param1 = param1;
+ }
+
+ public String[] getParam2() {
+ return param2;
+ }
+
+ public void setParam2(String[] param2) {
+ this.param2 = param2;
+ }
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass9.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass9.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass9.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/dto/TestClass9.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.databind.dto;
+
+
+public class TestClass9 {
+
+ private TestClass2[] param1;
+
+ public TestClass2[] getParam1() {
+ return param1;
+ }
+
+ public void setParam1(TestClass2[] param1) {
+ this.param1 = param1;
+ }
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/service/Service1.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/service/Service1.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/service/Service1.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/service/Service1.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.databind.service;
+
+
+public class Service1 {
+
+ public void method1() {
+ System.out.println("method1 invoked");
+ }
+
+ public int method2(int param1) {
+ System.out.println("Got int ==> " + param1);
+ return param1;
+ }
+
+ public String method3(String param1) {
+ System.out.println("Got String ==> " + param1);
+ return param1;
+ }
+
+ public int[] method4(int[] param1) {
+ if (param1 != null) {
+ System.out.println("Got int ==> " + param1.length);
+ } else {
+ System.out.println("Got a null");
+ }
+
+ return param1;
+ }
+
+ public String[] method5(String[] param1) {
+ if (param1 != null) {
+ System.out.println("Got String ==> " + param1.length);
+ } else {
+ System.out.println("Got a null");
+ }
+
+ return param1;
+ }
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/service/Service2.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/service/Service2.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/service/Service2.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/service/Service2.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.databind.service;
+
+import org.apache.axis2.rmi.databind.dto.TestClass1;
+import org.apache.axis2.rmi.databind.dto.TestClass2;
+
+
+public class Service2 {
+
+ public TestClass1 method1(TestClass1 param1){
+ return param1;
+ }
+
+ public TestClass1[] method2(TestClass1[] param1){
+ return param1;
+ }
+
+ public TestClass2 method3(TestClass2 param1){
+ return param1;
+ }
+
+ public TestClass2[] method4(TestClass2[] param1){
+ return param1;
+ }
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/service/Service3.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/service/Service3.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/service/Service3.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/databind/service/Service3.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.databind.service;
+
+import org.apache.axis2.rmi.databind.dto.ParentClass;
+
+
+public class Service3 {
+
+ public ParentClass method1(ParentClass param1){
+ return param1;
+ }
+
+ public Object method2(Object param1){
+ return param1;
+ }
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/BasicServiceTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/BasicServiceTest.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/BasicServiceTest.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/BasicServiceTest.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,114 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.metadata;
+
+import junit.framework.TestCase;
+import org.apache.axis2.rmi.metadata.service.BasicService;
+import org.apache.axis2.rmi.Configurator;
+import org.apache.axis2.rmi.exception.MetaDataPopulateException;
+import org.apache.axis2.rmi.exception.SchemaGenerationException;
+import org.apache.axis2.description.WSDL11ToAxisServiceBuilder;
+import org.w3c.dom.Element;
+import org.w3c.dom.Document;
+
+import javax.wsdl.extensions.ExtensionRegistry;
+import javax.wsdl.extensions.schema.Schema;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.WSDLException;
+import javax.wsdl.Definition;
+import javax.wsdl.Types;
+import javax.wsdl.xml.WSDLWriter;
+import javax.xml.namespace.QName;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.ParserConfigurationException;
+
+import java.io.FileWriter;
+import java.io.IOException;
+
+/**
+ * Author: amila
+ * Date: Jun 24, 2007
+ */
+public class BasicServiceTest extends TestCase {
+
+ public void testPopulateMetaData(){
+
+ try {
+ Configurator configurator = new Configurator();
+ Service service = new Service(BasicService.class,configurator);
+ service.populateMetaData();
+ System.out.println("OK");
+ } catch (MetaDataPopulateException e) {
+ fail();
+ }
+
+ }
+
+ public void testGenerateSchema(){
+ Configurator configurator = new Configurator();
+ Service service = new Service(BasicService.class,configurator);
+ try {
+ service.populateMetaData();
+ service.generateWSDL();
+ Definition definition = service.getWsdlDefinition();
+
+ WSDL11ToAxisServiceBuilder bulder = new WSDL11ToAxisServiceBuilder(definition,null,null);
+ bulder.populateService();
+
+ } catch (MetaDataPopulateException e) {
+ fail();
+ } catch (SchemaGenerationException e) {
+ fail();
+ } catch (IOException e) {
+ fail();
+ }
+ }
+
+ public void testWSDLDefinitionObjects() {
+ try {
+ Definition definition = WSDLFactory.newInstance().newDefinition();
+
+ ExtensionRegistry extensionRegistry =
+ WSDLFactory.newInstance().newPopulatedExtensionRegistry();
+ definition.setExtensionRegistry(extensionRegistry);
+ Schema schema = (Schema) extensionRegistry.createExtension(Types.class,
+ new QName("http://www.w3.org/2001/XMLSchema","schema"));
+ schema.setDocumentBaseURI("urn:test");
+ DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
+ documentBuilderFactory.setNamespaceAware(true);
+
+ DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
+ Document document = documentBuilder.newDocument();
+ Element element = document.createElementNS("http://www.w3.org/2001/XMLSchema","schema");
+ element.setPrefix("tst");
+ schema.setElement(element);
+ schema.setElementType(new QName("http://www.w3.org/2001/XMLSchema","schema"));
+ Types types = definition.createTypes();
+ definition.setTypes(types);
+ definition.getTypes().addExtensibilityElement(schema);
+
+ WSDLWriter wsdlWriter = WSDLFactory.newInstance().newWSDLWriter();
+ wsdlWriter.writeWSDL(definition, System.out);
+ System.out.println("OK");
+ } catch (WSDLException e) {
+ fail();
+ } catch (ParserConfigurationException e) {
+ fail();
+ }
+
+ }
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/ExtensionServiceTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/ExtensionServiceTest.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/ExtensionServiceTest.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/ExtensionServiceTest.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.metadata;
+
+import junit.framework.TestCase;
+import org.apache.axis2.rmi.Configurator;
+import org.apache.axis2.rmi.exception.MetaDataPopulateException;
+import org.apache.axis2.rmi.exception.SchemaGenerationException;
+import org.apache.axis2.rmi.metadata.service.BasicService;
+import org.apache.axis2.rmi.metadata.service.ExtensionService;
+import org.apache.axis2.rmi.metadata.service.dto.ChildClass2;
+import org.apache.axis2.description.WSDL11ToAxisServiceBuilder;
+
+import javax.wsdl.Definition;
+import javax.wsdl.WSDLException;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLWriter;
+import java.io.FileWriter;
+import java.io.IOException;
+
+
+public class ExtensionServiceTest extends TestCase {
+
+ public void testGenerateSchema() {
+ Configurator configurator = new Configurator();
+ configurator.addExtension(ChildClass2.class);
+ Service service = new Service(ExtensionService.class, configurator);
+ try {
+ service.populateMetaData();
+ service.generateWSDL();
+ Definition definition = service.getWsdlDefinition();
+
+ WSDL11ToAxisServiceBuilder bulder = new WSDL11ToAxisServiceBuilder(definition, null, null);
+ bulder.populateService();
+
+ } catch (MetaDataPopulateException e) {
+ fail();
+ } catch (SchemaGenerationException e) {
+ fail();
+ } catch (IOException e) {
+ fail();
+ }
+ }
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/FaultServiceTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/FaultServiceTest.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/FaultServiceTest.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/FaultServiceTest.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.metadata;
+
+import junit.framework.TestCase;
+import org.apache.axis2.rmi.Configurator;
+import org.apache.axis2.rmi.exception.MetaDataPopulateException;
+import org.apache.axis2.rmi.exception.SchemaGenerationException;
+import org.apache.axis2.rmi.metadata.service.FaultService;
+import org.apache.axis2.description.WSDL11ToAxisServiceBuilder;
+
+import javax.wsdl.Definition;
+import javax.wsdl.WSDLException;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLWriter;
+import java.io.FileWriter;
+import java.io.IOException;
+
+
+public class FaultServiceTest extends TestCase {
+
+ public void testGenerateSchema() {
+ Configurator configurator = new Configurator();
+ Service service = new Service(FaultService.class, configurator);
+ try {
+ service.populateMetaData();
+ service.generateWSDL();
+ Definition definition = service.getWsdlDefinition();
+
+ WSDL11ToAxisServiceBuilder bulder = new WSDL11ToAxisServiceBuilder(definition, null, null);
+ bulder.populateService();
+
+ } catch (MetaDataPopulateException e) {
+ fail();
+ } catch (SchemaGenerationException e) {
+ fail();
+ } catch (IOException e) {
+ fail();
+ }
+ }
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/TestReflection.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/TestReflection.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/TestReflection.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/TestReflection.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.metadata;
+
+import junit.framework.TestCase;
+import org.apache.axis2.rmi.metadata.service.BasicService;
+
+import java.lang.reflect.Method;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Constructor;
+
+
+public class TestReflection extends TestCase {
+
+ public void testInvoke(){
+ Class basicServiceClass = BasicService.class;
+
+ try {
+ Method method2 = basicServiceClass.getMethod("method2",new Class[]{int.class});
+ Object basicService = basicServiceClass.newInstance();
+
+ method2.invoke(basicService,new Object[]{new Integer(1)});
+ System.out.println("OK");
+
+ Class integerClass = Integer.class;
+ Constructor constructor = integerClass.getConstructor(new Class[]{String.class});
+ Object integerObject = constructor.newInstance(new Object[]{"5"});
+ Object integer = integerClass.newInstance();
+ } catch (NoSuchMethodException e) {
+ fail();
+ } catch (IllegalAccessException e) {
+ fail();
+ } catch (InstantiationException e) {
+ fail();
+ } catch (InvocationTargetException e) {
+ fail();
+ }
+ }
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/TypeTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/TypeTest.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/TypeTest.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/TypeTest.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.metadata;
+
+import org.apache.axis2.rmi.metadata.service.dto.ChildClass;
+import org.apache.axis2.rmi.Configurator;
+import org.apache.axis2.rmi.exception.MetaDataPopulateException;
+
+import java.util.Map;
+import java.util.HashMap;
+
+import junit.framework.TestCase;
+
+
+public class TypeTest extends TestCase {
+
+ public void testChildClass() {
+
+ Configurator configurator = new Configurator();
+ Map processedTypeMap = new HashMap();
+
+ Type type = new Type(ChildClass.class);
+ try {
+ type.populateMetaData(configurator,processedTypeMap);
+ } catch (MetaDataPopulateException e) {
+ fail();
+ }
+ }
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/BasicService.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/BasicService.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/BasicService.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/BasicService.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.metadata.service;
+
+import org.apache.axis2.rmi.metadata.service.dto.ComplexType1;
+
+public class BasicService {
+
+ public void method1() {
+
+ }
+
+ public void method2(int param1) {
+ System.out.println("Ivoked with " + param1);
+ }
+
+ public void method3(String param1) {
+
+ }
+
+ public void method4(ComplexType1 complexType1) {
+
+ }
+
+ public int method5(int param1) {
+ return 1;
+ }
+
+ public String method6(String param1) {
+ return "";
+ }
+
+ public ComplexType1 method7(ComplexType1 complexType1) {
+ return new ComplexType1();
+ }
+
+ public int[] method8(int[] param1) {
+ return new int[0];
+ }
+
+ public String[] method9(String[] param1) {
+ return new String[0];
+ }
+
+ public ComplexType1[] method10(ComplexType1[] complexType1) {
+ return new ComplexType1[0];
+ }
+
+ public void method11(int param1, String param2, ComplexType1 complexType1) {
+
+ }
+
+ public void method12(int[] param1, String[] param2, ComplexType1[] complexType1) {
+
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/ExtensionService.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/ExtensionService.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/ExtensionService.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/ExtensionService.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.metadata.service;
+
+import org.apache.axis2.rmi.metadata.service.dto.ChildClass;
+import org.apache.axis2.rmi.metadata.service.dto.ParentClass;
+
+
+public class ExtensionService {
+
+ public Object method1(Object param1) {
+ return param1;
+ }
+
+ public ParentClass method2(ParentClass param1) {
+ return param1;
+ }
+
+ public ChildClass method3(ChildClass param1) {
+ return param1;
+ }
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/FaultService.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/FaultService.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/FaultService.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/FaultService.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.metadata.service;
+
+import org.apache.axis2.rmi.metadata.service.exception.Exception1;
+import org.apache.axis2.rmi.metadata.service.exception.Exception2;
+import org.apache.axis2.rmi.metadata.service.exception.Exception3;
+import org.apache.axis2.rmi.metadata.service.exception.Exception4;
+
+
+public class FaultService {
+
+ public void method1()
+ throws Exception1 {
+ throw new Exception1();
+ }
+
+ public String method2(String param1)
+ throws Exception2 {
+ throw new Exception2();
+ }
+
+ public int method3(int param1)
+ throws Exception1, Exception2 {
+ throw new Exception1();
+ }
+
+ public void method4(int param1)
+ throws Exception1, Exception2, Exception3, Exception4 {
+ throw new Exception3();
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/dto/ChildClass.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/dto/ChildClass.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/dto/ChildClass.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/dto/ChildClass.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.metadata.service.dto;
+
+
+public class ChildClass extends ParentClass {
+
+ private Integer param3;
+ private String param4;
+
+ public Integer getParam3() {
+ return param3;
+ }
+
+ public void setParam3(Integer param3) {
+ this.param3 = param3;
+ }
+
+ public String getParam4() {
+ return param4;
+ }
+
+ public void setParam4(String param4) {
+ this.param4 = param4;
+ }
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/dto/ChildClass2.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/dto/ChildClass2.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/dto/ChildClass2.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/dto/ChildClass2.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.metadata.service.dto;
+
+
+public class ChildClass2 extends ParentClass {
+
+ private String param3;
+ private String param4;
+
+ public String getParam3() {
+ return param3;
+ }
+
+ public void setParam3(String param3) {
+ this.param3 = param3;
+ }
+
+ public String getParam4() {
+ return param4;
+ }
+
+ public void setParam4(String param4) {
+ this.param4 = param4;
+ }
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/dto/ComplexType1.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/dto/ComplexType1.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/dto/ComplexType1.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/dto/ComplexType1.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.metadata.service.dto;
+
+
+public class ComplexType1 {
+
+ private int param1;
+ private String param2;
+ private ComplexType2 param3;
+ private int[] param4;
+ private String[] param5;
+ private ComplexType2[] param6;
+
+ public int getParam1() {
+ return param1;
+ }
+
+ public void setParam1(int param1) {
+ this.param1 = param1;
+ }
+
+ public String getParam2() {
+ return param2;
+ }
+
+ public void setParam2(String param2) {
+ this.param2 = param2;
+ }
+
+ public ComplexType2 getParam3() {
+ return param3;
+ }
+
+ public void setParam3(ComplexType2 param3) {
+ this.param3 = param3;
+ }
+
+ public int[] getParam4() {
+ return param4;
+ }
+
+ public void setParam4(int[] param4) {
+ this.param4 = param4;
+ }
+
+ public String[] getParam5() {
+ return param5;
+ }
+
+ public void setParam5(String[] param5) {
+ this.param5 = param5;
+ }
+
+ public ComplexType2[] getParam6() {
+ return param6;
+ }
+
+ public void setParam6(ComplexType2[] param6) {
+ this.param6 = param6;
+ }
+
+
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/dto/ComplexType2.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/dto/ComplexType2.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/dto/ComplexType2.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/dto/ComplexType2.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.metadata.service.dto;
+
+public class ComplexType2 {
+
+ private int param1;
+ private String param2;
+ private int[] param3;
+ private String[] param4;
+ private ComplexType2 param5;
+ private ComplexType2[] param6;
+
+ public int getParam1() {
+ return param1;
+ }
+
+ public void setParam1(int param1) {
+ this.param1 = param1;
+ }
+
+ public String getParam2() {
+ return param2;
+ }
+
+ public void setParam2(String param2) {
+ this.param2 = param2;
+ }
+
+ public int[] getParam3() {
+ return param3;
+ }
+
+ public void setParam3(int[] param3) {
+ this.param3 = param3;
+ }
+
+ public String[] getParam4() {
+ return param4;
+ }
+
+ public void setParam4(String[] param4) {
+ this.param4 = param4;
+ }
+
+ public ComplexType2 getParam5() {
+ return param5;
+ }
+
+ public void setParam5(ComplexType2 param5) {
+ this.param5 = param5;
+ }
+
+ public ComplexType2[] getParam6() {
+ return param6;
+ }
+
+ public void setParam6(ComplexType2[] param6) {
+ this.param6 = param6;
+ }
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/dto/ParentClass.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/dto/ParentClass.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/dto/ParentClass.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/dto/ParentClass.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.metadata.service.dto;
+
+
+public class ParentClass {
+
+ private int param1;
+ private String param2;
+
+ public int getParam1() {
+ return param1;
+ }
+
+ public void setParam1(int param1) {
+ this.param1 = param1;
+ }
+
+ public String getParam2() {
+ return param2;
+ }
+
+ public void setParam2(String param2) {
+ this.param2 = param2;
+ }
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/exception/Exception1.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/exception/Exception1.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/exception/Exception1.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/exception/Exception1.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.metadata.service.exception;
+
+
+public class Exception1 extends Exception {
+
+ public Exception1() {
+ }
+
+ public Exception1(String message) {
+ super(message);
+ }
+
+ public Exception1(Throwable cause) {
+ super(cause);
+ }
+
+ public Exception1(String message, Throwable cause) {
+ super(message, cause);
+ }
+}
Added: webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/exception/Exception2.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/exception/Exception2.java?view=auto&rev=565239
==============================================================================
--- webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/exception/Exception2.java (added)
+++ webservices/axis2/trunk/java/modules/rmi/test/org/apache/axis2/rmi/metadata/service/exception/Exception2.java Sun Aug 12 22:05:58 2007
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.rmi.metadata.service.exception;
+
+
+public class Exception2 extends Exception{
+
+ public Exception2() {
+ }
+
+ public Exception2(String message) {
+ super(message);
+ }
+
+ public Exception2(Throwable cause) {
+ super(cause);
+ }
+
+ public Exception2(String message, Throwable cause) {
+ super(message, cause);
+ }
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org