Retriving Inherited Objects in an Array

Retriving Inherited Objects in an Array

Post by YnJpYW4ubW » Thu, 13 Jan 2005 07:07:01

have a web service in a technology called Jade. It is returning a
StudentObject, which has an array of Application Objects on it. The
Application objects never are actually Application Instances, they are always
inherited types. eg.

public class Student
public Application[] allApplications;
public class Application
public class ApplicationType1 : Application
public class ApplicationType2 : Application

When the Jade web service returns these paramaters. It returns it as
follows. Which seems correct. I also created a .Net version which returns the
same thing. When .Net recieves the XML from the Jade web service it complains
that it cant put a AppliationType1 in and array of type Application[] has
anyone had this problem before? In both cases the inherited types are defined
in the WSDL file and do inherit from the Application Class. The .Net version
works fine. It can deal with the inherited type so it isnt that it cant do
it, just that something is wrong.

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi=""
<soap:Header soap:encodingStyle="">
<types:JadeSessionHeader xsi:type="types:JadeSessionHeader">
<soap:Body soap:encodingStyle="">
<pStudent href="#Student339"/>
<types:Student id="Student339" xsi:type="types:Student">
<allApplications xsi:type="soapenc:Array"
<HobApplication xsi:type="UnderGraduateApplication">

The .Net version returns this
<?xml version="1.0" encoding="utf-8"?>
<Student xmlns:xsd=""
<HobApplication xsi:type="UnderGraduateApplication">