我正在使用一个webserviceinvoking类从带有 C# 服务的 .NET 调用 SAP PI。
我正在使用以下方法来做到这一点:
public object InvokeMethod(string serviceName, string methodName, params object[] args)
{
System.ServiceModel.Channels.Binding defaultBinding = new BasicHttpBinding(BasicHttpSecurityMode.None);
if (this.credentials != null)
{
((BasicHttpBinding)defaultBinding).Security.Mode = BasicHttpSecurityMode.TransportCredentialOnly;
((BasicHttpBinding)defaultBinding).Security.Transport.ClientCredentialType = HttpClientCredentialType.Basic; //.Ntlm;
}
object obj = this.webServiceAssembly.CreateInstance(serviceName, false, BindingFlags.CreateInstance, null, new object[] { defaultBinding, new EndpointAddress(this.webServiceUri.ToString()) }, null, null);
Type type = obj.GetType();
if (this.credentials != null)
{
PropertyInfo piClientCreds = type.GetProperty("ClientCredentials");
ClientCredentials creds = (ClientCredentials)piClientCreds.GetValue(obj, null);
creds.UserName.UserName = this.credentials.UserName;
creds.UserName.Password = this.credentials.Password;
}
return …Run Code Online (Sandbox Code Playgroud) 我收到此System.ServiceModel.FaultException通过WCF从我的.NET应用程序调用SAP XI/PI Web服务:
CX_SY_CONVERSION_NO_DATE_TIME:XSLT异常.在简单转换程序中反序列化时发生错误/1BCDWB/WSSB430AA018B4EA689BF0.Value 7/12/2010不是符合ABAP XML格式的有效日期
有问题的日期是我使用.NET DateTime.ToShortDateString()方法格式化的字符串字段.
谁能告诉我有效的"ABAP XML格式"是什么日期?