You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@ws.apache.org by Kevin Mitchell <ke...@xmls.com> on 2000/10/05 14:38:08 UTC

RE: Minor changes to bean serializer -- request a review by a com mitter

Actually, I think it does make sense for the behavior exhibited by the
LenientBeanSerializer to be the default. One of the advantages of XML as a
data exchange mechanism is the ability for one party to add information
without affecting the other(s); one just ignores the information it doesn't
care about. I think the default should be less restrictive (simple), and
folks can implement customizations to make things more restrictive.

others??


-----Original Message-----
From: Nelson, Christopher
To: soap-dev@xml.apache.org
Cc: Galluzzo, Eric
Sent: 10/4/2000 5:24 PM
Subject: Minor changes to bean serializer -- request a review by a committ
er

We needed to make a few minor changes to BeanSerializer to make it do
something useful for our project.  We needed to have a version that
would be
less sensitive to change -- a lenient bean serializer if you will.  The
current bean serializer will not have a problem if a property is added
that
is unknown, but will die if a property that it finds in the XML is not
present on the bean.  We wanted to change this slightly so that it will
ignore properties in the XML that it cannot match with properties on the
actual bean in unmarshall().  It would probably not make sense to have
this
be the default logic, so we created a LenientBeanSerializer that extends
BeanSerializer.  But in order to do this, we had to change the
getWriteMethod() method from private to protected so we could override
it.
We also took the liberty of removing the static keyword from several
methods
that seemed to no longer require it.  We would request one of the
authorized
submitters to have a look at our changes and if there are no serious
objections, to submit the code to CVS.

I've attached our version of BeanSerializer, a diff with the one in CVS,
and
LenientBeanSerializer.  BeanSerializer is mainly what we would like to
see
reach CVS. LenientBeanSerializer is provided for informational purposes,
but
if other folks find it interesting, great.

Thanks very much,

Chris Nelson
Eric Galluzzo
Synchrony Communications, Inc.

 <<BeanSerializer.java>>  <<BeanSerializer.java.orig>>  
<<BeanSerializer.patch>>  <<LenientBeanSerializer.java>> 

Re: Minor changes to bean serializer -- request a review by a committer

Posted by George I Matkovits <ma...@uswest.net>.
Yes. IMHO it should replace the current default.

Kevin Mitchell wrote:

> Actually, I think it does make sense for the behavior exhibited by the
> LenientBeanSerializer to be the default. One of the advantages of XML as a
> data exchange mechanism is the ability for one party to add information
> without affecting the other(s); one just ignores the information it doesn't
> care about. I think the default should be less restrictive (simple), and
> folks can implement customizations to make things more restrictive.
>
> others??
>
> -----Original Message-----
> From: Nelson, Christopher
> To: soap-dev@xml.apache.org
> Cc: Galluzzo, Eric
> Sent: 10/4/2000 5:24 PM
> Subject: Minor changes to bean serializer -- request a review by a committ
> er
>
> We needed to make a few minor changes to BeanSerializer to make it do
> something useful for our project.  We needed to have a version that
> would be
> less sensitive to change -- a lenient bean serializer if you will.  The
> current bean serializer will not have a problem if a property is added
> that
> is unknown, but will die if a property that it finds in the XML is not
> present on the bean.  We wanted to change this slightly so that it will
> ignore properties in the XML that it cannot match with properties on the
> actual bean in unmarshall().  It would probably not make sense to have
> this
> be the default logic, so we created a LenientBeanSerializer that extends
> BeanSerializer.  But in order to do this, we had to change the
> getWriteMethod() method from private to protected so we could override
> it.
> We also took the liberty of removing the static keyword from several
> methods
> that seemed to no longer require it.  We would request one of the
> authorized
> submitters to have a look at our changes and if there are no serious
> objections, to submit the code to CVS.
>
> I've attached our version of BeanSerializer, a diff with the one in CVS,
> and
> LenientBeanSerializer.  BeanSerializer is mainly what we would like to
> see
> reach CVS. LenientBeanSerializer is provided for informational purposes,
> but
> if other folks find it interesting, great.
>
> Thanks very much,
>
> Chris Nelson
> Eric Galluzzo
> Synchrony Communications, Inc.
>
>  <<BeanSerializer.java>>  <<BeanSerializer.java.orig>>
> <<BeanSerializer.patch>>  <<LenientBeanSerializer.java>>


Re: Minor changes to bean serializer -- request a review by a committer

Posted by George I Matkovits <ma...@uswest.net>.
Yes. IMHO it should replace the current default.

Kevin Mitchell wrote:

> Actually, I think it does make sense for the behavior exhibited by the
> LenientBeanSerializer to be the default. One of the advantages of XML as a
> data exchange mechanism is the ability for one party to add information
> without affecting the other(s); one just ignores the information it doesn't
> care about. I think the default should be less restrictive (simple), and
> folks can implement customizations to make things more restrictive.
>
> others??
>
> -----Original Message-----
> From: Nelson, Christopher
> To: soap-dev@xml.apache.org
> Cc: Galluzzo, Eric
> Sent: 10/4/2000 5:24 PM
> Subject: Minor changes to bean serializer -- request a review by a committ
> er
>
> We needed to make a few minor changes to BeanSerializer to make it do
> something useful for our project.  We needed to have a version that
> would be
> less sensitive to change -- a lenient bean serializer if you will.  The
> current bean serializer will not have a problem if a property is added
> that
> is unknown, but will die if a property that it finds in the XML is not
> present on the bean.  We wanted to change this slightly so that it will
> ignore properties in the XML that it cannot match with properties on the
> actual bean in unmarshall().  It would probably not make sense to have
> this
> be the default logic, so we created a LenientBeanSerializer that extends
> BeanSerializer.  But in order to do this, we had to change the
> getWriteMethod() method from private to protected so we could override
> it.
> We also took the liberty of removing the static keyword from several
> methods
> that seemed to no longer require it.  We would request one of the
> authorized
> submitters to have a look at our changes and if there are no serious
> objections, to submit the code to CVS.
>
> I've attached our version of BeanSerializer, a diff with the one in CVS,
> and
> LenientBeanSerializer.  BeanSerializer is mainly what we would like to
> see
> reach CVS. LenientBeanSerializer is provided for informational purposes,
> but
> if other folks find it interesting, great.
>
> Thanks very much,
>
> Chris Nelson
> Eric Galluzzo
> Synchrony Communications, Inc.
>
>  <<BeanSerializer.java>>  <<BeanSerializer.java.orig>>
> <<BeanSerializer.patch>>  <<LenientBeanSerializer.java>>