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

  • Home
  • SEARCH
  • 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 5967297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:55:25+00:00 2026-05-22T19:55:25+00:00

I have two web services , with little bit different API for example :

  • 0

I have two web services , with little bit different API for example :

void LOG(string , string ,out int)
int LOG(string ,string)

one of them is for production , and one is for testing .

What is the best practice in that case , how to write it in the code more nice looking …
and not make ugly #IF #ELSE statements in my main code.

The fist one is the production one , the second one is the test version.
And the functionality is the same in both versions.
the difference between them that I had a WSDL file from the original web service , i have used wsdl.exe yourFile.wsdl /l:CS /serverInterface and got my test service , but when I added it as reference to my application I have got a different proxy , and function signatures been little bit different.no idea why.

  • 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-22T19:55:26+00:00Added an answer on May 22, 2026 at 7:55 pm

    but when I added it as reference to my
    application I have got a different
    proxy , and function signatures been
    little bit different.no idea why

    I suppose it was made to avoid two methods with the same signature in web-service client’s class.
    If I get you right, you have 2 instances of webservice with one interface. then you don’t need to add two references to your project.
    Just specify location of web-service as a param on instantiation instead of using parameterless constructor.

    UPDATE
    Technically (since you tagged it with ‘design patterns’) you could use Strategy pattern for calls together with dependency injection.
    But if these instances of w/s are completely equal, I suggest you to find what’s wrong with these WSDL-s or generated client code. The problem is with generation of stubs, not with elegance in code.

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

Sidebar

Related Questions

I have two web applications running in the same Tomcat Instance. In one of
I have two medium-sized web applications that I'm merging into one. They are both
We have some web pages which have two frames, with one frame in the
I have a solution that contains two projects. One project is an ASP.NET Web
I have two web services that return the same type. It doesn't work... it
In this moment, I have two web applications(one application is an MVC2 application for
I have two web applications in the same server like this: /basedir/app1path/default1.aspx /basedir/app2path/default2.aspx How
I have two web applications and both are developed in ASP.NET. Now I want
Suppose you have two seperate ASP.NET Web Application projects that both need to use
I currently have an asp.net website hosted on two web servers that sit behind

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.