web service to store data in XML file
Let's say i have created one web service which acquire some information from the user. Then i would like to know how can i create another web service in order to stored those information i got from the user into a XML file or into a database?
Any example of codes? please help .urgent.. Thanks a lot.
[315 byte] By [
raewyn] at [2007-11-11 7:22:22]

# 1 Re: web service to store data in XML file
If the information entered is in a object and is the object is serialisable you serialize the object into a xml file with the need for a new webservice
XmlSerializer xs = new XmlSerializer(typeof(namespace.classname));
StreamWriter xw = new StreamWriter(filename, false);
xs.Serialize(xw, objectoftypeclass);
xw.Flush();
xw.Close();
For a database you could do it instead of the serialization