The generated dataclasses on the appway side look fine, we have the correct inheritance and everything.
What I finally get in the $returnValue in the IntegrationLink however is a list of Containers wich contain objects of Vehicle.
What I want is to somehow get the Car / Plane with all its attributes.
I tried to cast the Vehicle but I get an exception:
Can not assign ws_dto_Vehicle to ws_dto_Car
I also tried simply converting it, but only the shared attributes get set.
Is there any way we can handle such abstract types with appway?
The simplified situation is as follows:
@WebService
Service1
List<Container> getContainersWithCars() @WebMethod
@WebService
Service2
List<Container> getContainersWithPlanes() @WebMethod
@XmlType(name = "Container")
Container
Vehicle vehicle;
...
@XmlType(name = "Vehicle")
@XmlSeeAlso({ Car.class, Plane.class })
Vehicle[abstract]
Integer weight;
String colour;
...
@XmlType(name = "Car")
Car[extends Vehicle]
String ...
@XmlType(name = "Plane")
Plane[extends Vehicle]
String ...
Service1 returns a list of Containers, which all contain cars, Service2 does the same with planes.
When I test these webservices with SoapUI, i get the correct types set in the containers. Example with Service1:
<container>
<vehicle xsi:type="ns4:Car" xml...>
...
</vehicle>
...
</container>
<container>
<vehicle xsi:type="ns4:Car" xml...>
...
</vehicle>
...
</container>
...
The generated dataclasses on the appway side look fine, we have the correct inheritance and everything.
What I finally get in the $returnValue in the IntegrationLink however is a list of Containers wich contain objects of Vehicle.
What I want is to somehow get the Car / Plane with all its attributes.
I tried to cast the Vehicle but I get an exception:
I also tried simply converting it, but only the shared attributes get set.
Is there any way we can handle such abstract types with appway?
Thanks,
Murat