2011-09-16 85 views
0

我有一個wcf服務存在於不同的系統中。我想在我的生產服務器中添加該wcf參考。但在那臺服務器上我沒有視覺效果。所以我不能通過內置的添加服務引用,你能告訴我如何做到這一點嗎?我想遠程調用一個wcf服務,我沒有visual studio。我不能去添加服務參考。如何在wcf中以編程方式提供服務引用?

回答

0
<configuration> 
    <system.serviceModel> 
    <services> 
     <service name="RchTransfer.RCHService"> 
     <endpoint binding="wsHttpBinding" address="http://localhost:9000/RCHService" 
        contract="eHeritage.Lib.IRCHService"> 
     </endpoint> 
     <endpoint address="http://localhost:9000/RCHService/mex" binding="mexHttpBinding" contract="IMetadataExchange"/> 
     </service> 
    </services>  
    </system.serviceModel> 
</configuration> 

添加IMetadataExchange接口端點服務器配置文件

編輯

否則配置WCF服務手動

WCF Services in .Net without using 「Add Service Reference」

+0

嗨假設我有一個WCF在14.1.120.45和我想要訪問我的本地系統中的wcf,那我該怎麼做呢?我沒有製作視覺工作室。只有我可以通過命令行添加或類似svcutil – Bijay

+0

Visual Studio使用T4模板生成代碼。你手動聲明類 – ebattulga

相關問題