标签: sap-xi

从 .NET 调用 SAP PI 端点时出现“无法识别的消息版本”

我正在使用一个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)

c# sap web-services sap-xi sap-pi

3
推荐指数
1
解决办法
9443
查看次数

"不是ABAP XML格式的有效日期"调用SAP PI Web服务时出错

我收到此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格式"是什么日期?

.net sap wcf sap-xi

2
推荐指数
1
解决办法
6380
查看次数

标签 统计

sap ×2

sap-xi ×2

.net ×1

c# ×1

sap-pi ×1

wcf ×1

web-services ×1