Hi, I am trying to write serializers and deserializers for my application specific data objects(there are some methods apart from the getter setter methods and the constructor). Can anyone let me know if I can find any sample code for the same on the web? If anyone has done this can you please post the code?
Vandana. -----Original Message----- From: Mike DuVall [mailto:[EMAIL PROTECTED] Sent: Friday, March 07, 2003 8:26 PM To: [EMAIL PROTECTED] Subject: RE: Bean Serializer/ Deserializer 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
This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful. Visit us at http://www.cognizant.com