I have a question regarding the code design for a client application that will connect to external SOAP services. Basically, I need to write a client application in .NET that will connect to external servers from different providers. The user will provide the host addresses for WSDLs in the application UI. The service contracts WSDLs for these servers should be very similar to each other - in theory the same, but some very small deviations are expected. All services will have a GetDescription() method available which will allow me to differentiate between different implementations if such need occurs.

The question is: how would you design the code to consume those services?

I know that WCF gives me two possibilities - one is to create proxy classes via Visual Studio service references. While I believe this will work out-of-the-box, I think this makes my code tightly bound to the service itself and requires me regenerating code manually for services if anything changes. Another problem I see is that there will be many sets of proxy classes defined for different providers what is a huge pain.

Another one is a channel factory. That would give me more control over the implementation, but I wonder whether I can use it having no access to assemblies with service contracts, only to WSDLs.

Is there any other possibility? What would you suggest in such situation?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.