web service to store data in XML file


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: web service to store data in XML file

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Posts
    1

    Red face 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.

  2. #2
    Join Date
    May 2005
    Location
    UK
    Posts
    278
    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
    Sri

Similar Threads

  1. send xml file to web service
    By Bill C in forum XML
    Replies: 2
    Last Post: 06-11-2012, 08:10 PM
  2. loading an xml file into a web form
    By xxxxx in forum ASP.NET
    Replies: 0
    Last Post: 07-14-2005, 11:16 AM
  3. Replies: 0
    Last Post: 06-21-2005, 11:01 AM
  4. Replies: 3
    Last Post: 05-03-2005, 03:39 PM
  5. Why Web Services are Important
    By Constance J. Petersen in forum .NET
    Replies: 13
    Last Post: 08-28-2002, 10:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center