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 6565825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:08:35+00:00 2026-05-25T14:08:35+00:00

I would like to replicate a given web-service for simulation purposes. The main idea

  • 0

I would like to replicate a given web-service for simulation purposes. The main idea is that the new service implements the same interface as an existing one (which I do not control in any way) but with different actual method implementations. I would, then, like to be able to redirect request to the real address or to the simulated one under certain testing conditions without having to change configurations. Is this possible to accomplish in WCF?

  • 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-25T14:08:36+00:00Added an answer on May 25, 2026 at 2:08 pm

    In terms of actually replicating the service, if the existing service exposes metadata, i.e. WSDL, then you can recreate the service by essentially doing the following:

    1. Browse to the wsdl and all the xsd’s that the wsdl references and save them all to disk.
    2. With those files, run the wsdl.exe utility passing it the wsdl and the xsd’s and use the /si option to generate a service interface.
    3. The output of that will be an interface file (c# file)
    4. Go into Visual Studio and create a new project of “WCF Service Application”
    5. Rename the initial Service1 (and interface) files and classes to the name of your new service and interface.
    6. Copy and paste the interface code generated above into the new service’s interface class file
    7. In the service class, implement the service methods with whatever implementation you want. (TIP: if you right click on the interface name in the file, you can use the “Implement Interface” option to have VS stub it out for you – nice feature.)
    8. Build it and you should be ready to go.

    In terms of toggling between the original and your new service, I suppose one option would be from the client side reference the different service endponts in code (versus config) and that way you could just toggle a switch to hit one service or the other…

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

Sidebar

Related Questions

I would like to replicate the spinner effect that Spinrite displays in the upper-right
I would like to replicate this in python: gvimdiff <(hg cat file.txt) file.txt (hg
I would like to replicate a MSSQL 2005 db (hosting through a shared hosting
My question is similar to this one , but I would like to replicate
Would like to make anapplication in Java that will not automatically parse parameters used
Hi I would like to replicate the setup. I'm currently trying to use a
I would like to replicate the tile/slide effect from the Google Chrome WebStore on
I would like to confirm that the following analysis is correct: I am building
I have an administrative application that I would like to be able to discover
I'm trying to learn the new ASP .NET MVC framework and would like to

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.