You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by di...@apache.org on 2007/06/03 05:17:05 UTC

svn commit: r543836 [4/4] - in /webservices/axis2/trunk/java/modules: integration/test-resources/ integration/test-resources/ComplexDataTypes/ integration/test-resources/ComplexDataTypes/META-INF/ integration/test/org/tempuri/ integration/test/org/temp...

Added: webservices/axis2/trunk/java/modules/integration/test-resources/ComplexDataTypes/META-INF/services.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test-resources/ComplexDataTypes/META-INF/services.xml?view=auto&rev=543836
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/ComplexDataTypes/META-INF/services.xml (added)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/ComplexDataTypes/META-INF/services.xml Sat Jun  2 20:17:03 2007
@@ -0,0 +1,7 @@
+<service name="ComplexDataTypes">
+    <messageReceivers>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
+                         class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
+    </messageReceivers>
+    <parameter name="ServiceClass" locked="false">org.tempuri.complex.ComplexDataTypes</parameter>
+</service>
\ No newline at end of file

Added: webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/ComplexDataTypes.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/ComplexDataTypes.java?view=auto&rev=543836
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/ComplexDataTypes.java (added)
+++ webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/ComplexDataTypes.java Sat Jun  2 20:17:03 2007
@@ -0,0 +1,215 @@
+package org.tempuri.complex;
+
+import org.tempuri.complex.data.BitMask;
+import org.tempuri.complex.data.Employee;
+import org.tempuri.complex.data.Furniture;
+import org.tempuri.complex.data.Group;
+import org.tempuri.complex.data.Name;
+import org.tempuri.complex.data.Person;
+import org.tempuri.complex.data.Table;
+import org.tempuri.complex.data.arrays.ArrayOfArrayOfstring;
+import org.tempuri.complex.data.arrays.ArrayOfNullableOfdateTime;
+import org.tempuri.complex.data.arrays.ArrayOfNullableOfdecimal;
+import org.tempuri.complex.data.arrays.ArrayOfPerson;
+import org.tempuri.complex.data.arrays.ArrayOfanyType;
+import org.tempuri.complex.data.arrays.ArrayOfint;
+import org.tempuri.complex.data.arrays.ArrayOfstring;
+
+import javax.xml.namespace.QName;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.util.Calendar;
+
+
+public class ComplexDataTypes {
+
+    public boolean retBool(
+            boolean inBool) {
+        return inBool;
+    }
+
+    public short retByte(
+            short inByte) {
+        return inByte;
+    }
+
+    public byte retSByte(
+            byte inSByte) {
+        return inSByte;
+    }
+
+    public byte[] retByteArray(
+            byte[] inByteArray) {
+        return inByteArray;
+    }
+
+    public int retChar(
+            int inChar) {
+        return inChar;
+    }
+
+    public BigDecimal retDecimal(
+            BigDecimal inDecimal) {
+        return inDecimal;
+    }
+
+    public float retFloat(
+            float inFloat) {
+        return inFloat;
+    }
+
+    public double retDouble(
+            double inDouble) {
+        return inDouble;
+    }
+
+    public float retSingle(
+            float inSingle) {
+        return inSingle;
+    }
+
+    public int retInt(
+            int inInt) {
+        return inInt;
+    }
+
+    public int[] retInts(
+            int[] inInt) {
+        return inInt;
+    }
+
+    public short retShort(
+            short inShort) {
+        return inShort;
+    }
+
+    public long retLong(
+            long inLong) {
+        return inLong;
+    }
+
+    public Object retObject(
+            Object inObject) {
+        return inObject;
+    }
+
+    public long retUInt(
+            long inUInt) {
+        return inUInt;
+    }
+
+    public int retUShort(
+            int inUShort) {
+        return inUShort;
+    }
+
+    public BigInteger retULong(
+            BigInteger inULong) {
+        return inULong;
+    }
+
+    public String retString(
+            String inString) {
+        return inString;
+    }
+
+    public String[] retStrings(
+            String[] inString) {
+        return inString;
+    }
+
+    public String retGuid(
+            String inGuid) {
+        return inGuid;
+    }
+
+    public String retUri(
+            String inUri) {
+        return inUri;
+    }
+
+    public Calendar retDateTime(
+            Calendar inDateTime) {
+        return inDateTime;
+    }
+
+    public QName retQName(
+            QName inQName) {
+        return inQName;
+    }
+
+    public ArrayOfstring retArrayString1D(
+            ArrayOfstring inArrayString1D) {
+        return inArrayString1D;
+    }
+
+    public ArrayOfint retArrayInt1D(
+            ArrayOfint inArrayInt1D) {
+        return inArrayInt1D;
+    }
+
+    public ArrayOfNullableOfdecimal retArrayDecimal1D(
+            ArrayOfNullableOfdecimal inArrayDecimal1D) {
+        return inArrayDecimal1D;
+    }
+
+    public ArrayOfNullableOfdateTime retArrayDateTime1D(
+            ArrayOfNullableOfdateTime inArrayDateTime1D) {
+        return inArrayDateTime1D;
+    }
+
+    public ArrayOfArrayOfstring retArrayString2D(
+            ArrayOfArrayOfstring inArrayString2D) {
+        return inArrayString2D;
+    }
+
+    public ArrayOfPerson retArray1DSN(
+            ArrayOfPerson inArray1DSN) {
+        return inArray1DSN;
+    }
+
+    public ArrayOfanyType retArrayAnyType1D(
+            ArrayOfanyType inArrayAnyType1D) {
+        return inArrayAnyType1D;
+    }
+
+    public Name retStructS1(
+            Name inStructS1) {
+        return inStructS1;
+    }
+
+    public Person retStructSN(
+            Person inStructSN) {
+        return inStructSN;
+    }
+
+    public Employee retStructSNSA(
+            Employee inStructSNSA) {
+        return inStructSNSA;
+    }
+
+    public Group retStructSNSAS(
+            Group inStructSNSAS) {
+        return inStructSNSAS;
+    }
+
+    public BitMask retEnumString(
+            BitMask inEnumString) {
+        return inEnumString;
+    }
+
+    public String retEnumInt(
+            String inEnumInt) {
+        return inEnumInt;
+    }
+
+    public Furniture retDerivedClass(
+            Furniture inDerivedClass) {
+        return inDerivedClass;
+    }
+
+    public Table retDerivedClass2(
+            Table inDerivedClass) {
+        return inDerivedClass;
+    }
+}

