2010-04-13 73 views
2

我試圖連接到SAP提供的Web服務,並且出現身份驗證問題。通過WEB服務進行.NET SAP連接身份驗證

我只需右擊項目添加服務,選擇添加服務引用,給WSDL網址的服務,然後點擊OK。(點擊確定要求的憑證後,我爲他們提供)

然後,當我試圖

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配置相關的部分:

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

從serviceclien對象我得到了下面的錯誤信息調用一個方法

另外,我會遇到什麼問題?我不想使用SAP .NET Connector。 謝謝...

回答

0

轉到SAP上的Web服務導航器。下載WSDL,它將分爲三部分。將它們拼接在一起,並針對新的WSDL構建.NET代理。該服務似乎要求您執行基本身份驗證。您需要SAP上的用戶,該用戶有權調用該服務並調用其後端。爲您的服務添加一個基本的身份驗證HTTP頭。

相關問題