5

I'm getting the error message below when trying to call the SAP PI Web Services using C#.net console app:

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

My custombinding looks like this:

<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>  

Could anyone please correct me if I'm doing something wrong above? Thank you.

Boghyon Hoffmann
  • 17,103
  • 12
  • 72
  • 170
Nil Pun
  • 17,035
  • 39
  • 172
  • 294

2 Answers2

9

SAP PI webservice with Basic Authentication:

      <basicHttpBinding>
        <binding ...>
          <security mode="TransportCredentialOnly">
            <transport clientCredentialType="Basic" />
          </security>
        </binding>
      </basicHttpBinding>
Brian Low
  • 11,605
  • 4
  • 58
  • 63
0

Verify that your SAP web service credentials are correct, and not locked. I just came across this error, and I asked my SAP P.I. Admin to verify the SAP service credentials, and it turns out that they were locked. Everything worked fine once she unlocked the SAP credentials for me.