客户端:
string saveString = GCE.Common.SerializerHelper.SerializeObject(dataList);
int nFlag = server.SaveData(saveString);
出错:
System.Web.Services.Protocols.SoapException: 服务器无法处理请求。 ---> System.NullReferenceException: 未将对象引用设置到对象的实例。
namespace IContract
{
/// <summary>
/// 考勤契约
/// </summary>
public interface IAttendanceContract
{
/// <summary>
/// 保存数据
/// </summary>
/// <param name="sList">数据</param>
/// <returns>1:成功;0失败</returns>
int SaveData(string sList);
/// <summary>
/// 登出
/// </summary>
}
}
public class AttendanceContract : GCE.OA.IContract.IAttendanceContract
{
private void CovertModel(GCE.OA.IContract.PMAttendanceTiming omodel, GCE.OA.Business.Model.PMAttendanceTiming model)
{
}
#region IAttendanceContract 成员
/// <summary>
/// 保存数据
/// </summary>
/// <param name="slist">数据</param>
/// <returns>1:成功;0失败</returns>
public int SaveData(string slist)
{
}
#endregion
}
string saveString = GCE.Common.SerializerHelper.SerializeObject(dataList);
int nFlag = server.SaveData(saveString);
原因是:参数大小写不一样,要一样的签名