Custom Tool Warning: Cannot import wsdl:portType

I found the answers in What does this WCF error mean: “Custom tool warning: Cannot import wsdl:portType” help. In my case, I chose unticking the ‘Re-use types’ box and that solved it.

Additional Thoughts: SOA, Distributed Objects, & Coupling

The ”Service Oriented” Vision implied by a WSDL and the WS-* standards is that the WSDL itself tells your client everything you need to know use the service. On this vision, unticking the ‘Re-use types’ box is the correct approach. You shouldn’t be reusing types from anywhere except the wsdl.

Ticking the ‘re-use types’ box is more a “Distributed Objects” approach: your client and service become coupled through the types in a shared dll. This is a strong distributed dependency. If the shared objects are updated, the service and all its clients must be updated, all in sync with each other. This is one reason why distributed objects fell very much out of favour and SOA took over.

Unless you company chose (possibly accidentally, by sharing libraries on a Nuget feed) a distributed objects architecture, and understand the costs, I would always untick the re-use types.

It reduces coupling.

Leave a Comment