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 Hackl Ingo <In...@ams-engineering.com> on 2007/04/13 07:51:37 UTC

Problems with Inheritance

Hi,

I have a problem when I create the wsdl-file for the following class
hierachy.

public abstract class WsSetPointDto  implements java.io.Serializable 
{
	...
}

public abstract class WsSetPointDtoV1 extends WsSetPointDto implements
Serializable {
  private String typeNumber;
  private String machineStructureName;

	...
}

public abstract class WsSetPointMachineStructureComponentDtoV1 extends
    WsSetPointDtoV1 implements Serializable
{
  private int cycleTime;
  private float quantityPerCycle;
  private float maxNotOk;
  private float availability;
  private double desiredQuantityPerHour;
  private int timePerQuantity;

	...
}

public class WsSetPointBasicSystemDtoV1 extends
    WsSetPointMachineStructureComponentDtoV1 implements Serializable { }

The generated wsdl-file looks like the following:

   <complexType abstract="true" name="WsSetPointDto">
    <sequence/>
   </complexType>
   <complexType abstract="true" name="WsSetPointDtoV1">
    <complexContent>
     <extension base="tns2:WsSetPointDto">
      <sequence/>
     </extension>
    </complexContent>
   </complexType>
   <complexType abstract="true"
name="WsSetPointMachineStructureComponentDtoV1">
    <complexContent>
     <extension base="tns2:WsSetPointDtoV1">
      <sequence/>
     </extension>
    </complexContent>
   </complexType>
   <complexType name="WsSetPointBasicSystemDtoV1">
    <complexContent>
     <extension base="tns2:WsSetPointMachineStructureComponentDtoV1">
      <sequence/>
     </extension>
    </complexContent>
   </complexType>
  </schema>

So the <element name>-tags for all attributes are missing. This error
only occurs if the class hierarchie has more than two levels. Is there a
general restriction that class hierachies can only have two levels or is
this a bug ? Is there a work around for this problem ?

I can't really believe that no one else has expirienced this problem.

Thanks

Ingo
 


 

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


Re: Problems with Inheritance

Posted by Stefano Emilio Campanini <st...@gmail.com>.
On 4/13/07, Hackl Ingo <In...@ams-engineering.com> wrote:
> Hi,

Hi, Also I have seen that the tool dosen't work with abtract classes...

Bye

>
> I have a problem when I create the wsdl-file for the following class
> hierachy.
>
> public abstract class WsSetPointDto  implements java.io.Serializable
> {
>         ...
> }
>
> public abstract class WsSetPointDtoV1 extends WsSetPointDto implements
> Serializable {
>   private String typeNumber;
>   private String machineStructureName;
>
>         ...
> }
>
> public abstract class WsSetPointMachineStructureComponentDtoV1 extends
>     WsSetPointDtoV1 implements Serializable
> {
>   private int cycleTime;
>   private float quantityPerCycle;
>   private float maxNotOk;
>   private float availability;
>   private double desiredQuantityPerHour;
>   private int timePerQuantity;
>
>         ...
> }
>
> public class WsSetPointBasicSystemDtoV1 extends
>     WsSetPointMachineStructureComponentDtoV1 implements Serializable { }
>
> The generated wsdl-file looks like the following:
>
>    <complexType abstract="true" name="WsSetPointDto">
>     <sequence/>
>    </complexType>
>    <complexType abstract="true" name="WsSetPointDtoV1">
>     <complexContent>
>      <extension base="tns2:WsSetPointDto">
>       <sequence/>
>      </extension>
>     </complexContent>
>    </complexType>
>    <complexType abstract="true"
> name="WsSetPointMachineStructureComponentDtoV1">
>     <complexContent>
>      <extension base="tns2:WsSetPointDtoV1">
>       <sequence/>
>      </extension>
>     </complexContent>
>    </complexType>
>    <complexType name="WsSetPointBasicSystemDtoV1">
>     <complexContent>
>      <extension base="tns2:WsSetPointMachineStructureComponentDtoV1">
>       <sequence/>
>      </extension>
>     </complexContent>
>    </complexType>
>   </schema>
>
> So the <element name>-tags for all attributes are missing. This error
> only occurs if the class hierarchie has more than two levels. Is there a
> general restriction that class hierachies can only have two levels or is
> this a bug ? Is there a work around for this problem ?
>
> I can't really believe that no one else has expirienced this problem.
>
> Thanks
>
> Ingo
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

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