【发布时间】:2015-01-21 16:26:59
【问题描述】:
我正在使用 Java 在线连接到 Dynamic CRM。我可以创建除日期时间以外的任何类型的字段。每当我添加 DateTime 字段时,我都会收到以下错误。
[错误] 格式化程序在尝试反序列化消息时抛出异常:尝试反序列化参数 http://schemas.microsoft.com/xrm/2011/Contracts/Services:entity 时出错。 InnerException 消息是“第 1 行位置 9875 中的错误。不应出现命名空间“http://schemas.microsoft.com/xrm/2011/Contracts”中的“EndElement”“KeyValuePairOfstringanyType”。期待元素'价值'。'。请参阅 InnerException 了解更多详情。
我的代码sn-p是这样的。
OrganizationServiceStub.DateTime d= new OrganizationServiceStub.DateTime();
Calendar c = Calendar.getInstance();
d.setDateTime(c);
collection.addKeyValuePairOfstringanyType(pair("startdate",d));
【问题讨论】: