c# - Same class comes within different web services -
I have 3 different web services working with the same class library, these three web services return the same class type object. . But on the customer side, I am getting 3 different object types, they are also similar. I can not treat them for a class type
I think I will add a method that can take the object and set the property with the object's prop.
Is there any way (something like a legacy)?
You can use (what visual studio is for web references behind scenes) and < Code> / shareTypes . As long as the types given by the 3 web services are actually the same type, the generated code will include only one generated square instead of duplicating it for every web service .
wsdl.exe / shareTypes Http: //server/service1.asmx http: //server/service2.asmx etc.
Comments
Post a Comment