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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T10:06:17+00:00 2026-05-11T10:06:17+00:00

I have a web service project that has 2 asmx files. Let’s call them

  • 0

I have a web service project that has 2 asmx files. Let’s call them internal.asmx & external.asmx In practice, these have different clients:

Externally a client will call externalWS.PersistOrder(Order order ) and internally, we process the order internalWS ProcessOrder(Order order). Therefore the Order class is a shared dependency across these webservices.

I am writing a test application that calls different webmethods on both of these webservices.

I am having problems because the web services use the same classe. In order to use both webmethods, I am adding 2 webreferences to my test project. However, there are 2 copies of the dependant classes, with different namespaces. As a short term fix I am editing the classes that VS creates.

There has to be a better way! Thanks in advance for your help.

  • 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. 2026-05-11T10:06:18+00:00Added an answer on May 11, 2026 at 10:06 am

    I am not sure how (and if) you can modify the behavior of the VS web reference wizard.

    You could, however, use wsdl.exe or svcutil.exe (depending on whether you want System.Web or WCF-style client proxy to your services) from the command line and specify the appropriate option for shared types.

    For wsdl.exe the command line option you want is /sharetypes, though I haven’t touched it in years, so I don’t remember the exact usage details.

    For svcutil.exe the command line option you want is /reference:. This you to have the shared class in an assembly you can reference. If the only definition of the shared class you can get to is in the WSDL of the two services, you might need to use svcutil.exe to generate client proxy, trim it down to contain the shared class only and build a reference assembly from it for the actual client proxies for the two services.

    The drawback of this approach is that if the WSDL for one of the services change, you need to run the tool again. This can be mitigated by adding a custom task tot he BeforeBuild target in your project that runs the tool always against both services.

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

Sidebar

Ask A Question

Stats

  • Questions 92k
  • Answers 92k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer To me this looks like the wrong way to be… May 11, 2026 at 6:30 pm
  • Editorial Team
    Editorial Team added an answer Javascript objects are excellent for this purpose, since they are… May 11, 2026 at 6:30 pm
  • Editorial Team
    Editorial Team added an answer Everything uses the Repo - it's at the core of… May 11, 2026 at 6:30 pm

Related Questions

This is a very basic question. I'm just on my mission to learn ASP.NET
I am trying to install openID into my web site project that is using
I want to bounce an idea around. I have been building web services and
I have a WCF service that I have to reference from a .net 2.0

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.