Piterowsky
Piterowsky

Reputation: 100

Why to use both XSD and WSDL to define domain model and web service contract

What is the purpose of using both files, XSD to define model and WSDL to define web service, contract when we can easily define model in WSDL and on this basis generate i.e. java classes?

If there is a purpose, what advantages we can get of separating these files

Upvotes: 0

Views: 229

Answers (1)

kimbert
kimbert

Reputation: 2422

Some SOAP services use an XML format that is specific to the service. In this scenario, a WSDL file that contains the XSD definitions is the most straightforward solution.

In other cases, the XML structures are used more widely. The XML Schema model needs to exist whether or not the WSDL uses it. In these cases it is more maintainable to refer to the XSD structures and not include them in the WSDL.

Upvotes: 1

Related Questions