Last post Jun 12, 2013 02:11 PM by l.laxmikant
Jun 11, 2013 02:17 AM|anoop verma|LINK
I have a wcf service and i want to expose different operation for different clients.How can i achieve that?
Jun 11, 2013 04:13 AM|Illeris|LINK
What do you mean by different operations? Different methods or with different contents? What do you mean by clients : connecting users or types of clients (web, wcf, mobile, ...) ?
Jun 11, 2013 05:18 AM|karthicks|LINK
hi, as far as i know you can do it two ways
i) define two service with contracts and expose two end points for differenet clients
ii) implement the service interface's explicity i.e while defining interface methods in service define like below
and expose two end point with the respective Contracts
Jun 12, 2013 02:11 PM|l.laxmikant|LINK
For this particular scenario you can have two different solutions
1. Implement multiple services with multiple endpoints and control the who is client by making one of the operation as "IsInitiating=True"
which will execute before actual operation and if necessary redirect to different operation.
If you want to have multiple services with multiple endpoints go through
2. Control the soap headers. Take the entire control of soap messages using MessageContract. Add the client details to the soap message header and in operation verify it and perform operation.
check how to deal with message contract