retrieving remote xml data
-
Hey all, Just wondering how to go about accessing and reading data from a remote (on a webserver) xml file. Thanks
Look for information on how to create xml web services. An xml web service is just another class library (dll) that resides in a remote web server. All the methods declared in the xml web service return xml formatted data. After you create a web service dll and place it in a remote web server, you can create windows app and when you right click on "References" on solution explorer, select "Add Web Reference" and just set the reference to the xml service you created (similar to setting reference to a dll in your hard drive). After you set a reference to your xml web service, you should be able to create an instance of any class in your web service and you should be able to call any methods that have [WebService] defined in front of the method. Note that you probably want to call methods asynchronously due to slow response over internet, so look for information in it. VS automatically creates methods that can be called asynchronously and you just pass a callback function to let you know when it's done.
-
Look for information on how to create xml web services. An xml web service is just another class library (dll) that resides in a remote web server. All the methods declared in the xml web service return xml formatted data. After you create a web service dll and place it in a remote web server, you can create windows app and when you right click on "References" on solution explorer, select "Add Web Reference" and just set the reference to the xml service you created (similar to setting reference to a dll in your hard drive). After you set a reference to your xml web service, you should be able to create an instance of any class in your web service and you should be able to call any methods that have [WebService] defined in front of the method. Note that you probably want to call methods asynchronously due to slow response over internet, so look for information in it. VS automatically creates methods that can be called asynchronously and you just pass a callback function to let you know when it's done.