473,473 Members | 1,820 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Retriving Inherited Objects in an Array

I 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="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tns="urn:JadeWebServices/WebService/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:types="urn:JadeWebServices/WebService/encodedTypes">
<soap:Header soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<types:JadeSessionHeader xsi:type="types:JadeSessionHeader">
<sessionId>9a11545874af0dc4</sessionId>
</types:JadeSessionHeader>
</soap:Header>
<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<types:getSetStudentResponse>
<pStudent href="#Student339"/>
</types:getSetStudentResponse>
<types:Student id="Student339" xsi:type="types:Student">
<birthDate>1978-01-01</birthDate>
<familyName>Ty</familyName>
<givenNames>Indo</givenNames>
<allApplications xsi:type="soapenc:Array"
soapenc:arrayType="types:HobApplication[1]">
<HobApplication xsi:type="UnderGraduateApplication">
<applicationId>50</applicationId>
<arrivalDate>1900-01-01</arrivalDate>
<assessPreferenceNo>1</assessPreferenceNo>
<myApplicationType>
<name>Undergraduate</name>
<oid>3788.133</oid>
<value>Undergraduate</value>
</myApplicationType>
</HobApplication>
</allApplications>
</types:Student>
</soap:Body>
</soap:Envelope>

The .Net version returns this
<?xml version="1.0" encoding="utf-8"?>
<Student xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://tempuri.org/">
<firstName_>Indo</firstName_>
<lastName_>Ty</lastName_>
<allApplications>
<HobApplication xsi:type="UnderGraduateApplication">
<arrivalDestination>Melbourne</arrivalDestination>
<assessPreferenceNo>2</assessPreferenceNo>
<commencementYear>2005</commencementYear>
<applicationsID>0</applicationsID>
<ApplicationType>Undergraduate</ApplicationType>
</HobApplication>
</allApplications>
</Student>
Nov 23 '05 #1
0 1091

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Josh Mcfarlane | last post by:
I'm doing recomposition of objects from binary streams, and the best way for me to write them out is to write base class data first, forward to inherited classes, pointer class values, etc. Now,...
1
by: MIchael McDowell | last post by:
Anyidea how this might be done using and XML Web Service and the XMLSerialzation class? A pointer to an online example would be deeply appreciated. Thankyou in advance, Michael McD
6
by: Andreas | last post by:
Hello list, what about uniqueness of inherited primary keys ? eg you have : create table objects ( id int4, date_created timestamp(0), primary key (id)
35
by: MuZZy | last post by:
Hi All, I got a issue here and hope someone can help me: Let's consider this code: // =================== CODE START ================================= using System; using System.Data; ...
0
by: hazz | last post by:
i have an array (or collection if necessary) of Customers with CustomerID and several properties. For each of these Customers I will have a one to many relationship with Customer products....
1
by: Sniper | last post by:
Hi Guys, I am using a web service to get the item details via a web service(connceting tru Dial-up). Item details are comming back to the client as a dataset. now there are lot of updates and...
6
by: Peter Oliphant | last post by:
I just discovered that the ImageList class can't be inherited. Why? What could go wrong? I can invision a case where someone would like to add, say, an ID field to an ImageList, possible so that...
0
by: porter_wss | last post by:
I am a bit confused on serializing objects and inherited objects. What I am trying to accomplish is creating a base object and an inherited object with additional properties. The sender of these...
21
by: George Exarchakos | last post by:
Hi everyone, I'd like your help... Can we have a std::list<BASEwhere BASE be the base class of a class hierarchy? I want to add to this list objects that are inherited from BASE class but not...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.