Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6198367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:59:03+00:00 2026-05-24T03:59:03+00:00

I have a WCF web service that defines IInterface interface. This interface declares two

  • 0

I have a WCF web service that defines IInterface interface. This interface declares two methods: Method1 and Method 2. I want to expose both of these methods through a SOAP endpoint, but want only Method2 exposed through REST endpoint.

Example declarations:

[ServiceContract]
public Interface IInterface
{
    [OperationContract]
    void Method1();
    [OperationContract]
    void Method2();
}

public class MyService : IInterface
{
    public void Method1(){...}
    public void Method2(){...}
}

So far I have tried creating two additional interfaces: IInterfaceSOAP and IInterfaceREST, both inherited from IInterface. Removed Method2() declaration from IInterface and added it to IInterfaceSOAP and created two separate classes MyServiceSOAP : IInterfaceSOAP and MyServiceREST : IInterfaceREST. Then defined two separate endpoints for each derived class.

But when i test the service using WcfTestClient, the soap service only lists Method1() (the one that’s defined in the base IInterface).

Is the above pattern an accepted solution for selectively exposing methods through two separate endpoints? Or is there some other approach that I have missed?

Thanks in advance.

P.S. Please note the above interface is extremely simplified version of what i’m trying to do. There are a lot more methods in the production version.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T03:59:04+00:00Added an answer on May 24, 2026 at 3:59 am

    Nevermind… Due to huge number of methods i missed Method2. Since it was defined in a derived Interface, all methods in the base Interface came before this one and i missed it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WCF web service that implements a RESTful interface. We're using the
I have WCF web service and client that calls this service, This client will
Imagine this scenario: you have a WCF web service that gets hit up to
I have a silverlight 2 beta 2 application that accesses a WCF web service.
I have a WCF web service that returns a stream. At the client side
I have a WCF web service that uses ASP.NET session state. WCF sets a
I have a WCF web service that implements a parameter List<ICustomObject> . In the
I have a WCF web service that returns a string to a Java based
I wrote the most simple wcf service that have one method // return a+b
I have a WCF web service that is accepting some custom objects and a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.