使用C#创建控制台应用程序并连接到webservice

时间:2017-06-22 08:32:38

标签: c# web-services console-application

帮助我创建一个控制台应用程序,它将调用某个Web服务并需要在其上添加SQL查询。我不知道如何继续。

控制台应用:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SharepointDataCleanUp
{
    class Program
    {
        static void Main(string[] args)


        {
        }
    }
}

以下是我想要连接的网络服务:

using System.Data;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.ComponentModel;

using Microsoft.SharePoint;

using System.Security.Principal;

namespace Uniliver.Components.DocumentManagement
{
    /// <summary> 
    /// Summary description for DocumentsManagementService. 
    /// This service exposes 4 methods: Upload, Update, Get and Delete.
    /// 
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [ToolboxItem(false)]
    public class DocumentsManagementService : System.Web.Services.WebService
    {


--Methods

Upload

Edit

Get

Delete

}

此外,下面是我想要添加到我的控制台应用程序的示例查询。

Select * from Customers

0 个答案:

没有答案