none
is it need to provide seperate endpoints for each contracts ? RRS feed

  • Question

  • i developed wcf service which has self hosted service with contracts., interface1,interface2...each interface is implemented by separated class.how to provide the endpoint for each contracts? and how to consume this service methods from the client. why am asking this is, if my wcf service has n contracts then is it i need to add n endpoints. then how the client will consume the service is i need to provide n service references in client side??? please help me to fix this.
    Saturday, November 30, 2013 7:21 AM

Answers

  • Hi Gomathipriya,

    If your have multiple service contracts, then you have to expose them via multiple service endpoints. And if you implement them in different classes, you will have to setup multiple services to host them. For client-side, if you use Visual Studio Add Service Reference, it will generate multiple client proxies. You can consider using svcutil.exe tool to generate the client proxy code and manually merge them if you want to avoid multiple client proxies.

    #ServiceModel Metadata Utility Tool (Svcutil.exe)
    http://msdn.microsoft.com/en-us/library/aa347733(v=vs.110).aspx


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, December 2, 2013 3:40 AM
    Moderator