サービス参照を追加して 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>