.Net Consuming Web Service: Identical types in two different services

前端 未结 5 1869
谎友^
谎友^ 2020-12-17 03:24

I have to consume 2 different web services. Both contain a definition for a \'user\' object.

When I reference the services using \"Add service reference\" I give e

5条回答
  •  悲哀的现实
    2020-12-17 04:04

    You can put the user type in a shared common assembly that both the services and the client project references. Then in the configuration for both service clients, you can choose the option of re-using types in referenced assemblies. That way, you're using the type inthe asssembly rather than a separately generated class.

提交回复
热议问题