Hi, This is a more or less well known problem or feature in Soap2.2 a specialized class will be serialized as the superclass which your server code returns and not as the spesialized class which it was constructed as. To get around this you'll either have to change to bean serializer code or possible solve this by writing your own serializer.
Ronny -----Original Message----- From: dovle [mailto:[EMAIL PROTECTED]] Sent: 21. mars 2002 13:59 To: [EMAIL PROTECTED] Subject: Re: Simple question Answer inline : > Hi, > > Isn't this a question for a Beans forum, like the one on > http://forum.java.sun.com/forum.jsp?forum=39 nope. Why do you think this ? My 'problem' is that I really return a B object but the apache soap sees it as a A class (only an A object) because of the method signature. It does not care if this is a B class. It serialize an A class (encoding for A, attribs of A, no params from B, no encoding from B) . I was 'dazzled' because, if using only java (no soap no nada) then calling methd( param ) will give me a B object but only casted to an A object. So result.getClass() will be B instead of A . HOpe I made miself clear... am I ? :o))) Don't misunderstand me, it is not a real problem, I was only puzzled with this behaviour. And I was asking for some philosophical answer. > > Michel > > -----Original Message----- > From: dovle [mailto:[EMAIL PROTECTED]] > Sent: donderdag 21 maart 2002 13:48 > To: '[EMAIL PROTECTED]' > Subject: Simple question > > > Hi all, > My situation > > Class A (bean) > Class B (bean too) extends A > > A method( params ) > { > return new B() ; > } > > The encoding is for the A class. Is this thing correct ? Why ? (supposing I > have registered also the B class) > > thanks > dovle