0

I have an old Webservice (.asmx) created long ago. I want to use it in a vs2013 c# winforms app.

In the old days, I added a webreference ie "TheService" and an proxy object was created and added and a just used it myApp.TheService

The old Code:

private ADStudent GetStudentWebService()
        {
            AdStudent.ADStudent ws = new AdStudent.ADStudent();
            ws.Url = comboBox_WebServiceUrl.SelectedItem.ToString();
            return ws;
        }

In 2013 I added a service reference, but no proxy object was created, so how do I call methods on the service, I can find examples of calling a wcf data service, but not an old school Soap (.asmx) webserivce.

Is there example code anywhere?

John Saunders
  • 160,644
  • 26
  • 247
  • 397
Eric Brown - Cal
  • 14,135
  • 12
  • 58
  • 97
  • 1
    there is no "classic asp.net". is it classic asp or asp.net? – Russell Uhl May 15 '15 at 15:41
  • Sorry to triggered your parser, I changed the word classic to old school – Eric Brown - Cal May 15 '15 at 15:47
  • 1
    Do you mean an .asmx rather than a wcf(.svc) web service? I also don't know what a *classsic asp.net* web service is. – Liam May 15 '15 at 15:53
  • 2
    In that case you can just add the web service following [these instructions on MSDN](https://msdn.microsoft.com/en-us/library/bb628649.aspx). It will generate it in the way it used it, no WCF jiggery pokery – Liam May 15 '15 at 15:54
  • Perfect! write it up as an answer and I'll mark it correct! Thanks! – Eric Brown - Cal May 15 '15 at 15:58
  • Just a mnior point, while the answer is the same, the questions is very different. Keepign this one might make it easier to those who follow to find the answer they seek. – Eric Brown - Cal May 15 '15 at 18:48

0 Answers0