Added: webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/ComplexDataTypesTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/ComplexDataTypesTest.java?view=auto&rev=543836
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/ComplexDataTypesTest.java (added)
+++ webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/ComplexDataTypesTest.java Sat Jun  2 20:17:03 2007
@@ -0,0 +1,29 @@
+package org.tempuri.complex;
+
+import org.custommonkey.xmlunit.XMLTestCase;
+import org.custommonkey.xmlunit.XMLUnit;
+import org.apache.ws.java2wsdl.Java2WSDLBuilder;
+import org.tempuri.BaseDataTypes;
+
+import java.io.ByteArrayOutputStream;
+import java.io.FileReader;
+import java.io.StringReader;
+
+public class ComplexDataTypesTest extends XMLTestCase {
+
+    private String wsdlLocation = System.getProperty("basedir", ".") + "/" + "test-resources/ComplexDataTypes/ComplexDataTypes.wsdl";
+
+    public void test1() throws Exception {
+        XMLUnit.setIgnoreWhitespace(true);
+        try {
+            ByteArrayOutputStream out = new ByteArrayOutputStream();
+            Java2WSDLBuilder builder = new Java2WSDLBuilder(out, ComplexDataTypes.class.getName(), ComplexDataTypes.class.getClassLoader());
+            builder.generateWSDL();
+            FileReader control = new FileReader(wsdlLocation);
+            StringReader test = new StringReader(new String(out.toByteArray()));
+            assertXMLEqual(control, test);
+        } finally {
+            XMLUnit.setIgnoreWhitespace(false);
+        }
+    }
+}

Added: webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/BitMask.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/BitMask.java?view=auto&rev=543836
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/BitMask.java (added)
+++ webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/BitMask.java Sat Jun  2 20:17:03 2007
@@ -0,0 +1,36 @@
+package org.tempuri.complex.data;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+public class BitMask {
+
+    public static final BitMask BIT_ONE = new BitMask("BitOne");
+    public static final BitMask BIT_TWO = new BitMask("BitTwo");
+    public static final BitMask BIT_THREE = new BitMask("BitThree");
+    public static final BitMask BIT_FOUR = new BitMask("BitFour");
+    public static final BitMask BIT_FIVE = new BitMask("BitFive");
+    private final String value;
+    private static List values = new ArrayList();
+
+    BitMask(String v) {
+        value = v;
+        values.add(this);
+    }
+
+    public String value() {
+        return value;
+    }
+
+    public static BitMask fromValue(String v) {
+        Iterator iterator = values.iterator();
+        while (iterator.hasNext()) {
+            BitMask c = (BitMask) iterator.next();
+            if (c.value.equals(v)) {
+                return c;
+            }
+        }
+        throw new IllegalArgumentException(v);
+    }
+}

