我对网络服务很陌生,所以我正在与一些奇怪的行为作斗争。通过 VS2010 导入 WSDL xml 文件后,我得到了这些无法识别的策略断言。WSDL 文件是由 SAP 团队创建的,所以我不确定他们到底做了什么。
当我忽略这些评论并尝试使用 Web 服务时,我得到了这样的期望: 提供的 URI 方案“https”无效;预期的“http”。
我知道这个错误消息意味着我有一个与 URI 定义不同的传输逻辑,但我不确定我是否应该对此做些什么或更新 WSDL 文件。
<system.serviceModel>
<bindings>
<customBinding>
<binding name="binding">
<!-- WsdlImporter encountered unrecognized policy assertions in ServiceDescription 'urn:sap-com:document:sap:soap:functions:mc-style': -->
<!-- <wsdl:binding name='binding'> -->
<!-- <saptrnbnd:OptimizedXMLTransfer xmlns:saptrnbnd="http://www.sap.com/webas/710/soap/features/transportbinding/">..</saptrnbnd:OptimizedXMLTransfer> -->
<!-- <sapattahnd:Enabled xmlns:sapattahnd="http://www.sap.com/710/features/attachment/">..</sapattahnd:Enabled> -->
<mtomMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16"
messageVersion="Soap11WSAddressing10" maxBufferSize="65536"
writeEncoding="utf-8">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
</mtomMessageEncoding>
<httpsTransport manualAddressing="false" maxBufferPoolSize="524288"
maxReceivedMessageSize="65536" allowCookies="false" authenticationScheme="Anonymous"
bypassProxyOnLocal="false" decompressionEnabled="true" hostNameComparisonMode="StrongWildcard"
keepAliveEnabled="true" maxBufferSize="65536" proxyAuthenticationScheme="Anonymous"
realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false"
useDefaultWebProxy="true" requireClientCertificate="false" />
</binding>
<binding name="binding_SOAP12">
<!-- WsdlImporter encountered unrecognized policy assertions in ServiceDescription 'urn:sap-com:document:sap:soap:functions:mc-style': -->
<!-- <wsdl:binding name='binding_SOAP12'> -->
<!-- <saptrnbnd:OptimizedXMLTransfer xmlns:saptrnbnd="http://www.sap.com/webas/710/soap/features/transportbinding/">..</saptrnbnd:OptimizedXMLTransfer> -->
<!-- <sapattahnd:Enabled xmlns:sapattahnd="http://www.sap.com/710/features/attachment/">..</sapattahnd:Enabled> -->
<mtomMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16"
messageVersion="Default" maxBufferSize="65536" writeEncoding="utf-8">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
</mtomMessageEncoding>
<httpsTransport manualAddressing="false" maxBufferPoolSize="524288"
maxReceivedMessageSize="65536" allowCookies="false" authenticationScheme="Anonymous"
bypassProxyOnLocal="false" decompressionEnabled="true" hostNameComparisonMode="StrongWildcard"
keepAliveEnabled="true" maxBufferSize="65536" proxyAuthenticationScheme="Anonymous"
realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false"
useDefaultWebProxy="true" requireClientCertificate="false" />
</binding>
</customBinding>
</bindings>
<client>
<endpoint address="http://{HOSTNAME}/sap/bc/srt/rfc/sap/zicert_kunden_auslesen/010/005056a5007b1ee2a5da43a20303be2b/binding"
binding="customBinding" bindingConfiguration="binding" contract="ServiceReference.ZICERT_KUNDEN_AUSLESEN"
name="binding" />
<endpoint address="http://{HOSTNAME}/sap/bc/srt/rfc/sap/zicert_kunden_auslesen/010/005056a5007b1ee2a5da43a20303be2b/binding"
binding="customBinding" bindingConfiguration="binding_SOAP12"
contract="ServiceReference.ZICERT_KUNDEN_AUSLESEN" name="binding_SOAP12" />
</client>