【问题标题】:How To Configure WCF Endpoint For a wsdl:port如何为 wsdl:port 配置 WCF 端点
【发布时间】:2016-07-14 14:04:15
【问题描述】:
<wsdl:service name="ExportService">
  <wsdl:port name="ExportServicePort" binding="ExportServicePort">
    <soap12:address location=""/>
  </wsdl:port>
</wsdl:service>

<endpoint name="ExportServicePort" ...  contract="....">
  <identity>
    <dns value="localhost" />
  </identity>
</endpoint>

我可以更改端点配置,使名称和绑定完全相同,但如何配置端点,使值不同。

我想要这样的东西:

<wsdl:service name="ExportService">
  <wsdl:port name="ExportServiceABC" binding="ExportServiceXYZ">
    <soap12:address location=""/>
  </wsdl:port>
</wsdl:service>

我的端点需要什么设置?

【问题讨论】:

    标签: wcf endpoint wcf-endpoint


    【解决方案1】:

    我希望更改 &lt;endpoint&gt; 元素上的 name 属性可以解决问题,如下所示:

    <endpoint name="ExportServiceABC" ... contract="....">
    

    您还需要更改 &lt;binding&gt; 元素中的 name 属性:

    <binding name="ExportServiceXYZ" .... >
    

    根据您发布的示例,&lt;endpoint&gt; 名称属性是“ExportServicePort”,这就是 WSDL 中显示的内容。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-05-29
      • 1970-01-01
      • 1970-01-01
      • 2012-05-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多