0

I'm trying to create a windows service that connects to a WebService from a 3rd party and then parse the reply, repeating every 10 or 15 seconds. I successfully created an example service by following this MSDN tutorial and was perfectly able to install it and run it.

How do I connect to the WebService and how do I get the response? I've seen this post and managed to add a web reference and configure the WS, which seems the right way. I also found this thread but it wasn't that enlightning. My problem is what do I do now? The WS has several functions, how do I call the correct one? The functions needs three arguments (username, password and a queue id, all of which I have), how do I add them? Where will the result be stored and how can I access it so I can parse it?

Thanks so much in advance.

Community
  • 1
  • 1
RMarques
  • 1
  • 2
  • Do you see a "Service References" folder in your windows service project in VS 2013? Inside that folder you should see an auto-generated class that contains methods for accessing the web service. – sevzas Dec 07 '14 at 02:06
  • Actually what I managed to add was a Web Reference, not a Service Reference. And there I only have the name I gave to the reference and no methods for it... I'm actually completely lost.. Should it be a Service Reference instead of a Web Reference? **EDIT:** Actually I should apologize. I wrote service reference instead of web reference in the opening question.. I just corrected it. But the question here remains: should it be service instead of web? – RMarques Dec 07 '14 at 14:23
  • I suggest you review this SO question: http://stackoverflow.com/questions/2158106/web-reference-vs-service-reference and determine if you can use a service reference. – sevzas Dec 07 '14 at 14:41

0 Answers0