Added: webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/Employee.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/Employee.java?view=auto&rev=543836
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/Employee.java (added)
+++ webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/Employee.java Sat Jun  2 20:17:03 2007
@@ -0,0 +1,83 @@
+package org.tempuri.complex.data;
+
+import org.tempuri.complex.data.arrays.ArrayOfshort;
+
+import java.util.Calendar;
+
+
+public class Employee {
+
+    protected Person baseDetails;
+    protected Calendar hireDate;
+    protected Long jobID;
+    protected ArrayOfshort numbers;
+
+    /**
+     * Gets the value of the baseDetails property.
+     */
+    public Person getBaseDetails() {
+        return baseDetails;
+    }
+
+    /**
+     * Sets the value of the baseDetails property.
+     */
+    public void setBaseDetails(Person value) {
+        this.baseDetails = ((Person) value);
+    }
+
+    /**
+     * Gets the value of the hireDate property.
+     *
+     * @return possible object is
+     *         {@link Calendar }
+     */
+    public Calendar getHireDate() {
+        return hireDate;
+    }
+
+    /**
+     * Sets the value of the hireDate property.
+     *
+     * @param value allowed object is
+     *              {@link Calendar }
+     */
+    public void setHireDate(Calendar value) {
+        this.hireDate = value;
+    }
+
+    /**
+     * Gets the value of the jobID property.
+     *
+     * @return possible object is
+     *         {@link Long }
+     */
+    public Long getJobID() {
+        return jobID;
+    }
+
+    /**
+     * Sets the value of the jobID property.
+     *
+     * @param value allowed object is
+     *              {@link Long }
+     */
+    public void setJobID(Long value) {
+        this.jobID = value;
+    }
+
+    /**
+     * Gets the value of the numbers property.
+     */
+    public ArrayOfshort getNumbers() {
+        return numbers;
+    }
+
+    /**
+     * Sets the value of the numbers property.
+     */
+    public void setNumbers(ArrayOfshort value) {
+        this.numbers = value;
+    }
+
+}

Added: webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/Furniture.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/Furniture.java?view=auto&rev=543836
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/Furniture.java (added)
+++ webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/Furniture.java Sat Jun  2 20:17:03 2007
@@ -0,0 +1,42 @@
+package org.tempuri.complex.data;
+
+public class Furniture {
+
+    protected String color;
+    protected Float price;
+
+    /**
+     * Gets the value of the color property.
+     */
+    public String getColor() {
+        return color;
+    }
+
+    /**
+     * Sets the value of the color property.
+     */
+    public void setColor(String value) {
+        this.color = ((String) value);
+    }
+
+    /**
+     * Gets the value of the price property.
+     *
+     * @return possible object is
+     *         {@link Float }
+     */
+    public Float getPrice() {
+        return price;
+    }
+
+    /**
+     * Sets the value of the price property.
+     *
+     * @param value allowed object is
+     *              {@link Float }
+     */
+    public void setPrice(Float value) {
+        this.price = value;
+    }
+
+}

Added: webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/Group.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/Group.java?view=auto&rev=543836
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/Group.java (added)
+++ webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/Group.java Sat Jun  2 20:17:03 2007
@@ -0,0 +1,38 @@
+package org.tempuri.complex.data;
+
+import org.tempuri.complex.data.arrays.ArrayOfPerson;
+
+public class Group {
+
+    protected ArrayOfPerson members;
+    protected String name;
+
+    /**
+     * Gets the value of the members property.
+     */
+    public ArrayOfPerson getMembers() {
+        return members;
+    }
+
+    /**
+     * Sets the value of the members property.
+     */
+    public void setMembers(ArrayOfPerson value) {
+        this.members = value;
+    }
+
+    /**
+     * Gets the value of the name property.
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Sets the value of the name property.
+     */
+    public void setName(String value) {
+        this.name = value;
+    }
+
+}

Added: webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/Name.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/Name.java?view=auto&rev=543836
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/Name.java (added)
+++ webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/Name.java Sat Jun  2 20:17:03 2007
@@ -0,0 +1,21 @@
+package org.tempuri.complex.data;
+
+public class Name {
+
+    protected String name;
+
+    /**
+     * Gets the value of the name property.
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Sets the value of the name property.
+     */
+    public void setName(String value) {
+        this.name = value;
+    }
+
+}

