Thanks for the info, Paul. I actually did figure that out this morning through trial and error. Being able to specify the makeup of the bean via BeanInfo looks to be a very nice way of solving several problems that I am having. One problem in particular is that we have several classes that have 'char's as properties, and axis seems to choke on those. What I did to solve this is create an additional getter/setter pair for the char property that takes a String instead of a char, and converts back in forth between the char and the string. Then I created a BeanInfo that says to use the String getter/setter rather than the char getter/setter for that attribute. Works very nicely. (We could also just convert the char to string outright, but this saves us from having to change a lot of code that depends on the existing interface).







----Original Message Follows----
From: "Paul Andrews" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
Subject: RE: Bean Serializer/ Deserializer
Date: Fri, 7 Mar 2003 09:24:27 -0500

They use the reflection package. If you implement BeanInfo classes you
can control precisely what gets serialized/deserialized. Look in the
java.beans package for more info.

> -----Original Message-----
> From: Mike DuVall [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 06, 2003 2:38 PM
> To: [EMAIL PROTECTED]
> Subject: Bean Serializer/ Deserializer
>
>
> I have a question about how the built in BeanSerializer and
> BeanDeserializer
> determines what getters and setters to call.
>
> Do these classes just call every getter and setter on an a
> bean, or do they
> first look for data fields in the object, and then look for
> getters and
> setters that correspond to those data fields?  I'm guessing
> they just look
> for getters and setters regardless of what data fields may exist.
>
> Also, is there some way to have the
> BeanSerializer/Desserializer ignore
> certain getters/setters?
>
> Thanks,
> Mike
>
> _________________________________________________________________
> The new MSN 8: smart spam protection and 2 months FREE*
> http://join.msn.com/?page=features/junkmail
>


_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail




Reply via email to