The sense of defining several services in single WSDL file

web serviceswsdl

I understand it makes sense to exposes the same functionality (interface in WSDL 1.2, portType in WSDL 1.1) under different endpoints (ports in WSDL 1.1), depending on underlying transport protocol (definined by the binding). But what is the sense to put definitions of different services into a single WSDL? Especially, if each service exposes only a single operation?

For instance see the following WSDL file: http://seekda.com/cache?uri=http://score.itsc.uah.edu/services/catalog/SCOOPCatalogServices.wsdl&type=xml

WSDL1.2 specification mentions that "WSDL 1.1 supports having multiple services in a single WSDL file. This has caused confusion amongst users.". They resolve it by allowing "multiple services, where each MAY be of a different service type.". What does it mean — of different type here?

Maciej

Best Answer

What is the sense of defining several services in a single WSDL file?

The same sense, why you would define multiple interfaces with different operations in an object-oriented language: to modularize your service.

In theory I could pack all methods into one interface but since I want separation of concerns in my application I use different interfaces. Especially I want my Service Interfaces to correspond to back end implementations.

But important to remember: These services share types! Therefore it is very convenient to put it all into one WSDL.

Hope that's an acceptable reason ...

Related Topic