3

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

1 に答える 1

0

The most easiest way is using Add Web Service reference instead of using Add Service Reference.

Because your service is a simple structured soap service, without any advanced scenario such as duplex

communication, you will not lose anything on client side.

In 'Add Service Reference' window, click on Advanced button, provide address and click add reference.

It will generate a client side for you based on .NET 2 technology

Let me know if any other information is needed.

Good luck

于 2013-09-10T04:12:20.873 に答える