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 Mark Volkmann <vo...@charter.net> on 2003/04/12 17:17:52 UTC
handling subclass types
I'm reposting this because I accidently sent it out with the wrong subject.
Sorry.
Should I be able to do this in Axis?
I have a class called Portfolio that has a field of type Holding[].
The Holding class has a reference to a Security object.
Stock, Bond and MutualFund are all subclasses of Security.
I use java2wsdl to generate a WSDL description of my service.
I use wsdl2java to generate client stub classes.
I have a service that returns the Security of the first Holding in a
Portfolio and that correctly returns the right kind of object, a Bond in my
case.
I have a service that returns the whole Portfolio and it's coming up empty.
I see in tcpmon that all the data is there.
I suspect there is an issue with deserializing a collection of subclass
types.
Has anyone encountered this problem?
Re: handling subclass types
Posted by Benjamin Tomasini <bt...@neteverything.com>.
Mark,
Glad you figured it out, and that you changed the subject. :) You can
disregard my last posting.
Ben
On Sat, 2003-04-12 at 11:28, Mark Volkmann wrote:
> I figured it out. It turns out that I didn't have a setHoldings method in my
> Portfolio class, so even though the data was being returned in the SOAP
> response, Axis couldn't do anthing with it since there was no set method it
> could call.
>
> It seems to me that Axis should generate a warning message when this
> happens. I think you usually would want to know if there is data in the SOAP
> response that it just being dropped in the bit bucket.
>
> ----- Original Message -----
> From: "Mark Volkmann" <vo...@charter.net>
> To: <ax...@ws.apache.org>
> Sent: Saturday, April 12, 2003 10:17 AM
> Subject: handling subclass types
>
>
> > I'm reposting this because I accidently sent it out with the wrong
> subject.
> > Sorry.
> >
> > Should I be able to do this in Axis?
> >
> > I have a class called Portfolio that has a field of type Holding[].
> > The Holding class has a reference to a Security object.
> > Stock, Bond and MutualFund are all subclasses of Security.
> > I use java2wsdl to generate a WSDL description of my service.
> > I use wsdl2java to generate client stub classes.
> > I have a service that returns the Security of the first Holding in a
> > Portfolio and that correctly returns the right kind of object, a Bond in
> my
> > case.
> > I have a service that returns the whole Portfolio and it's coming up
> empty.
> > I see in tcpmon that all the data is there.
> > I suspect there is an issue with deserializing a collection of subclass
> > types.
> > Has anyone encountered this problem?
> >
> >
> >
> >
>
>
Re: handling subclass types
Posted by Mark Volkmann <vo...@charter.net>.
I figured it out. It turns out that I didn't have a setHoldings method in my
Portfolio class, so even though the data was being returned in the SOAP
response, Axis couldn't do anthing with it since there was no set method it
could call.
It seems to me that Axis should generate a warning message when this
happens. I think you usually would want to know if there is data in the SOAP
response that it just being dropped in the bit bucket.
----- Original Message -----
From: "Mark Volkmann" <vo...@charter.net>
To: <ax...@ws.apache.org>
Sent: Saturday, April 12, 2003 10:17 AM
Subject: handling subclass types
> I'm reposting this because I accidently sent it out with the wrong
subject.
> Sorry.
>
> Should I be able to do this in Axis?
>
> I have a class called Portfolio that has a field of type Holding[].
> The Holding class has a reference to a Security object.
> Stock, Bond and MutualFund are all subclasses of Security.
> I use java2wsdl to generate a WSDL description of my service.
> I use wsdl2java to generate client stub classes.
> I have a service that returns the Security of the first Holding in a
> Portfolio and that correctly returns the right kind of object, a Bond in
my
> case.
> I have a service that returns the whole Portfolio and it's coming up
empty.
> I see in tcpmon that all the data is there.
> I suspect there is an issue with deserializing a collection of subclass
> types.
> Has anyone encountered this problem?
>
>
>
>