SAP SAP authentication via WEB service

I am trying to connect to a web service served by SAP and I have an authentication issue.

I just added the service by right clicking on the project, selecting the service reference, specifying the WSDL url for that service, and clicking OK. (After clicking OK, the credentials are requested and I provided them)

Then when I tried to call the method from the serviceclien object I got the error below:

The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The
authentication header received from the server was 'Basic realm="SAP Web Application 
Server <hostname>"'.

      

The web config related part:

<basicHttpBinding>
<binding name="binding" closeTimeout="00:01:00"
 openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
 allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
 maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
 messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
 useDefaultWebProxy="true">
 <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
  maxBytesPerRead="4096" maxNameTableCharCount="16384" />      
 <security mode="None">       
  <transport clientCredentialType="None" proxyCredentialType="None"
   realm="">
   <extendedProtectionPolicy policyEnforcement="Never" />
  </transport>       
  <message clientCredentialType="UserName" algorithmSuite="Default" />
 </security>
</binding>

      

  

Also, what problems will I run into? I don't want to use SAP.NET Connector. Thanks...

+2


a source to share


1 answer


Go to Web Service Navigator in SAP. Download the WSDL, it will be presented in three parts. Combine them together and create a .NET proxy against the new WSDL. The service seems to require you to do basic authentication. You need a user in SAP who is allowed to call the service and call its backend. Add a basic HTTP validation header to your service.



0


a source







All Articles