wcf - two endpoint within one service host -
i have 3 projects in solution following:
- wcf service library "servicelib"(contract
icalculator
, implementationcalculator1
). console application "servicehost" host wcf service library(and
icalculator
implementationcalculator2
);add
calculator1
&calculator2
instance ofservicehost
using methodaddserviceendpoint(typeof(icalculator), new wshttpbinding(), "calculator1")
,addserviceendpoint(typeof(icalculator), new wshttpbinding(), "calculator2")
add service reference "servicehost" client application(type of console application); app.config(auto-generated) within project
question is: how consume these 2 calculators(different logic) client app side, necessary create 2 different types of client proxy or other way that?
thanks hand!
<endpoint address="http://localhost:8000/calculator" binding="wshttpbinding" bindingconfiguration="wshttpbinding_icalculator" contract="services_baseaddress.icalculator" name="wshttpbinding_icalculator"> </endpoint> <endpoint address="http://localhost:8000/doublecalculator" binding="wshttpbinding" bindingconfiguration="wshttpbinding_icalculator1" contract="services_baseaddress.icalculator" name="wshttpbinding_icalculator1"> </endpoint>
Comments
Post a Comment