Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
XML
data.xmlanalysis
mappoint.webservice
msf
msxml-webrelease
netmyservices.sdk
passport.sdk
soap
soapsdk
uddi.general
uddi.programming
uddi.specification
xml
xmlsqlwebrelease
xsl
  
 
date: Wed, 5 Apr 2006 20:22:11 -0700,    group: microsoft.public.xml.soap        back       


Deserialization backward compatible after adding additional properties?   
I have a web service that is returning an object to a client.  I added some additional properties to the class on the server.  I was thinking that older clients would have to upgrade to the latest class definition Assembly, but they still work.  Is this a fluke?  Or does serialization ignore any additional elements in the XML that are not class properties?

For example, I have Order class with an AccountNumber property and Amount property.  The XML I deserialize is:

<AccountNumber>1234</AccountNumber>
<Amount>234.56</Amount>
<Referrer>Amazon</Referrer>
<TransactionDate>4/3/2006</TransactionDate>

The Order class on older clients does not have the Referrer and TransactionDate properties, yet deserialization works - an Order object is created with only AccountNumber and Amount set.  

Is this by design or luck?

Thanks,

Sam

-- 
_______________________________
Sam Santiago
ssantiago@n0spam-SoftiTechture.com
http://www.SoftiTechture.com
_______________________________
date: Wed, 5 Apr 2006 20:22:11 -0700   author:   Sam Santiago

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us