Arucard

Arucard

  • NA
  • 9
  • 0

need help with connecting to web service

Feb 15 2009 7:59 AM
Hi all,

I try to connect my windows form application (c#) to webservice and got problems.

My WS looks like this:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;

/// <summary>
/// Summary description for ediag
/// </summary>
[WebService(Namespace = "http://localhost/ws/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
[System.Web.Script.Services.ScriptService]
public class ediag : System.Web.Services.WebService {

    public ediag () {

        //Uncomment the following line if using designed components
        //InitializeComponent();
    }

    [WebMethod]
    public string GetVersion() {
        return "2.0.1";
    }
   
}

So when i go via IE on: http://localhost:1716/admin/ws/ediag.asmx i got:

The following operations are supported. For a formal definition, please review the Service Description.

In WF i click on Add Service Reference past link to ediag.asmx click on GO and press OK. So now i got ServiceReference1 in my program.
And now how to use it?


regards,
a.

Answers (9)