Page tree
Skip to end of metadata
Go to start of metadata

In this example we will walk through creating a .NET client using Visual Studio

Step-by-step guide

Perform the following in Visual Studio

  1. Open Visual Studio
  2. Right click on reference and click on Service Reference
  3. Click on advanced and click webreference
  4. Enter the URL to the WSDL
  5. Enter namespace for the service and click ok


Example Code using C#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using WindowsFormsApp1.dkWS;
namespace WindowsFormsApp1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            var client = new IItemServiceservice()
            {
                BasicSecurityValue = new BasicSecurity()
                {
                    Username = "ws.dev",
                    Password="Code2make"
                }
            };
            var customer = client.GetCustomer("1710794709", new TCustomerOptions() { });
            label1.Text = customer.Name;
        }
    }
}




Related articles