2016-07-14 69 views
0
<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> 

我需要在我的終點是什麼背景?

回答

0

我會想到的是,<endpoint>元素上改變name屬性會做的伎倆,就像這樣:

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

你也想改變name屬性,爲<binding>元素:

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

根據您發佈的示例,<endpoint>名稱屬性爲「ExportServicePort」,這就是WSDL中顯示的內容。

+0

不會做詭計... – Filip