You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Philippe Couas <pc...@infodev.fr> on 2004/12/27 17:03:50 UTC

WSDL2JAVA and default constructor with inheritance properties

Hi,



How force WSDL2Java to create a constructor with inheritance properties ?

I have two object :

GenObj with getter and setter for code propertites.

LteObj extend GenObj and add new properties



AXIS utilites don't create default constructor with inheritance properties ?

How could i force it ?

i have tried with -all without succes ?




Regards
Philippe
 
Fichier WSDL

<?xml version="1.0" encoding="UTF-8"?>

<wsdl:definitions targetNamespace="urn:Of"

xmlns:tns3="http://webservice9" xmlns:impl="urn:Of"

xmlns:intf="urn:Of" xmlns:apachesoap=" <http://xml.apache.org/xml-soap>
http://xml.apache.org/xml-soap"

xmlns:wsdlsoap=" <http://schemas.xmlsoap.org/wsdl/soap/>
http://schemas.xmlsoap.org/wsdl/soap/"

xmlns:soapenc=" <http://schemas.xmlsoap.org/soap/encoding/>
http://schemas.xmlsoap.org/soap/encoding/"

xmlns:xsd=" <http://www.w3.org/2001/XMLSchema>
http://www.w3.org/2001/XMLSchema"

xmlns:tns2="http://objs.webservice9"

xmlns:wsdl=" <http://schemas.xmlsoap.org/wsdl/>
http://schemas.xmlsoap.org/wsdl/">

<!--WSDL created by Apache Axis version: 1.2RC2

Built on Nov 16, 2004 (12:19:44 EST)-->

 <wsdl:types>

  <schema xmlns=" <http://www.w3.org/2001/XMLSchema>
http://www.w3.org/2001/XMLSchema"

targetNamespace="http://webservice9">

   <import namespace="http://objs.webservice9"/>

   <import namespace=" <http://xml.apache.org/xml-soap>
http://xml.apache.org/xml-soap"/>

   <import namespace=" <http://schemas.xmlsoap.org/soap/encoding/>
http://schemas.xmlsoap.org/soap/encoding/"/>

   <complexType abstract="true" name="GenUtil">

    <sequence/>

   </complexType>

  </schema>

  <schema xmlns=" <http://www.w3.org/2001/XMLSchema>
http://www.w3.org/2001/XMLSchema"

targetNamespace="http://objs.webservice9">

   <import namespace="http://webservice9"/>

   <import namespace=" <http://xml.apache.org/xml-soap>
http://xml.apache.org/xml-soap"/>

   <import namespace=" <http://schemas.xmlsoap.org/soap/encoding/>
http://schemas.xmlsoap.org/soap/encoding/"/>

   <complexType name="GenObj">

    <complexContent>

     <extension base="tns3:GenUtil">

      <sequence>

       <element name="code" nillable="true" type="xsd:string"/>

      </sequence>

     </extension>

    </complexContent>

   </complexType>

   <complexType name="ObjLte">

    <complexContent>

     <extension base="tns2:GenObj">

      <sequence>

       <element name="codeGamme" nillable="true" type="xsd:string"/>

       <element name="dateFinInitiale" nillable="true"

type="xsd:string"/>

       <element name="dateLancement" nillable="true"

type="xsd:string"/>

       <element name="designation" nillable="true" type="xsd:string"/>

       <element name="indiceGamme" nillable="true" type="xsd:string"/>

       <element name="lcdecl" nillable="true" type="xsd:string"/>

       <element name="qteInitiale" type="xsd:int"/>

       <element name="qteInitialeString" nillable="true"

type="xsd:string"/>

       <element name="suiteCle" nillable="true" type="xsd:string"/>

       <element name="typeLancement" nillable="true"

type="xsd:string"/>

      </sequence>

     </extension>

    </complexContent>

   </complexType>

  </schema>

  <schema xmlns=" <http://www.w3.org/2001/XMLSchema>
http://www.w3.org/2001/XMLSchema"

targetNamespace=" <http://xml.apache.org/xml-soap>
http://xml.apache.org/xml-soap">

   <import namespace="http://webservice9"/>

   <import namespace="http://objs.webservice9"/>

   <import namespace=" <http://schemas.xmlsoap.org/soap/encoding/>
http://schemas.xmlsoap.org/soap/encoding/"/>

   <complexType name="mapItem">

    <sequence>

     <element name="key" nillable="true" type="xsd:anyType"/>

     <element name="value" nillable="true" type="xsd:anyType"/>

    </sequence>

   </complexType>

   <complexType name="Map">

    <sequence>

     <element name="item" minOccurs="0" maxOccurs="unbounded"

type="apachesoap:mapItem"/>

    </sequence>

   </complexType>

  </schema>

 </wsdl:types>



   <wsdl:message name="lte_listRequest">

   </wsdl:message>

     </wsdl:portType>



   <wsdl:binding name="OfSoapBinding" type="impl:Of">



      <wsdlsoap:binding style="rpc"

transport=" <http://schemas.xmlsoap.org/soap/http>
http://schemas.xmlsoap.org/soap/http"/>



      <wsdl:operation name="getVersion">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="getVersionRequest">

            <wsdlsoap:body use="encoded"

encodingStyle=" <http://schemas.xmlsoap.org/soap/encoding/>
http://schemas.xmlsoap.org/soap/encoding/"

