简体   繁体   中英

WCF service with 2 service contracts

I wonder if this is possible.

I have a existing WCF service, being consumed by 8 clients. I have a new requirement of a new operation to be exposed for 2 clients, but don't want that the other 6 clients should be made aware of it. So if I add this new Operation to existing ServiceContract all the clients will have to update their reference.

Is this possible I make a new service contract which has all the Operations of the existing one plus the new operation, and the 2 client who want this operation can use new ServiceContract and other 6 clients keep using the existing service contract.

Yes, this is possible. Add a new endpoint that implements a separate interface and have the 2 clients add reference for the new supplementary interface. The existing service can work as it did previously.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM