I'm trying to factorise my wsdl descriptions for all our web services, but as soon as I use the <extension base="..." the stubs which are generated are completely empty. Is there some special magic option I need to set, or is this functionality just not supported by Axis yet? (using 1.1 beta)
The class I want to extend is not even generated by Axis (in the example below, the SDResult class)


I'd appreciate any thoughts on where I'm going wrong.

Here's my wsdl snippet :

...
<xsd:schema>
<xsd:complexType abstract="true" name="SDResult">
<xsd:sequence>
<xsd:element name="SDId" type="xsd:string"/>
<xsd:element name="SDIndex" type="xsd:int"/>
<xsd:element name="SDMimeType" type="xsd:string"/>
<xsd:element name="SDURL" type="xsd:string"/>
<xsd:element name="SDStatus" type="xsd:string"/>
<xsd:element name="SDMessage" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>


<xsd:complexType name="EmailResult">
<complexContent>
<extension base="SDResult">
<sequence>
<xsd:element name="Result" type="xsd:string"/>
</extension>
</extension>
</complexContent>
</xsd:complexType>
</xsd:schema>
...




and the empty EmailResult object generated is :

...
public class EmailResult  implements java.io.Serializable {

   public EmailResult() {
   }

   private java.lang.Object __equalsCalc = null;
   public synchronized boolean equals(java.lang.Object obj) {
       if (!(obj instanceof EmailResult)) return false;
       EmailResult other = (EmailResult) 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(EmailResult.class, true);

static {
typeDesc.setXmlType(new javax.xml.namespace.QName("urn:email.services", "EmailResult"));
}


   /**
    * 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.BeanSerializer(
_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.BeanDeserializer(
_javaType, _xmlType, typeDesc);
}


}

Reply via email to