webreference copying xml to xml is it possible

Last post 05-13-2008 3:56 AM by Samu Zhang - MSFT. 1 replies.

Sort Posts:

  • webreference copying xml to xml is it possible

    05-10-2008, 12:38 PM
    • Loading...
    • x2o
    • Joined on 05-05-2007, 12:04 PM
    • Posts 8

    Hi I am using a webreference from http://www.webservicex.net/WCF/default.aspx I have got the first section working where I can display the information from the website in to a label.text it is displaying it in the default.aspx

    I've tried copying the information in to an xml file but I think I am using the wrong way to copy xml to xml as it's using a string method.


    I have tried searching but have not found what I am looking for can anyone help I am coding in vb language in to asp.net website and I am using visual studios 2005

    Thanks

    x2o

  • Re: webreference copying xml to xml is it possible

    05-13-2008, 3:56 AM

    Hi x2o,

    So this is a problem about how to invoke consume webservice and save the return value as one xml file.

    I do this using this page : http://www.webservicex.net/WCF/ServiceDetails.aspx?SID=48

    write some code :

     

            localhost.GlobalWeather ser = new localhost.GlobalWeather();
            string test = ser.GetCitiesByCountry("China");
    
            XmlDocument doc = new XmlDocument();
            doc.LoadXml(test);
    
            doc.Save(Server.MapPath("web.xml"));


     

     

    Sincerely,
    Samu Zhang
    Microsoft Online Community Support

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Page 1 of 1 (2 items)