You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Larry Brasfield <la...@theplatform.com> on 2001/04/04 10:30:01 UTC

Changes to deserialize Bean members without type decl attributes

As BeanSerializer currently works, by relying on ParameterSerializer
and forsaking the type information offered by Bean's, the unmarshall()
method can only accept XML where each member Element has a type
declaration attribute.

I have made some simple and clean changes to BeanSerializer so
that it can accept XML members without such type declarations,
instead using the PropertyDescriptor[] array that is readily obtained
for a proper Bean to drive deserialization when the property type info,
along with the provided XMLJavaMappingRegistry, permits.

I believe this change, or some equivalent, should be incorporated
into the project source tree.  But first I would like to solicit
opinions
as to whether there is any good reason to insist upon finding type
declaration attributes on every member in the incoming XML.  Also,
can anybody think of any gotcha's this approach might create?

Thanks in advance,

-Larry Brasfield


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


Re: Changes to deserialize Bean members without type decl attributes

Posted by Tiger Liu <xi...@yahoo.com>.
Hi, 

It must be great if we wouldn't need to declare
BeanSerializer for all Bean objects. Why don't set
BeanSerializer as the default serializer/deserializer?


Whe I want to pass an object of class A, I have to
declare beanserializer for A and all its super classes
and. Is that true?  If some of the object's properties
are bean object, we also need to declare serializer
for their class. It is boring! Anyone has better
solution? 

Thanks a lot.

Liu

--- Larry Brasfield <la...@theplatform.com>
wrote:
> As BeanSerializer currently works, by relying on
> ParameterSerializer
> and forsaking the type information offered by
> Bean's, the unmarshall()
> method can only accept XML where each member Element
> has a type
> declaration attribute.
> 
> I have made some simple and clean changes to
> BeanSerializer so
> that it can accept XML members without such type
> declarations,
> instead using the PropertyDescriptor[] array that is
> readily obtained
> for a proper Bean to drive deserialization when the
> property type info,
> along with the provided XMLJavaMappingRegistry,
> permits.
> 
> I believe this change, or some equivalent, should be
> incorporated
> into the project source tree.  But first I would
> like to solicit
> opinions
> as to whether there is any good reason to insist
> upon finding type
> declaration attributes on every member in the
> incoming XML.  Also,
> can anybody think of any gotcha's this approach
> might create?
> 
> Thanks in advance,
> 
> -Larry Brasfield
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> soap-user-unsubscribe@xml.apache.org
> For additional commands, email:
> soap-user-help@xml.apache.org
> 


__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


Re: Changes to deserialize Bean members without type decl attributes

Posted by Tiger Liu <xi...@yahoo.com>.
Hi, 

It must be great if we wouldn't need to declare
BeanSerializer for all Bean objects. Why don't set
BeanSerializer as the default serializer/deserializer?


Whe I want to pass an object of class A, I have to
declare beanserializer for A and all its super classes
and. Is that true?  If some of the object's properties
are bean object, we also need to declare serializer
for their class. It is boring! Anyone has better
solution? 

Thanks a lot.

Liu

--- Larry Brasfield <la...@theplatform.com>
wrote:
> As BeanSerializer currently works, by relying on
> ParameterSerializer
> and forsaking the type information offered by
> Bean's, the unmarshall()
> method can only accept XML where each member Element
> has a type
> declaration attribute.
> 
> I have made some simple and clean changes to
> BeanSerializer so
> that it can accept XML members without such type
> declarations,
> instead using the PropertyDescriptor[] array that is
> readily obtained
> for a proper Bean to drive deserialization when the
> property type info,
> along with the provided XMLJavaMappingRegistry,
> permits.
> 
> I believe this change, or some equivalent, should be
> incorporated
> into the project source tree.  But first I would
> like to solicit
> opinions
> as to whether there is any good reason to insist
> upon finding type
> declaration attributes on every member in the
> incoming XML.  Also,
> can anybody think of any gotcha's this approach
> might create?
> 
> Thanks in advance,
> 
> -Larry Brasfield
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> soap-user-unsubscribe@xml.apache.org
> For additional commands, email:
> soap-user-help@xml.apache.org
> 


__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org