尝试使用 DSS Web 服务为签名字段指定日期格式时遇到问题。这是我的代码:
Req = new RequestBaseType();
Req.OptionalInputs = new RequestBaseTypeOptionalInputs();
Req.OptionalInputs.SAPISigFieldSettings = new SAPISigFieldSettingsType();
TimeDateFormatType tf = new TimeDateFormatType();
tf.DateFormat = "dd MMM yyyy";
Req.OptionalInputs.SAPISigFieldSettings.TimeFormat = tf;
我尝试按如下方式签署文件:
DSS service = new DSS();
service.Url = "https://cosign:8080/sapiws/dss.asmx";
SignRequest sreq = new SignRequest();
sreq.InputDocuments = Req.InputDocuments;
sreq.OptionalInputs = Req.OptionalInputs;
Resp = service.DssSign(sreq);
我从 ResponseBaseType 对象得到以下响应:
urn:oasis:names:tc:dss:1.0:resultmajor:Insufficient Information Error parsing OptionalInput SAPISigFieldSettings
如果我不指定日期格式,它可以正常工作。有任何想法吗?