Axis 1.x does not support union types.

On 8/22/06, John Smith <[EMAIL PROTECTED]> wrote:
Hi,

I am using Axis 1.4, and I have a question regarding
WSDL2java and code generation.

I am trying to generate the code corresponding to a
union structure (see element named "type" in the
attached file ProbableCause.xsd).
I build the java code using the following command :
java -classpath $CLASSPATH
org.apache.axis.wsdl.WSDL2java --server-side -v
SpeedTest.wsdl

The generated code for ProbableCause_T.java seems ok.
However, the generated code for
ProbableCause_TType.java seems bizarre to me.
Although the "type" consists of a union of possible
enumerations (ex "AIS"), the enumeration values are
not present in the generated java file, which makes me
think something's wrong there.
Also, looking at the generated java code, it also
mentions that Simple Types must have a String
constructor, but this one hasn't any.
See the extract of the generated Java file (also
attached) :

public class ProbableCause_TType  implements
java.io.Serializable,
org.apache.axis.encoding.SimpleType {
    public ProbableCause_TType() {
    }

    // Simple Types must have a String constructor
    private java.lang.Object __equalsCalc = null;


Am I missing something here ?
I am not sure if the java file reflects accurately
what's in the xsd file, or not ...

Thanks,
John.



___________________________________________________________
To help you stay safe and secure online, we've developed the all new Yahoo! 
Security Centre. http://uk.security.yahoo.com

/**
 * ProbableCause_TType.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
 */

package v1.tmf854;

public class ProbableCause_TType  implements java.io.Serializable, 
org.apache.axis.encoding.SimpleType {
    public ProbableCause_TType() {
    }

    // Simple Types must have a String constructor
    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof ProbableCause_TType)) return false;
        ProbableCause_TType other = (ProbableCause_TType) 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(ProbableCause_TType.class, 
true);

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("tmf854.v1", 
">ProbableCause_T>type"));
    }

    /**
     * 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);
    }

}



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to