2

SAP が提供する Web サービスに接続しようとしていますが、認証の問題があります。

プロジェクトを右クリックし、サービス参照の追加を選択し、サービスの WSDL URL を指定して [OK] をクリックするだけで、サービスを追加できました ([OK] をクリックした後、資格情報を求められ、それらを提供しました)。

次に、serviceclien オブジェクトからメソッドを呼び出そうとすると、以下のエラー メッセージが表示されました。

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>"'.

Web Config 関連部分:

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

また、どのような問題に直面しますか? SAP .NET コネクタを使用したくありません。ありがとう...

4

1 に答える 1

0

SAP の Web Services Navigator に移動します。WSDL をダウンロードします。3 つの部分に分かれています。それらをつなぎ合わせて、新しい WSDL に対して .NET プロキシを構築します。このサービスでは、基本認証を行う必要があるようです。サービスを呼び出してそのバックエンドを呼び出す権限がある SAP のユーザーが必要です。基本認証 HTTP ヘッダーをサービスに追加します。

于 2011-04-21T10:36:54.007 に答える