Added: webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/Person.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/Person.java?view=auto&rev=543836
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/Person.java (added)
+++ webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/Person.java Sat Jun  2 20:17:03 2007
@@ -0,0 +1,84 @@
+package org.tempuri.complex.data;
+
+public class Person {
+
+    protected Double age;
+    protected Float id;
+    protected Boolean male;
+    protected String name;
+
+    /**
+     * Gets the value of the age property.
+     *
+     * @return possible object is
+     *         {@link Double }
+     */
+    public Double getAge() {
+        return age;
+    }
+
+    /**
+     * Sets the value of the age property.
+     *
+     * @param value allowed object is
+     *              {@link Double }
+     */
+    public void setAge(Double value) {
+        this.age = value;
+    }
+
+    /**
+     * Gets the value of the id property.
+     *
+     * @return possible object is
+     *         {@link Float }
+     */
+    public Float getID() {
+        return id;
+    }
+
+    /**
+     * Sets the value of the id property.
+     *
+     * @param value allowed object is
+     *              {@link Float }
+     */
+    public void setID(Float value) {
+        this.id = value;
+    }
+
+    /**
+     * Gets the value of the male property.
+     *
+     * @return possible object is
+     *         {@link Boolean }
+     */
+    public Boolean isMale() {
+        return male;
+    }
+
+    /**
+     * Sets the value of the male property.
+     *
+     * @param value allowed object is
+     *              {@link Boolean }
+     */
+    public void setMale(Boolean value) {
+        this.male = value;
+    }
+
+    /**
+     * Gets the value of the name property.
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Sets the value of the name property.
+     */
+    public void setName(String value) {
+        this.name = value;
+    }
+
+}

Added: webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/Table.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/Table.java?view=auto&rev=543836
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/Table.java (added)
+++ webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/Table.java Sat Jun  2 20:17:03 2007
@@ -0,0 +1,28 @@
+package org.tempuri.complex.data;
+
+public class Table
+        extends Furniture {
+
+    protected Integer seatingCapacity;
+
+    /**
+     * Gets the value of the seatingCapacity property.
+     *
+     * @return possible object is
+     *         {@link Integer }
+     */
+    public Integer getSeatingCapacity() {
+        return seatingCapacity;
+    }
+
+    /**
+     * Sets the value of the seatingCapacity property.
+     *
+     * @param value allowed object is
+     *              {@link Integer }
+     */
+    public void setSeatingCapacity(Integer value) {
+        this.seatingCapacity = value;
+    }
+
+}

Added: webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfArrayOfstring.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfArrayOfstring.java?view=auto&rev=543836
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfArrayOfstring.java (added)
+++ webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfArrayOfstring.java Sat Jun  2 20:17:03 2007
@@ -0,0 +1,14 @@
+package org.tempuri.complex.data.arrays;
+
+public class ArrayOfArrayOfstring {
+
+    protected ArrayOfstring[] arrayOfstring;
+
+    public ArrayOfstring[] getArrayOfstring() {
+        if (arrayOfstring == null) {
+            arrayOfstring = new ArrayOfstring[0];
+        }
+        return this.arrayOfstring;
+    }
+
+}

Added: webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfNullableOfdateTime.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfNullableOfdateTime.java?view=auto&rev=543836
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfNullableOfdateTime.java (added)
+++ webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfNullableOfdateTime.java Sat Jun  2 20:17:03 2007
@@ -0,0 +1,16 @@
+package org.tempuri.complex.data.arrays;
+
+import java.util.Calendar;
+
+public class ArrayOfNullableOfdateTime {
+
+    protected Calendar[] dateTime;
+
+    public Calendar[] getDateTime() {
+        if (dateTime == null) {
+            dateTime = new Calendar[0];
+        }
+        return this.dateTime;
+    }
+
+}

Added: webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfNullableOfdecimal.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfNullableOfdecimal.java?view=auto&rev=543836
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfNullableOfdecimal.java (added)
+++ webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfNullableOfdecimal.java Sat Jun  2 20:17:03 2007
@@ -0,0 +1,16 @@
+package org.tempuri.complex.data.arrays;
+
+import java.math.BigDecimal;
+
+public class ArrayOfNullableOfdecimal {
+
+    protected BigDecimal[] decimal;
+
+    public BigDecimal[] getDecimal() {
+        if (decimal == null) {
+            decimal = new BigDecimal[0];
+        }
+        return this.decimal;
+    }
+
+}

Added: webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfPerson.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfPerson.java?view=auto&rev=543836
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfPerson.java (added)
+++ webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfPerson.java Sat Jun  2 20:17:03 2007
@@ -0,0 +1,16 @@
+package org.tempuri.complex.data.arrays;
+
+import org.tempuri.complex.data.Person;
+
+public class ArrayOfPerson {
+
+    protected Person[] person;
+
+    public Person[] getPerson() {
+        if (person == null) {
+            person = new Person[0];
+        }
+        return this.person;
+    }
+
+}

Added: webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfanyType.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfanyType.java?view=auto&rev=543836
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfanyType.java (added)
+++ webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfanyType.java Sat Jun  2 20:17:03 2007
@@ -0,0 +1,14 @@
+package org.tempuri.complex.data.arrays;
+
+public class ArrayOfanyType {
+
+    protected Object[] anyType;
+
+    public Object[] getAnyType() {
+        if (anyType == null) {
+            anyType = new Object[0];
+        }
+        return this.anyType;
+    }
+
+}

