You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@xml.apache.org by "Nelson, Christopher" <cn...@synchrony.net> on 2001/01/17 22:22:06 UTC

2.1 and polymorphism

We are using SOAP in a production environment, and needed polymorphism.  We
needed it on both on paramters and return objects.  By changing just a
couple lines of code in RPCRouter and BeanSerializer, we were able to
achieve this.  I would like to go ahead and commit this code so that 2.1 can
have this feature.  Basically, instead of serializing an object based on the
declared type, I serialize based on the type of the object actually passed
in (or returned). The two classes changed are BeanSerializer and RPCRouter.
Does anyone see any problem with this?  If not, I'll check it in.  I'm
attaching the files for those who are curious.


Re: 2.1 and polymorphism

Posted by David Corbin <dc...@machturtle.com>.
Could you please elaborate on why changes were necessary to
BeanSerializer?  I remember looking at this a  month ago, and it seemed
to me that only the RPCRouter would  have to change...


"Nelson, Christopher" wrote:
> 
> We are using SOAP in a production environment, and needed polymorphism.  We
> needed it on both on paramters and return objects.  By changing just a
> couple lines of code in RPCRouter and BeanSerializer, we were able to
> achieve this.  I would like to go ahead and commit this code so that 2.1 can
> have this feature.  Basically, instead of serializing an object based on the
> declared type, I serialize based on the type of the object actually passed
> in (or returned). The two classes changed are BeanSerializer and RPCRouter.
> Does anyone see any problem with this?  If not, I'll check it in.  I'm
> attaching the files for those who are curious.
> 
>   ------------------------------------------------------------------------
>                      Name: RPCRouter.java
>    RPCRouter.java    Type: text/x-java
>                  Encoding: quoted-printable
> 
>                           Name: BeanSerializer.java
>    BeanSerializer.java    Type: text/x-java
>                       Encoding: quoted-printable

-- 
David Corbin 		
Mach Turtle Technologies, Inc.
http://www.machturtle.com
dcorbin@machturtle.com

Re: 2.1 and polymorphism

Posted by Sanjiva Weerawarana <sa...@watson.ibm.com>.
This looks ok to me - I presume u tested with all the samples (and more
hopefully) right? This is a major change because it touches a core part,
but it looks pretty safe to me.

Matt, can u please look at the conditional change in BeanSerializer
(you wrote that I believe)? I'm not sure what the propType.equals
(Class.class) test used to do.

This has been a long standing issue and I've had email discussions
with someone for a while (was that u Chris? I need to check my
back-logged inbox). I'm glad to get it resolved!

Bye,

Sanjiva.

----- Original Message -----
From: "Nelson, Christopher" <cn...@synchrony.net>
To: <so...@xml.apache.org>
Sent: Wednesday, January 17, 2001 4:22 PM
Subject: 2.1 and polymorphism


> We are using SOAP in a production environment, and needed polymorphism.  We
> needed it on both on paramters and return objects.  By changing just a
> couple lines of code in RPCRouter and BeanSerializer, we were able to
> achieve this.  I would like to go ahead and commit this code so that 2.1 can
> have this feature.  Basically, instead of serializing an object based on the
> declared type, I serialize based on the type of the object actually passed
> in (or returned). The two classes changed are BeanSerializer and RPCRouter.
> Does anyone see any problem with this?  If not, I'll check it in.  I'm
> attaching the files for those who are curious.
>
>