using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using Gm_WMS.DataAccess.DataService;
using System.Data;
using Stone.DataService.Biz;
using Stone.DataService.Biz.BizPublic;
using System.IO;
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Service : System.Web.Services.WebService
{
public Service () {
if (LocalDBService.m_conn == "")
{
WebConfig.LocalDB = System.Configuration.ConfigurationManager.AppSettings["LocalDB"].ToString();
WebConfig.BarCodeDB = System.Configuration.ConfigurationManager.AppSettings["BarCodeDB"].ToString();
LocalDBService.m_conn = WebConfig.LocalDB;
}
}
[WebMethod(Description="测试")]
public string HelloWorld() {
return "Hello World";
}
///
/// PDA与服务端进行数据交换
///
/// 处理数据指令
/// 上传的数据
/// 返回异常的信息
///
[WebMethod(Description="PDA与服务端进行数据交换")]
public DataSet ServiceMessage(DataSet dsCommand, DataSet dsData, ref string ErrMessage)
{
try
{
return CommandFactory.ServiceData(dsCommand, dsData);
}
catch (Exception ex)
{
ErrMessage = "[获取数据失败]原因为:\r\n" + ex.Message;
}
return null;
}
}