当我通过添加服务引用来生成 Web 服务代理类时,代码生成器会实现一个基于DuplexClientBase
类的代理。此实现需要启用双工的绑定配置。因为,当使用双工时,wsDualHttpBinding
似乎只有工作。
我想生成一个没有双工合同的类。我可以指示 Visual Studio 或 svcutil.exe 不生成双工代码吗?Web 服务是基于 SOAP 的,所以我无法想象为什么我实际上需要双工。
该服务的web.config如下:
<system.serviceModel>
<services>
<service behaviorConfiguration="IncidentBehavior" name="omwWS.ServiceImplementation.Incident">
<endpoint address="" binding="customBinding" bindingConfiguration="CustomBinding_IIncident"
contract="omwWS.ServiceContracts.IncidentAccess" />
</service>
</services>
<bindings>
<customBinding>
<binding name="CustomBinding_IIncident">
<textMessageEncoding messageVersion="Soap12WSAddressingAugust2004" />
<httpsTransport authenticationScheme="Basic" maxReceivedMessageSize="52428800" maxBufferSize="52428800" />
</binding>
</customBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="IncidentBehavior">
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>