Hi All,
Heres the scenario: I have a couple of xml feeds coming in from
another company. I need, if possible a web service to check every so
often for these xml files. The web service would parse the xml data out
and check it against our database and maybe add some things to a new
xml file to be sent out. Is this possible for a webservice to do? and
if so what would we use in the webservice to cause a check event to be
executed? A timer in a win app equivalent is what I need. If this is
not a possible design. what is your thoughts of using a windows .net
service instead?
Also in the parsing of the xml file to weed out the data. I would
assume the best way to approach this is to use xslt/xpath for
extraction? Anybody have any examples in using xslt to extract data
from an xml file in c# ?
Thanks,
JJ
Peter Kelcey - 04 Nov 2005 19:40 GMT
JJ
A windows service is the solution you should be using in this case. A
webservice is best suited for integrating two or more separate
applications and for facilitating easy communication between them. Web
services are really designed to work under a request/response pattern
where a client application makes a call to consume the web service. The
call from the consumer is what triggers the web service to start. In
the model you've proposed, you would need to have a client repeatedly
calling your web service.
A windows service is exactly what you need here. It can be setup to
repeatedly scan a directory to look for new XML files and then perform
whatever processing you need.
Hope that helps
Peter Kelcey