|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Classes Vs XmlDataDocumentHi,
I have a set of nested object classes that now i have to serialize/deserialize to make webservice calls. I was thinking wouldn't it be better to use an XML Data document instead of using classes so i can import/export xml with ease and also i can update my schema without compiling the code. What advantages/disadvantages do you guys see in taking this approach. Any kind of suggestions are welcome. Thanks! Vish wrote:
> I have a set of nested object classes that now i have to That's an interesting thought. It is true that there is nothing inherently > serialize/deserialize to make webservice calls. I was thinking wouldn't it > be better to use an XML Data document instead of using classes so i can > import/export xml with ease and also i can update my schema without > compiling the code. object-oriented about Web services. You can implement them in any fashion whatsoever. But what exactly do you see to be the advantage of being able to change the schema (I assume you are talking about the XSD schema in the WSDL that describes your Web service) without having to compile code? In general, we strive to create contract and schema (WSDL + XSD) that are relatively stable and unchanging over time. Everytime the contract or schema change, the clients of the service have to change, and that also raises the thorny problem of versioning Web services. So why is changing the schema easily a good thing? Cheers, Stuart Celarier, Fern Creek I was talking about the schema to be sent in the body of the SOAP Message. If
the carrier is an xmldatadocument it can be easily serialized and will provide an xml and a datataset view of the data. Currently i have the data to be sent as nested set of objects that i need to serialize and at the time of deserialization provide a schema so it can be loaded in my object once received. I hope i am making myself clear. Anybody from Microsoft have a suggestion ? Thanks! Show quote "Stuart Celarier" wrote: > Vish wrote: > > I have a set of nested object classes that now i have to > > serialize/deserialize to make webservice calls. I was thinking wouldn't it > > be better to use an XML Data document instead of using classes so i can > > import/export xml with ease and also i can update my schema without > > compiling the code. > > That's an interesting thought. It is true that there is nothing inherently > object-oriented about Web services. You can implement them in any fashion > whatsoever. > > But what exactly do you see to be the advantage of being able to change the > schema (I assume you are talking about the XSD schema in the WSDL that > describes your Web service) without having to compile code? In general, we > strive to create contract and schema (WSDL + XSD) that are relatively stable > and unchanging over time. Everytime the contract or schema change, the > clients of the service have to change, and that also raises the thorny > problem of versioning Web services. So why is changing the schema easily a > good thing? > > Cheers, > Stuart Celarier, Fern Creek > > > |
|||||||||||||||||||||||