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 de...@apache.org on 2007/06/13 19:59:31 UTC

svn commit: r546981 - in /webservices/axis2/trunk/java/modules: adb/src/org/apache/axis2/databinding/typemapping/ adb/src/org/apache/axis2/databinding/utils/ integration/ integration/test-resources/ComplexDataTypes/ integration/test/org/apache/axis2/rp...

Author: deepal
Date: Wed Jun 13 10:59:30 2007
New Revision: 546981

URL: http://svn.apache.org/viewvc?view=rev&rev=546981
Log:
fixing AXIS2-2744
 - after more than 2 days I was able to get the test cases working 
-  I did not have much  of changing the RPC code , but I had to change the service class. Since some of them were not valid according to the Bean Inspector 
- Dims please check whether I have done any thing wrong. 

Added:
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/complex/
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesComplexDataTypesSOAP11Test.java
Modified:
    webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java
    webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
    webservices/axis2/trunk/java/modules/integration/maven.xml
    webservices/axis2/trunk/java/modules/integration/test-resources/ComplexDataTypes/ComplexDataTypes.wsdl
    webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfint.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/ServiceClient.java

Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java?view=diff&rev=546981&r1=546980&r2=546981
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java Wed Jun 13 10:59:30 2007
@@ -72,11 +72,10 @@
     public static Object getSimpleTypeObject(Class parameter, OMElement value) {
         String name = parameter.getName();
         String text = value.getText();
-
-        if (text == null || text.length() == 0) {
-            return null;
-        } else if (name.equals(STRING)) {
+        if(name.equals(STRING)) {
             return text;
+        } else  if (text == null || text.length() == 0) {
+            return null;
         } else if (name.equals(INT)) {
             return new Integer(text);
         } else if (name.equals(BOOLEAN)) {

Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java?view=diff&rev=546981&r1=546980&r2=546981
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java Wed Jun 13 10:59:30 2007
@@ -366,6 +366,8 @@
             } else {
                 if (SimpleTypeMapper.isSimpleType(beanClass)) {
                     return SimpleTypeMapper.getSimpleTypeObject(beanClass, beanElement);
+                } else if ("java.lang.Object".equals(beanClass.getName())){
+                    return beanElement.getFirstOMChild();
                 }
                 HashMap properties = new HashMap();
                 BeanInfo beanInfo = Introspector.getBeanInfo(beanClass);
@@ -694,7 +696,11 @@
         for (int i = 0; i < args.length; i++) {
             Object arg = args[i];
             if (arg == null) {
-                objects.add("item" + i);
+                if (partName == null) {
+                    objects.add("item" + argCount);
+                } else {
+                    objects.add(partName);
+                }
                 objects.add(arg);
                 continue;
             }

Modified: webservices/axis2/trunk/java/modules/integration/maven.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/maven.xml?view=diff&rev=546981&r1=546980&r2=546981
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/maven.xml (original)
+++ webservices/axis2/trunk/java/modules/integration/maven.xml Wed Jun 13 10:59:30 2007
@@ -24,6 +24,23 @@
         <!-- make the dirs -->
         <mkdir dir="${wsdl.output.base.dir}"/>
 
+        <ant:echo>Compiling ComplexDataTypes.wsdl</ant:echo>
+        <mkdir dir="${wsdl.output.base.dir}/complexdatatype"/>
+        <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
+            <jvmarg line="${maven.junit.jvmargs}"/>
+            <classpath refid="maven.dependency.classpath"/>
+            <classpath location="${compiled.classes.dir}"/>
+            <arg line="-o target/wsdl/complexdatatype -s -u -uw -uri test-resources/ComplexDataTypes/ComplexDataTypes.wsdl"/>
+        </java>
+        <javac destdir="target/classes" debug="on">
+            <jvmarg line="${maven.junit.jvmargs}"/>
+            <classpath refid="maven.dependency.classpath"/>
+            <classpath location="${compiled.classes.dir}"/>
+            <src path="target/wsdl/complexdatatype"/>
+        </javac>
+
+
+
         <ant:echo>Compiling DocumentUnwrappingTest.wsdl </ant:echo>
         <mkdir dir="${wsdl.output.base.dir}/documentunwrapping"/>
         <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">

Modified: webservices/axis2/trunk/java/modules/integration/test-resources/ComplexDataTypes/ComplexDataTypes.wsdl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test-resources/ComplexDataTypes/ComplexDataTypes.wsdl?view=diff&rev=546981&r1=546980&r2=546981
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/ComplexDataTypes/ComplexDataTypes.wsdl (original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/ComplexDataTypes/ComplexDataTypes.wsdl Wed Jun 13 10:59:30 2007
@@ -77,7 +77,7 @@
             <xs:element name="ArrayOfint" type="ax22:ArrayOfint"/>
             <xs:complexType name="ArrayOfint">
                 <xs:sequence>
-                    <xs:element maxOccurs="unbounded" minOccurs="0" name="int"
+                    <xs:element maxOccurs="unbounded" minOccurs="0" name="_int"
                                 nillable="true" type="xs:int"/>
                 </xs:sequence>
             </xs:complexType>

Added: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesComplexDataTypesSOAP11Test.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesComplexDataTypesSOAP11Test.java?view=auto&rev=546981
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesComplexDataTypesSOAP11Test.java (added)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/complex/ComplexDataTypesComplexDataTypesSOAP11Test.java Wed Jun 13 10:59:30 2007
@@ -0,0 +1,591 @@
+/**
+ * ComplexDataTypesComplexDataTypesSOAP11Test.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis2 version: SNAPSHOT May 30, 2007 (11:56:02 EDT)
+ */
+package org.apache.axis2.rpc.complex;
+
+import org.apache.axiom.attachments.ByteArrayDataSource;
+import org.apache.axiom.attachments.utils.IOUtils;
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axis2.integration.UtilServerBasedTestCase;
+import org.apache.axis2.integration.UtilServer;
+import org.apache.axis2.description.AxisService;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.engine.AxisConfiguration;
+import org.tempuri.complex.data.arrays.xsd.ArrayOfArrayOfstring;
+import org.tempuri.complex.data.arrays.xsd.ArrayOfNullableOfdateTime;
+import org.tempuri.complex.data.arrays.xsd.ArrayOfNullableOfdecimal;
+import org.tempuri.complex.data.arrays.xsd.ArrayOfPerson;
+import org.tempuri.complex.data.arrays.xsd.ArrayOfanyType;
+import org.tempuri.complex.data.arrays.xsd.ArrayOfint;
+import org.tempuri.complex.data.arrays.xsd.ArrayOfshort;
+import org.tempuri.complex.data.arrays.xsd.ArrayOfstring;
+import org.tempuri.complex.data.xsd.*;
+
+import javax.activation.DataHandler;
+import javax.xml.namespace.QName;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.util.Calendar;
+import java.util.Arrays;
+import java.rmi.RemoteException;
+
+import junit.framework.TestCase;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+
+
+public class ComplexDataTypesComplexDataTypesSOAP11Test extends UtilServerBasedTestCase {
+
+ protected EndpointReference targetEPR;
+    protected QName serviceName = new QName("ComplexDataTypes");
+
+    protected AxisConfiguration axisConfiguration;
+
+    protected boolean finish = false;
+    org.tempuri.complex.ComplexDataTypesComplexDataTypesSOAP11Port_httpStub stub;
+
+    public ComplexDataTypesComplexDataTypesSOAP11Test() {
+        super(ComplexDataTypesComplexDataTypesSOAP11Test.class.getName());
+    }
+
+    public ComplexDataTypesComplexDataTypesSOAP11Test(String testName) {
+        super(testName);
+    }
+
+    public static Test suite() {
+        return getTestSetup(new TestSuite(ComplexDataTypesComplexDataTypesSOAP11Test.class));
+    }
+
+
+    protected void setUp() throws Exception {
+        String className = "org.tempuri.complex.ComplexDataTypes";
+        UtilServer.start();
+        AxisService   service = AxisService.createService(
+                className, UtilServer.getConfigurationContext().getAxisConfiguration());
+        service.setElementFormDefault(true);
+        service.setName("ComplexDataTypes");
+        service.setClassLoader(Thread.currentThread().getContextClassLoader());
+
+        UtilServer.deployService(service);
+         targetEPR =
+                new EndpointReference("http://127.0.0.1:"
+                        + (UtilServer.TESTING_PORT)
+                        + "/axis2/services/ComplexDataTypes");
+        stub  = new org.tempuri.complex.ComplexDataTypesComplexDataTypesSOAP11Port_httpStub(null,targetEPR.getAddress());
+    }
+
+    protected void tearDown() throws Exception {
+        UtilServer.unDeployService(serviceName);
+        UtilServer.unDeployClientService();
+    }
+
+    public void testretArrayInt1D() throws java.lang.Exception {
+
+
+        assertNull(stub.retArrayInt1D(null));
+        stub._getServiceClient().cleanupTransport();
+        assertNotNull(stub.retArrayInt1D(new ArrayOfint()));
+        stub._getServiceClient().cleanupTransport();
+        ArrayOfint input = new ArrayOfint();
+        input.set_int(new int[]{0, 1, 2});
+        ArrayOfint ret = stub.retArrayInt1D(input);
+        stub._getServiceClient().cleanupTransport();
+        assertNotNull(ret);
+        assertNotNull(ret.get_int());
+        assertEquals(ret.get_int().length, 3);
+    }
+
+    /**
+     * Auto generated test method
+     */
+    public void testretStructSNSAS() throws java.lang.Exception {
+        assertNull(stub.retStructSNSAS(null));
+        assertNotNull(stub.retStructSNSAS(new Group()));
+        Group input = new Group();
+        input.setName("xyz");
+        input.setMembers(new ArrayOfPerson());
+        assertNotNull(stub.retStructSNSAS(input));
+    }
+
+    /**
+     * Auto generated test method
+     */
+    public void testretArrayDateTime1D() throws java.lang.Exception {
+
+        assertNull(stub.retArrayDateTime1D(null));
+
+        assertNotNull(stub.retArrayDateTime1D(new ArrayOfNullableOfdateTime()));
+
+        ArrayOfNullableOfdateTime input = new ArrayOfNullableOfdateTime();
+        input.setDateTime(new Calendar[]{Calendar.getInstance(), Calendar.getInstance()});
+        assertNotNull(stub.retArrayDateTime1D(input));
+    }
+
+    /**
+     * Auto generated test method
+     */
+    public void testretArrayString2D() throws java.lang.Exception {
+
+        assertNull(stub.retArrayString2D(null));
+        assertNotNull(stub.retArrayString2D(new ArrayOfArrayOfstring()));
+
+        ArrayOfArrayOfstring input = new ArrayOfArrayOfstring();
+        ArrayOfstring a2 = new ArrayOfstring();
+        ArrayOfstring a1 = new ArrayOfstring();
+        a1.setString(new String[]{"foo", "bar"});
+        input.setArrayOfstring(new ArrayOfstring[]{a1, a2});
+        assertNotNull(stub.retArrayString2D(input));
+    }
+
+    /**
+     * Auto generated test method
+     */
+    public void testretArrayDecimal1D() throws java.lang.Exception {
+
+        assertNull(stub.retArrayDecimal1D(null));
+        assertNotNull(stub.retArrayDecimal1D(new ArrayOfNullableOfdecimal()));
+
+        ArrayOfNullableOfdecimal input = new ArrayOfNullableOfdecimal();
+        input.setDecimal(new BigDecimal[]{new BigDecimal(1), new BigDecimal(2)});
+        assertNotNull(stub.retArrayDecimal1D(input));
+    }
+
+    /**
+     * Auto generated test method
+     */
+    public void testretStructSNSA() throws java.lang.Exception {
+
+        assertNull(stub.retStructSNSA(null));
+        assertNotNull(stub.retStructSNSA(new Employee()));
+        Employee input = new Employee();
+        input.setJobID(34);
+        input.setBaseDetails(new Person());
+        input.setNumbers(new ArrayOfshort());
+        input.setHireDate(Calendar.getInstance());
+        assertNotNull(stub.retStructSNSA(input));
+    }
+
+    /**
+     * Auto generated test method
+     */
+    public void testretArrayAnyType1D() throws java.lang.Exception {
+
+        assertNull(stub.retArrayAnyType1D(null));
+        assertNotNull(stub.retArrayAnyType1D(new ArrayOfanyType()));
+
+        ArrayOfanyType input = new ArrayOfanyType();
+
+        OMFactory factory = OMAbstractFactory.getOMFactory();
+        // lets create the namespace object of the Article element
+        OMNamespace ns = factory.createOMNamespace("http://www.serverside.com/articles/introducingAxiom", "article");
+        // now create the Article element with the above namespace
+        OMElement articleElement = factory.createOMElement("Article", ns);
+
+        input.setAnyType(new OMElement[]{articleElement});
+        assertNotNull(stub.retArrayAnyType1D(input));
+    }
+
+    /**
+     * Auto generated test method
+     */
+    public void testretDerivedClass2() throws java.lang.Exception {
+
+        assertNull(stub.retDerivedClass2(null));
+        assertNotNull(stub.retDerivedClass2(new Table()));
+
+        Table input = new Table();
+        input.setSeatingCapacity(50);
+        input.setColor("sdfsd");
+        input.setPrice(45);
+        assertNotNull(stub.retDerivedClass2(input));
+    }
+
+    /**
+     * Auto generated test method
+     */
+    public void testretStructSN() throws java.lang.Exception {
+
+        assertNull(stub.retStructSN(null));
+        assertNotNull(stub.retStructSN(new Person()));
+
+        Person input = new Person();
+        input.setAge(23);
+        input.setID(345);
+        input.setMale(false);
+        input.setName("Why?");
+        assertNotNull(stub.retStructSN(input));
+    }
+
+    /**
+     * Auto generated test method
+     */
+    public void testretArray1DSN() throws java.lang.Exception {
+
+        assertNull(stub.retArray1DSN(null));
+        assertNotNull(stub.retArray1DSN(new ArrayOfPerson()));
+
+        ArrayOfPerson input = new ArrayOfPerson();
+        Person p1 = new Person();
+        p1.setAge(34);
+        p1.setID(2345);
+        p1.setMale(true);
+        p1.setName("HJHJH");
+        input.setPerson(new Person[]{p1});
+        assertNotNull(stub.retArray1DSN(input));
+    }
+
+    /**
+     * Auto generated test method
+     */
+    public void testretDerivedClass() throws java.lang.Exception {
+
+
+        assertNull(stub.retDerivedClass(null));
+        assertNotNull(stub.retDerivedClass(new Furniture()));
+
+        Furniture input = new Furniture();
+        input.setColor("white");
+        input.setPrice(67);
+        assertNotNull(stub.retDerivedClass(input));
+        assertTrue(input instanceof Furniture);
+
+        input = new Table();
+        input.setColor("black");
+        input.setPrice(89);
+        ((Table) input).setSeatingCapacity(100);
+        assertTrue(input instanceof Table);
+    }
+
+// TODO: We need to figure out how to deal with ENUM's. Please don't remove this section.    
+//    /**
+//     * Auto generated test method
+//     */
+    public void testretEnumInt() throws java.lang.Exception {
+
+
+        assertNull(stub.retEnumInt(null));
+        String input = "";
+        assertNotNull(stub.retEnumInt(new String()));
+    }
+
+// TODO: We need to figure out how to deal with ENUM's. Please don't remove this section.
+//    /**
+//     * Auto generated test method
+//     */
+//    public void testretEnumString() throws java.lang.Exception {
+//
+//        org.tempuri.complex.xsd.ComplexDataTypesComplexDataTypesSOAP11Port_httpStub stub =
+//                new org.tempuri.complex.xsd.ComplexDataTypesComplexDataTypesSOAP11Port_httpStub();
+//
+//        assertNull(stub.retEnumString(null));
+//        BitMask input = new BitMask();
+//        assertNull(stub.retEnumString(new BitMask()));
+//    }
+
+
+    /**
+     * Auto generated test method
+     */
+    public void testretStructS1() throws java.lang.Exception {
+
+        assertNull(stub.retStructS1(null));
+        assertNotNull(stub.retStructS1(new Name()));
+        Name input = new Name();
+        input.setName("ewrterty");
+        assertNotNull(stub.retStructS1(input));
+    }
+
+    /**
+     * Auto generated test method
+     */
+    public void testretArrayString1D() throws java.lang.Exception {
+
+
+        assertNull(stub.retArrayString1D(null));
+        assertNotNull(stub.retArrayString1D(new ArrayOfstring()));
+        ArrayOfstring input = new ArrayOfstring();
+        input.setString(new String[]{"foo", "bar"});
+        ArrayOfstring ret = stub.retArrayString1D(input);
+        assertNotNull(ret);
+        assertNotNull(ret.getString());
+        assertEquals(ret.getString().length, 2);
+    }
+
+
+    /**
+     * Auto generated test method
+     */
+    public void testretSingle() throws java.lang.Exception {
+        float ret = stub.retSingle(43.0f);
+        assertTrue(ret==43.0f);
+    }
+
+    /**
+     * Auto generated test method
+     */
+    public void testretDateTime() throws java.lang.Exception {
+
+        Calendar input = Calendar.getInstance();
+        Calendar ret = stub.retDateTime(input);
+        assertNotNull(ret);
+        assertEquals(ret, input);
+    }
+
+    /**
+     * Auto generated test method
+     */
+    public void testretGuid() throws java.lang.Exception {
+
+        String input = "12345";
+        String ret = stub.retGuid(input);
+        assertEquals(ret, input);
+    }
+
+    /**
+     * Auto generated test method
+     */
+    public void testretByteArray() throws java.lang.Exception {
+
+
+        byte[] input = new byte[]{(byte) 0xDE, (byte) 0xAD, (byte) 0xBE, (byte) 0xEF};
+        DataHandler ret = stub.retByteArray(new DataHandler(new ByteArrayDataSource(input)));
+        byte[] bytes = IOUtils.getStreamAsByteArray(ret.getInputStream());
+        assertTrue(Arrays.equals(bytes, input));
+    }
+
+    /**
+     * Auto generated test method
+     */
+    public void testretUri() throws java.lang.Exception {
+
+
+        assertNotNull(stub.retUri("124"));
+    }
+
+    /**
+     * Auto generated test method
+     */
+    public void testretQName() throws java.lang.Exception {
+
+
+        //FIXME: Why is QName being mapped to OMElement?
+        assertNull(stub.retQName(null));
+    }
+
+// TODO: FIXME: Need to figure out how to do enum's. Please don't remove this following section
+//    /**
+//     * Auto generated test method
+//     */
+//    public void testretEnumInt() throws java.lang.Exception {
+//
+//        org.tempuri.complex.xsd.ComplexDataTypesComplexDataTypesSOAP11Port_httpStub stub =
+//                new org.tempuri.complex.xsd.ComplexDataTypesComplexDataTypesSOAP11Port_httpStub();
+//
+//        org.tempuri.complex.xsd.xsd.RetEnumInt retEnumInt126 =
+//                (org.tempuri.complex.xsd.xsd.RetEnumInt) getTestObject(org.tempuri.complex.xsd.xsd.RetEnumInt.class);
+//        // todo Fill in the retEnumInt126 here
+//
+//        assertNotNull(stub.retEnumInt(
+//                getParam0(retEnumInt126)
+//        ));
+//
+//
+//    }
+
+    public void testretLong() throws java.lang.Exception {
+        long ret = stub.retLong(34);
+        assertEquals(34, ret);
+    }
+
+    /**
+     * Auto generated test method
+     */
+    public void testretUShort() throws java.lang.Exception {
+        int ret = stub.retUShort(34);
+        assertEquals(34, ret);
+    }
+
+    /**
+     * Auto generated test method
+     */
+    public void testretUInt() throws java.lang.Exception {
+        long ret = stub.retUInt(34);
+        assertEquals(34, ret);
+    }
+
+    /**
+     * Auto generated test method
+     */
+    public void testretByte() throws java.lang.Exception {
+        short ret = stub.retByte((short)34);
+        assertEquals((short)34, ret);
+    }
+
+    /**
+     * Auto generated test method
+     */
+    public void testretSByte() throws java.lang.Exception {
+        byte ret = stub.retSByte((byte)34);
+        assertEquals((byte)34, ret);
+    }
+
+    /**
+     * Auto generated test method
+     */
+    public void testretShort() throws java.lang.Exception {
+        short ret = stub.retShort((short)34);
+        assertEquals((short)34, ret);
+    }
+
+    /**
+     * Auto generated test method
+     */
+    public void testretObject() throws java.lang.Exception {
+
+        OMFactory factory = OMAbstractFactory.getOMFactory();
+        // lets create the namespace object of the Article element
+        OMNamespace ns = factory.createOMNamespace("http://www.serverside.com/articles/introducingAxiom", "article");
+        // now create the Article element with the above namespace
+        OMElement articleElement = factory.createOMElement("Article", ns);
+
+        OMElement ret = stub.retObject(articleElement);
+        assertNotNull(ret);
+        assertEquals(ret.toString(), articleElement.toString());
+    }
+
+    /**
+     * Auto generated test method
+     */
+    public void testretFloat() throws java.lang.Exception {
+
+        float ret = stub.retFloat((float)34);
+        assertTrue(ret==34);
+    }
+
+    /**
+     * Auto generated test method
+     */
+    public void testretDouble() throws java.lang.Exception {
+
+        double ret = stub.retDouble((double)34);
+        assertTrue(ret==34);
+    }
+
+    /**
+     * Auto generated test method
+     */
+    public void testretBool() throws java.lang.Exception {
+
+        boolean ret = stub.retBool(true);
+        assertTrue(ret);
+    }
+
+    /**
+     * Auto generated test method
+     */
+    public void testretDecimal() throws java.lang.Exception {
+
+        BigDecimal input = new BigDecimal(12334);
+        BigDecimal ret = stub.retDecimal(input);
+        assertNotNull(ret);
+        assertEquals(ret, input);
+    }
+
+// TODO: FIXME: Need to figure out how to do enum's. Please don't remove this following section
+//    /**
+//     * Auto generated test method
+//     */
+//    public void testretEnumString() throws java.lang.Exception {
+//
+//        org.tempuri.complex.xsd.ComplexDataTypesComplexDataTypesSOAP11Port_httpStub stub =
+//                new org.tempuri.complex.xsd.ComplexDataTypesComplexDataTypesSOAP11Port_httpStub();
+//
+//        org.tempuri.complex.xsd.xsd.RetEnumString retEnumString198 =
+//                (org.tempuri.complex.xsd.xsd.RetEnumString) getTestObject(org.tempuri.complex.xsd.xsd.RetEnumString.class);
+//        // todo Fill in the retEnumString198 here
+//
+//        assertNotNull(stub.retEnumString(
+//                getParam0(retEnumString198)
+//        ));
+//
+//
+//    }
+
+    /**
+     * Auto generated test method
+     */
+    public void testretInt() throws java.lang.Exception {
+        int ret = stub.retInt((int)34);
+        assertEquals((int)34, ret);
+    }
+
+    /**
+     * Auto generated test method
+     */
+    public void testretInts() throws java.lang.Exception {
+
+        int[] input = new int[]{34, 45};
+        int ret[] = stub.retInts(input);
+        assertTrue(Arrays.equals(input, ret));
+    }
+
+    /**
+     * Auto generated test method
+     */
+    public void testretChar() throws java.lang.Exception {
+
+        int ret = stub.retChar(34);
+        assertEquals(34, ret);
+    }
+
+    /**
+     * Auto generated test method
+     */
+    public void testretString() throws java.lang.Exception {
+
+        String input = "Abracadabra";
+        String ret = stub.retString(input);
+        assertNotNull(ret);
+        assertEquals(input, ret);
+    }
+
+    /**
+     * Auto generated test method
+     */
+    public void testretStrings() throws java.lang.Exception {
+
+String[] ret;
+        String[] input = new String[]{"Abracadabra"};
+        ret = stub.retStrings(null);
+        assertNull(ret);
+        ret = stub.retStrings(input);
+        assertNotNull(ret);
+        assertTrue(Arrays.equals(input, ret));
+        input = new String[]{"Abracadabra", null, "abc"};
+        ret = stub.retStrings(input);
+        assertNotNull(ret);
+        assertTrue(Arrays.equals(input, ret));
+
+        input = new String[]{};
+        ret = stub.retStrings(input);
+        assertNull(ret);
+    }
+
+    /**
+     * Auto generated test method
+     */
+    public void testretULong() throws java.lang.Exception {
+
+        BigInteger input = new BigInteger("34");
+        BigInteger ret = stub.retULong(input);
+        assertEquals(input, ret);
+    }
+}
+    
\ No newline at end of file

Modified: webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfint.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfint.java?view=diff&rev=546981&r1=546980&r2=546981
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfint.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfint.java Wed Jun 13 10:59:30 2007
@@ -5,11 +5,14 @@
 
     protected Integer[] _int;
 
-    public Integer[] getInt() {
+    public Integer[] get_int() {
         if (_int == null) {
             _int = new Integer[0];
         }
         return this._int;
     }
 
+    public void set_int(Integer[] _int) {
+        this._int = _int;
+    }
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/ServiceClient.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/ServiceClient.java?view=diff&rev=546981&r1=546980&r2=546981
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/ServiceClient.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/ServiceClient.java Wed Jun 13 10:59:30 2007
@@ -733,9 +733,13 @@
     }
 
     public void cleanupTransport() throws AxisFault{
-        MessageContext outMessageContext =
-                getLastOperationContext().getMessageContext(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
-        outMessageContext.getTransportOut().getSender().cleanup(outMessageContext);
+        if(getLastOperationContext()!=null){
+            MessageContext outMessageContext =
+                    getLastOperationContext().getMessageContext(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
+            if (outMessageContext!=null) {
+                outMessageContext.getTransportOut().getSender().cleanup(outMessageContext);
+            }
+        }
     }
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org