Hi, I am kind of confused about the way AXIS goes about (de)serializing objects. I have data objects that have applications specific implementation along with the properties and their get-set methods. I assumed that I would have to write custom (de)serializers for these, but just specifying a beanmapping in the deploy.wsdd automatically does that for me.
In what scenario would I need to use TypeMappings then ? Wasn't the data object I was trying to serialize a custom data object? Agreed, it followed the standard Java bean convention, but it also had methods, that were specific to my application. How does AXIS BeanSerializer, internally resolve such data objects and serialize them? I was doing the same using the SOAP EAR Enabler tool, and I had to write my custom (de)serializers for ArrayLists as well as such data objects(in which I just encoded my entire object using the Base64encoding, into a string, and then marshalled the string using the Stringserializer). I have gone through the Architecture Guide as well as the User Guide, but am still confused about it. I would really appreciate if someone could just run me through the process of how AXIS goes about (de)serializing the objects. Another thing I am confused about is the topic of Interoperability. How would a Microsoft client know how to invoke my service if the method I have exposed has a java data object X as a parameter? Would it invoke the method with its own data type/object which would then be serialized into the format specified by the WSDL? I am at my wits end regarding this, so need help asap....:) regards, Vandana. -----Original Message----- From: Balakrishna, Vandana (Cognizant) Sent: Tuesday, March 11, 2003 3:16 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Bean Serializer/ Deserializer 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