How to generalise the endpoints in my channelfactory
Posted
by Meher
on Stack Overflow
See other posts from Stack Overflow
or by Meher
Published on 2010-04-05T13:40:36Z
Indexed on
2010/04/05
13:43 UTC
Read the original article
Hit count: 358
wcfservice
Hi, I have a requirement to actually generalise the endpoints of different WCF services,create a proxy and invoke the action.
We have like 4 pages and 4 services to serve those pages. For each n every page we have to call the specific service endpoint and invoke the action Example::
private IList<FunctionCodes> i_oFunctionList;
ChannelFactory<IFunctionService> m_oFunctionFactory;
IFunctionService m_oFunctionProxy;
m_oFunctionFactory = new ChannelFactory("FunctionServiceEndPoint");
i_oFunctionList= m_oFunctionProxy.GetAllFunction(iFirstResult, iMaxPageSize, "", "", "", out iRows);
BindGrid bindGrid = new BindGrid(DisplayGrid1); bindGrid.DataTable = BuildDataTable(i_oFunctionList);
So the requirement is we want to move this section(binding the grid) to a user control, generalising the endpoints, create the proxy and implement. Is there any way to achieve this? Quick responses are really appreciated.
© Stack Overflow or respective owner