在来自.NET的SAP PI调用中使用基本身份验证

问题描述 投票:5回答:2

尝试使用C#.net控制台应用程序调用SAP PI Web Services时,出现以下错误消息:

The HTTP request is unauthorized with client authentication scheme 'Basic'. The authentication header received from the server was 'Basic realm="XISOAPApps"'.m="XISOAPApps"'.

我的自定义绑定看起来像这样:

<customBinding>  
        <binding name="CustomHttpTransportBinding">  
          <textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16"  
              messageVersion="Soap11" writeEncoding="utf-8">  
            <readerQuotas maxDepth="10000000" maxStringContentLength="10000000"  
                maxArrayLength="67108864" maxBytesPerRead="65536" maxNameTableCharCount="100000" />  
          </textMessageEncoding>  
          <httpTransport authenticationScheme="Basic" bypassProxyOnLocal="false"  
              hostNameComparisonMode="StrongWildcard" keepAliveEnabled="false"  
              proxyAuthenticationScheme="Basic" realm="XISOAPApps" useDefaultWebProxy="true" />  
        </binding>  
      </customBinding>  

如果我在上面做错了什么,谁能纠正我?谢谢。

wcf sap basic-authentication sap-xi sap-pi
2个回答
9
投票

具有基本身份验证的SAP PI Webservice:

      <basicHttpBinding>
        <binding ...>
          <security mode="TransportCredentialOnly">
            <transport clientCredentialType="Basic" />
          </security>
        </binding>
      </basicHttpBinding>

0
投票

验证您的SAP Web服务凭据正确无误。我刚遇到此错误,就问我的SAP P.I.。管理员验证SAP服务凭据,事实证明它们已被锁定。她为我解锁了SAP凭据后,一切工作正常。

© www.soinside.com 2019 - 2024. All rights reserved.