Added: 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=auto&rev=543836
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfint.java (added)
+++ webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfint.java Sat Jun  2 20:17:03 2007
@@ -0,0 +1,15 @@
+package org.tempuri.complex.data.arrays;
+
+
+public class ArrayOfint {
+
+    protected Integer[] _int;
+
+    public Integer[] getInt() {
+        if (_int == null) {
+            _int = new Integer[0];
+        }
+        return this._int;
+    }
+
+}

Added: webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfshort.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfshort.java?view=auto&rev=543836
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfshort.java (added)
+++ webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfshort.java Sat Jun  2 20:17:03 2007
@@ -0,0 +1,14 @@
+package org.tempuri.complex.data.arrays;
+
+public class ArrayOfshort {
+
+    protected Short[] _short;
+
+    public Short[] getShort() {
+        if (_short == null) {
+            _short = new Short[0];
+        }
+        return this._short;
+    }
+
+}

Added: webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfstring.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfstring.java?view=auto&rev=543836
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfstring.java (added)
+++ webservices/axis2/trunk/java/modules/integration/test/org/tempuri/complex/data/arrays/ArrayOfstring.java Sat Jun  2 20:17:03 2007
@@ -0,0 +1,14 @@
+package org.tempuri.complex.data.arrays;
+
+public class ArrayOfstring {
+
+    protected String[] string;
+
+    public String[] getString() {
+        if (string == null) {
+            string = new String[0];
+        }
+        return this.string;
+    }
+
+}

Modified: webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL11.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL11.java?view=diff&rev=543836&r1=543835&r2=543836
==============================================================================
--- webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL11.java (original)
+++ webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDL11.java Sat Jun  2 20:17:03 2007
@@ -92,11 +92,7 @@
             this.use = use;
         }
 