namespace="urn:Of"/>

         </wsdl:input>

         <wsdl:output name="getVersionResponse">

            <wsdlsoap:body use="encoded"

encodingStyle=" <http://schemas.xmlsoap.org/soap/encoding/>
http://schemas.xmlsoap.org/soap/encoding/"

namespace="urn:Of"/>

         </wsdl:output>



           <wsdl:operation name="lte_list">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="lte_listRequest">

            <wsdlsoap:body use="encoded"

encodingStyle=" <http://schemas.xmlsoap.org/soap/encoding/>
http://schemas.xmlsoap.org/soap/encoding/"

namespace="urn:Of"/>

         </wsdl:input>

         <wsdl:output name="lte_listResponse">

            <wsdlsoap:body use="encoded"

encodingStyle=" <http://schemas.xmlsoap.org/soap/encoding/>
http://schemas.xmlsoap.org/soap/encoding/"

namespace="urn:Of"/>

         </wsdl:output>

      </wsdl:operation>

     

   </wsdl:binding>



   <wsdl:service name="OfService">



      <wsdl:port name="Of" binding="impl:OfSoapBinding">



         <wsdlsoap:address

location=" <http://172.16.0.101:8080/axis/services/Of>
http://172.16.0.101:8080/axis/services/Of"/>



      </wsdl:port>



   </wsdl:service>



</wsdl:definitions>







/**

 * ObjLte.java

 *

 * This file was auto-generated from WSDL

 * by the Apache Axis 1.2RC2 Nov 16, 2004 (12:19:44 EST) WSDL2Java

emitter.

 */



package webservice9.ws.of;



public class ObjLte  extends webservice9.ws.of.GenObj  implements

java.io.Serializable {

    private java.lang.String codeGamme;

    private java.lang.String dateFinInitiale;

    private java.lang.String dateLancement;

    private java.lang.String designation;

    private java.lang.String indiceGamme;

    private java.lang.String lcdecl;

    private int qteInitiale;

    private java.lang.String qteInitialeString;

    private java.lang.String suiteCle;

    private java.lang.String typeLancement;



    public ObjLte() {

    }



HERE Constructor don't have "code" properties from GenObj ???

    public ObjLte(

           java.lang.String codeGamme,

           java.lang.String dateFinInitiale,

           java.lang.String dateLancement,

           java.lang.String designation,

           java.lang.String indiceGamme,

           java.lang.String lcdecl,

           int qteInitiale,

           java.lang.String qteInitialeString,

           java.lang.String suiteCle,

           java.lang.String typeLancement) {

           this.codeGamme = codeGamme;

           this.dateFinInitiale = dateFinInitiale;

           this.dateLancement = dateLancement;

           this.designation = designation;

           this.indiceGamme = indiceGamme;

           this.lcdecl = lcdecl;

           this.qteInitiale = qteInitiale;

           this.qteInitialeString = qteInitialeString;

           this.suiteCle = suiteCle;

           this.typeLancement = typeLancement;

    } 

}

------------------

package webservice9.ws.of;



public class GenObj  extends webservice9.ws.of.GenUtil  implements

java.io.Serializable {

    private java.lang.String code;



    public GenObj() {

    }



    public GenObj(

           java.lang.String code) {

           this.code = code;

    }





    /**

     * Gets the code value for this GenObj.

     * 

     * @return code

     */

    public java.lang.String getCode() {

        return code;

    }





    /**

     * Sets the code value for this GenObj.

     * 

     * @param code

     */

    public void setCode(java.lang.String code) {

        this.code = code;

    }



    private java.lang.Object __equalsCalc = null;

    public synchronized boolean equals(java.lang.Object obj) {

        if (!(obj instanceof GenObj)) return false;

        GenObj other = (GenObj) obj;

        if (obj == null) return false;

        if (this == obj) return true;

        if (__equalsCalc != null) {

            return (__equalsCalc == obj);

        }

        __equalsCalc = obj;

        boolean _equals;

        _equals = super.equals(obj) && 

            ((this.code==null && other.getCode()==null) || 

             (this.code!=null &&

              this.code.equals(other.getCode())));

        __equalsCalc = null;

        return _equals;

    }



    private boolean __hashCodeCalc = false;

    public synchronized int hashCode() {

        if (__hashCodeCalc) {

            return 0;

        }

        __hashCodeCalc = true;

        int _hashCode = super.hashCode();

        if (getCode() != null) {

            _hashCode += getCode().hashCode();

        }

        __hashCodeCalc = false;

        return _hashCode;

    }



    // Type metadata

    private static org.apache.axis.description.TypeDesc typeDesc =

        new org.apache.axis.description.TypeDesc(GenObj.class, true);



    static {

        typeDesc.setXmlType(new

javax.xml.namespace.QName("http://objs.webservice9", "GenObj"));

        org.apache.axis.description.ElementDesc elemField = new

org.apache.axis.description.ElementDesc();

        elemField.setFieldName("code");

        elemField.setXmlName(new javax.xml.namespace.QName("",

"code"));

        elemField.setXmlType(new

javax.xml.namespace.QName(" <http://www.w3.org/2001/XMLSchema>
http://www.w3.org/2001/XMLSchema",

"string"));

        typeDesc.addFieldDesc(elemField);

    }



    /**

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

    } 

}