axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 25396] New: - xsd:list not supported --> not generate any Java field
Date Wed, 10 Dec 2003 13:21:17 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25396>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25396

xsd:list not supported --> not generate any Java field

           Summary: xsd:list not supported --> not generate any Java field
           Product: Axis
           Version: current (nightly)
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: WSDL processing
        AssignedTo: axis-dev@ws.apache.org
        ReportedBy: a_andrieux@hotmail.com


Overview Description: 
---------------------
A custom Schema simple type based on xsd:list 
is translated by WSDL2Java into a Java class 
that does not feature any kind of member field 
(inherited or in proper) to maintain the value 
of the list.

Example Input Schema
--------------------
    <xsd:simpleType name="ListOfInteger">
        <xsd:list itemType="xsd:integer"/>
    </xsd:simpleType>

Generated Java code:
--------------------
public class ListOfInteger  implements java.io.Serializable,
org.apache.axis.encoding.SimpleType {

    public ListOfInteger() {
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof ListOfInteger)) return false;
        ListOfInteger other = (ListOfInteger) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true;
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = 1;
        __hashCodeCalc = false;
        return _hashCode;
    }

    // Type metadata
    private static org.apache.axis.description.TypeDesc typeDesc =
        new org.apache.axis.description.TypeDesc(ListOfInteger.class, true);

    static {
        typeDesc.setXmlType(new
javax.xml.namespace.QName("http://www.gridforum.org/namespaces/agreement",
"ListOfInteger"));
    }

    /**
     * Return type metadata object
     */
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
        return typeDesc;
    }

    /**
     * Get Custom Serializer
     */
    public static org.apache.axis.encoding.Serializer getSerializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.SimpleSerializer(
            _javaType, _xmlType, typeDesc);
    }

    /**
     * Get Custom Deserializer
     */
    public static org.apache.axis.encoding.Deserializer getDeserializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.SimpleDeserializer(
            _javaType, _xmlType, typeDesc);
    }

}


Consequences:
-------------
I expect the value of the list to be 
lost during de/serialization.

Proposal/Expected Behavior
--------------------------
Generate some field in the Java class 
for the value of the list (otherwise 
I really don't see how things are going to work!). 

At least WSDL2Java should tell us that 
xsd:list is not supported with an error.

Build Date: 
-----------
I build source from a CVS check out made on 12/10/2003, around 2:00 am

Mime
View raw message