-        if (locationURL == null) {
-            this.locationURL = DEFAULT_LOCATION_URL;
-        } else {
-            this.locationURL = locationURL;
-        }
+        this.locationURL = locationURL;
         this.serviceName = serviceName;
 
         if (targetNamespace != null && targetNamespace.trim().length() != 0) {

Modified: webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java?view=diff&rev=543836&r1=543835&r2=543836
==============================================================================
--- webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLBuilder.java Sat Jun  2 20:17:03 2007
@@ -6,11 +6,20 @@
 import org.apache.axis2.description.java2wsdl.NamespaceGenerator;
 import org.apache.axis2.description.java2wsdl.DefaultNamespaceGenerator;
 import org.apache.axis2.description.java2wsdl.Java2WSDLUtils;
+import org.apache.axis2.description.WSDL2Constants;
+import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.AxisService2WSDL11;
+import org.apache.axis2.util.Loader;
+import org.apache.axis2.engine.MessageReceiver;
+import org.apache.axis2.context.ConfigurationContextFactory;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.deployment.util.Utils;
 
 import java.io.OutputStream;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Map;
+import java.util.HashMap;
 /*
 * Copyright 2004,2005 The Apache Software Foundation.
 *
@@ -49,7 +58,7 @@
     private String schemaTargetNamespacePrefix = null;
     private String style = Java2WSDLConstants.DOCUMENT;
     private String use = Java2WSDLConstants.LITERAL;
-    private String locationUri = Java2WSDLConstants.DEFAULT_LOCATION_URL;
+    private String locationUri;
     private ArrayList extraClasses;
     
     private String nsGenClassName = null;
@@ -158,40 +167,64 @@
                                                     className,
                                                     getSchemaTargetNamespace(), 
                                                     getSchemaTargetNamespacePrefix());
+
         ArrayList excludedOperation = new ArrayList();
-        excludedOperation.add("init");
-        excludedOperation.add("setOperationContext");
-        excludedOperation.add("destroy");
+        Utils.addExcludeMethods(excludedOperation);
         schemaGenerator.setExcludeMethods(excludedOperation);
         schemaGenerator.setAttrFormDefault(getAttrFormDefault());
         schemaGenerator.setElementFormDefault(getElementFormDefault());
         schemaGenerator.setExtraClasses(getExtraClasses());
         schemaGenerator.setNsGen(resolveNSGen());
         schemaGenerator.setPkg2nsmap(getPkg2nsMap());
-        if ( getPkg2nsMap() != null && !getPkg2nsMap().isEmpty() && 
+        if ( getPkg2nsMap() != null && !getPkg2nsMap().isEmpty() &&
                 (getPkg2nsMap().containsKey(ALL) || getPkg2nsMap().containsKey(ALL.toUpperCase())) ) {
             schemaGenerator.setUseWSDLTypesNamespace(true);
         }
 
-        Collection schemaCollection = schemaGenerator.generateSchema();
-        
-        Java2WSDL11 java2WSDL11 = new Java2WSDL11(schemaGenerator.getMethods(),
-                schemaCollection,
-                schemaGenerator.getTypeTable(),
+        HashMap messageReciverMap = new HashMap();
+        Class inOnlyMessageReceiver = Loader.loadClass(
+                "org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver");
+        MessageReceiver messageReceiver =
+                (MessageReceiver) inOnlyMessageReceiver.newInstance();
+        messageReciverMap.put(
+                WSDL2Constants.MEP_URI_IN_ONLY,
+                messageReceiver);
+        Class inoutMessageReceiver = Loader.loadClass(
+                "org.apache.axis2.rpc.receivers.RPCMessageReceiver");
+        MessageReceiver inOutmessageReceiver =
+                (MessageReceiver) inoutMessageReceiver.newInstance();
+        messageReciverMap.put(
+                WSDL2Constants.MEP_URI_IN_OUT,
+                inOutmessageReceiver);
+        ConfigurationContext configCtx = ConfigurationContextFactory.createDefaultConfigurationContext();
+        AxisService axisService = AxisService.createService(className,
                 serviceName == null ? Java2WSDLUtils.getSimpleClassName(className) : serviceName,
-                targetNamespace == null ? Java2WSDLUtils.namespaceFromClassName(className,classLoader, resolveNSGen()).toString() : targetNamespace,
-                targetNamespacePrefix,
-                style,
-                use,
-                locationUri);
-        java2WSDL11.setSchemaTargetNamespace(getSchemaTargetNamespace());
-        java2WSDL11.setSchemaTargetNamespacePrefix(getSchemaTargetNamespacePrefix());
-        OMElement wsdlElement = java2WSDL11.generateOM();
+                configCtx.getAxisConfiguration(),
+                messageReciverMap,
+                targetNamespace == null ? Java2WSDLUtils.namespaceFromClassName(className, classLoader, resolveNSGen()).toString() : targetNamespace,
+                classLoader,
+                schemaGenerator);
+        axisService.setTargetNamespacePrefix(targetNamespacePrefix);
+        axisService.setSchematargetNamespace(getSchemaTargetNamespace());
+        axisService.setSchematargetNamespacePrefix(getSchemaTargetNamespacePrefix());
+        String uri = locationUri;
+        if(uri == null){
+            uri = DEFAULT_LOCATION_URL + (serviceName == null ? Java2WSDLUtils.getSimpleClassName(className) : serviceName);
+        }
+        axisService.setEPRs(new String[]{uri});
+        configCtx.getAxisConfiguration().addService(axisService);
+
+        //TODO: Figure out how to set the style, use;
+        //TODO: Switch for WSDL20
+
+        AxisService2WSDL11 axisService2WOM = new AxisService2WSDL11(axisService);
+        OMElement wsdlElement = axisService2WOM.generateOM();
         if(!isPretty()){
             wsdlElement.serialize(out);
         } else {
             Java2WSDLUtils.prettyPrint(wsdlElement, out);
         }
+
         out.flush();
         out.close();
     }
@@ -238,12 +271,15 @@
     
     private NamespaceGenerator resolveNSGen() {
         NamespaceGenerator nsGen = null;
-        try {
-            nsGen = (NamespaceGenerator)Class.forName(this.nsGenClassName).newInstance();
-        } catch ( Exception e ) {
+        if(this.nsGenClassName == null){
             nsGen = new DefaultNamespaceGenerator();
+        } else {
+            try {
+                nsGen = (NamespaceGenerator)Class.forName(this.nsGenClassName).newInstance();
+            } catch ( Exception e ) {
+                nsGen = new DefaultNamespaceGenerator();
+            }
         }
-        
         return nsGen;
     }
 

Modified: webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLTask.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLTask.java?view=diff&rev=543836&r1=543835&r2=543836
==============================================================================
--- webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLTask.java (original)
+++ webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLTask.java Sat Jun  2 20:17:03 2007
@@ -45,7 +45,7 @@
     private Path classpath = null;
     private String style = Java2WSDLConstants.DOCUMENT;
     private String use = Java2WSDLConstants.LITERAL;
-    private String locationUri = Java2WSDLConstants.DEFAULT_LOCATION_URL;
+    private String locationUri;
     private String attrFormDefault = null;
     private String elementFormDefault = null;
 

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ServiceBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ServiceBuilder.java?view=diff&rev=543836&r1=543835&r2=543836
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ServiceBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ServiceBuilder.java Sat Jun  2 20:17:03 2007
@@ -252,7 +252,7 @@
             if (excludeops == null) {
                 excludeops = new ArrayList();
             }
-            Utils.addExclueMethods(excludeops);
+            Utils.addExcludeMethods(excludeops);
 
             //<schema targetNamespace="http://x.y.z"/>
             // setting the PolicyInclude

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java?view=diff&rev=543836&r1=543835&r2=543836
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java Sat Jun  2 20:17:03 2007
@@ -676,7 +676,7 @@
      * To add the exclude method when generating scheams , here the exclude methods
      * will be session releated axis2 methods
      */
-    public static void addExclueMethods(ArrayList excludeList){
+    public static void addExcludeMethods(ArrayList excludeList){
         excludeList.add("init");
         excludeList.add("setOperationContext");
         excludeList.add("startUp");

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java?view=diff&rev=543836&r1=543835&r2=543836
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java Sat Jun  2 20:17:03 2007
@@ -239,6 +239,8 @@
     // names list keep to preserve the parameter order
     private List operationsNameList;
 
+    private String[] eprs = null;
+
     public AxisEndpoint getEndpoint(String key) {
         return (AxisEndpoint) endpointMap.get(key);
     }
@@ -821,14 +823,22 @@
         return null;
     }
 
+    public void setEPRs(String[] eprs) {
+        this.eprs = eprs;
+    }
+
     public String[] getEPRs() throws AxisFault {
+        if(eprs != null) {
+            return eprs;
+        }
         String requestIP;
         try {
             requestIP = HttpUtils.getIpAddress();
         } catch (SocketException e) {
             throw new AxisFault("Cannot get local IP address", e);
         }
-        return getEPRs(requestIP);
+        eprs = getEPRs(requestIP);
+        return eprs;
     }
 
     private String[] getEPRs(String requestIP) {
@@ -1531,17 +1541,6 @@
                                             String targetNamespace,
                                             String schemaNamespace,
                                             ClassLoader loader) throws AxisFault {
-        Parameter parameter = new Parameter(Constants.SERVICE_CLASS, implClass);
-        OMElement paraElement = Utils.getParameter(Constants.SERVICE_CLASS, implClass, false);
-        parameter.setParameterElement(paraElement);
-        AxisService axisService = new AxisService();
-        axisService.setUseDefaultChains(false);
-        axisService.addParameter(parameter);
-
-        if (schemaNamespace == null) {
-            schemaNamespace = axisService.getSchematargetNamespace();
-        }
-
         int index = implClass.lastIndexOf(".");
         String serviceName;
         if (index > 0) {
@@ -1550,13 +1549,59 @@
             serviceName = implClass;
         }
 
-        axisService.setName(serviceName);
-        axisService.setClassLoader(loader);
-
-        ClassLoader serviceClassLoader = axisService.getClassLoader();
         SchemaGenerator schemaGenerator;
         ArrayList excludeOpeartion = new ArrayList();
 
+        try {
+            schemaGenerator = new SchemaGenerator(loader,
+                                                  implClass, schemaNamespace,
+                                                  Java2WSDLConstants.SCHEMA_NAMESPACE_PRFIX);
+            schemaGenerator.setElementFormDefault(Java2WSDLConstants.FORM_DEFAULT_UNQUALIFIED);
+            Utils.addExcludeMethods(excludeOpeartion);
+            schemaGenerator.setExcludeMethods(excludeOpeartion);
+        } catch (Exception e) {
+            throw AxisFault.makeFault(e);
+        }
+
+        return createService(implClass,
+                serviceName,
+                axisConfiguration,
+                messageReceiverClassMap,
+                targetNamespace,
+                loader,
+                schemaGenerator);
+    }
+    /**
+     * messageReceiverClassMap will hold the MessageReceivers for given meps. Key will be the
+     * mep and value will be the instance of the MessageReceiver class.
+     * Ex:
+     * Map mrMap = new HashMap();
+     * mrMap.put("http://www.w3.org/2004/08/wsdl/in-only",
+     * RPCInOnlyMessageReceiver.class.newInstance());
+     * mrMap.put("http://www.w3.org/2004/08/wsdl/in-out",
+     * RPCMessageReceiver.class.newInstance());
+     *
+     * @param implClass
+     * @param axisConfiguration
+     * @param messageReceiverClassMap
+     * @param targetNamespace
+     * @throws AxisFault
+     */
+    public static AxisService createService(String implClass,
+                                            String serviceName,
+                                            AxisConfiguration axisConfiguration,
+                                            Map messageReceiverClassMap,
+                                            String targetNamespace,
+                                            ClassLoader loader,
+                                            SchemaGenerator schemaGenerator) throws AxisFault {
+        Parameter parameter = new Parameter(Constants.SERVICE_CLASS, implClass);
+        OMElement paraElement = Utils.getParameter(Constants.SERVICE_CLASS, implClass, false);
+        parameter.setParameterElement(paraElement);
+        AxisService axisService = new AxisService();
+        axisService.setUseDefaultChains(false);
+        axisService.addParameter(parameter);
+        axisService.setName(serviceName);
+        axisService.setClassLoader(loader);
 
         NamespaceMap map = new NamespaceMap();
         map.put(Java2WSDLConstants.AXIS2_NAMESPACE_PREFIX,
@@ -1564,34 +1609,27 @@
         map.put(Java2WSDLConstants.DEFAULT_SCHEMA_NAMESPACE_PREFIX,
                 Java2WSDLConstants.URI_2001_SCHEMA_XSD);
         axisService.setNameSpacesMap(map);
-
-
+        axisService.setElementFormDefault(false);
         try {
-            schemaGenerator = new SchemaGenerator(serviceClassLoader,
-                                                  implClass, schemaNamespace,
-                                                  axisService.getSchematargetNamespacePrefix());
-            schemaGenerator.setElementFormDefault(Java2WSDLConstants.FORM_DEFAULT_UNQUALIFIED);
-            axisService.setElementFormDefault(false);
-            Utils.addExclueMethods(excludeOpeartion);
-            schemaGenerator.setExcludeMethods(excludeOpeartion);
             axisService.addSchema(schemaGenerator.generateSchema());
-            axisService.setSchematargetNamespace(schemaGenerator.getSchemaTargetNameSpace());
-            axisService.setTypeTable(schemaGenerator.getTypeTable());
-            if (targetNamespace == null) {
-                targetNamespace = schemaGenerator.getSchemaTargetNameSpace();
-            }
-            if (targetNamespace != null && !"".equals(targetNamespace)) {
-                axisService.setTargetNamespace(targetNamespace);
-            }
         } catch (Exception e) {
             throw AxisFault.makeFault(e);
         }
+        axisService.setSchematargetNamespace(schemaGenerator.getSchemaTargetNameSpace());
+        axisService.setTypeTable(schemaGenerator.getTypeTable());
+        if (targetNamespace == null) {
+            targetNamespace = schemaGenerator.getSchemaTargetNameSpace();
+        }
+        if (targetNamespace != null && !"".equals(targetNamespace)) {
+            axisService.setTargetNamespace(targetNamespace);
+        }
 
         JMethod[] method = schemaGenerator.getMethods();
         TypeTable table = schemaGenerator.getTypeTable();
 
         PhasesInfo pinfo = axisConfiguration.getPhasesInfo();
 
+        List excludes = schemaGenerator.getExcludeMethods();
         for (int i = 0; i < method.length; i++) {
             JMethod jmethod = method[i];
             JAnnotation methodAnnon = jmethod.getAnnotation(AnnotationConstants.WEB_METHOD);
@@ -1603,8 +1641,10 @@
             if (!jmethod.isPublic()) {
                 // no need to expose , private and protected methods
                 continue;
-            } else if (excludeOpeartion.contains(jmethod.getSimpleName())) {
-                continue;
+            } else {
+                if (excludes.contains(jmethod.getSimpleName())) {
+                    continue;
+                }
             }
             AxisOperation operation = Utils.getAxisOperationforJmethod(jmethod, table);
             String mep = operation.getMessageExchangePattern();
@@ -1717,7 +1757,7 @@
                                                   axisService.getSchematargetNamespacePrefix());
             schemaGenerator.setElementFormDefault(Java2WSDLConstants.FORM_DEFAULT_UNQUALIFIED);
             axisService.setElementFormDefault(false);
-            Utils.addExclueMethods(excludeOpeartion);
+            Utils.addExcludeMethods(excludeOpeartion);
             schemaGenerator.setExcludeMethods(excludeOpeartion);
             axisService.addSchema(schemaGenerator.generateSchema());
             axisService.setSchematargetNamespace(schemaGenerator.getSchemaTargetNameSpace());

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java?view=diff&rev=543836&r1=543835&r2=543836
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL11.java Sat Jun  2 20:17:03 2007
@@ -442,8 +442,7 @@
 
     private void generateHTTPPorts(OMFactory fac, OMElement service)
             throws Exception {
-        String[] exposedEPRs = axisService.getEPRs();
-        for (int i = 0; i < exposedEPRs.length; i++) {
+        for (int i = 0; i < serviceEndpointURLs.length; i++) {
             String urlString = serviceEndpointURLs[i];
             if (urlString != null && urlString.startsWith("http")) {
                 OMElement port = fac.createOMElement(PORT, wsdl);

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/SchemaGenerator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/SchemaGenerator.java?view=diff&rev=543836&r1=543835&r2=543836
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/SchemaGenerator.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/SchemaGenerator.java Sat Jun  2 20:17:03 2007
@@ -38,6 +38,7 @@
 import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
+import java.util.List;
 
 /*
 * Copyright 2004,2005 The Apache Software Foundation.
@@ -664,6 +665,10 @@
     public void setExcludeMethods(ArrayList excludeMethods) {
         if (excludeMethods == null) excludeMethods = new ArrayList();
         this.excludeMethods = excludeMethods;
+    }
+
+    public List getExcludeMethods() {
+        return this.excludeMethods;
     }
 
     public String getSchemaTargetNameSpace() {



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