-
read info from web
hi
i was just curious if anybody new a good way for a windows application to read a value from a web application in asp.net.
i want to for example assign credits to a person, then as the person uses credits, the amount will synchronise with an asp.net application on the web and update the value.
lets say a variable with the value 12. now if the person uses the windows app, it will subtract 1 credit, and also update the same amount on the internet website.
any thoughts???
-
i was thinking maybe read info from an xml file on the web, but how would i do that in terms of connection to the xml file. manipulating the file is no problem, but i just need to be able to read a web value with a windows app.
???????????????
-
no worries,
i solved it. it was really simple. just set your exml file on the net in a directory, then read the values into a dataset with the xmlreader. pretty simple from there on. just read the values from the dataset into any variables on your client machine.
-
well, that worked for reading the values from an xml file, but when i tried to write to the file, it gave me errors about uri types not supported. so now i am a bit confused.
after reading a little ifigured out that maybe soap is the route to go, but i dont know how to use soap to send values from a text box on a windows form to an xml file residing on a remote server.
any ideas would be much appreciated. ?????????????
-
Use XML web services (.asmx) if you already are developing with VS. NET
If you are using VB6, download the SOAP Toolkit 3 and use SOAP as the communicator.
XML Web services are already using SOAP to communicate.
You are halfway there by using XML as the data format to communicate NOW use the commications standards --- SOAP
Develop a Web Service that takes in a parameter (thru HTTP-POST/GET or SOAP) which then deducts a value from the database.
Develop a Win App then and use the web service like its another class (Set a reference to it first). Pass in the appropriate parameter into the web service and voila..watch the value travel on the HTTP-80 Protocol post to the respective web site.
Ahhh....the beauty of web services. MS, amongst other vendors have been touting it for some time. Try it. I have a couple of VB6 and VB.NET Client apps (freeware) that uses web services on my site (developed for fun). Download them at http://www.softwaremaker.net/FreewareApps.asp