如何配置WCF端点的wsdl:端口
问题描述:
<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>
我可以改变我的端点配置,以便名称和绑定是完全一样的,但我怎么可以配置一个端点,这样的值是不同的。如何配置WCF端点的wsdl:端口
我想是这样的:
<wsdl:service name="ExportService">
<wsdl:port name="ExportServiceABC" binding="ExportServiceXYZ">
<soap12:address location=""/>
</wsdl:port>
</wsdl:service>
我需要在我的终点是什么背景?
答
我会想到的是,<endpoint>
元素上改变name
属性会做的伎俩,就像这样:
<endpoint name="ExportServiceABC" ... contract="....">
你也想改变name
属性,为<binding>
元素:
<binding name="ExportServiceXYZ" .... >
根据您发布的示例,<endpoint>
名称属性为“ExportServicePort”,这就是WSDL中显示的内容。
不会做诡计... – Filip