The difference between a WSDL document and a WSDL contract

I believe that they are the same, an XML file, as shown in the following example:

<definitions name="HelloService" targetNamespace="http://www.examples.com/wsdl/HelloService.wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.examples.com/wsdl/HelloService.wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> //other code </definitions> 

Is there a difference between a WSDL document and a WSDL contract?

+6
source share
3 answers

The difference is subtle. One of them refers to the WSDL itself (the document), the other relates to what the WSDL (contract) represents.

WSDL is an XML format for describing web services. This XML content (whether stored in a file or not) represents a WSDL document . In a large sense, a document is some structured information that you can use for something (for example, you can have a Word document, a PDF document, an XML document and ... a WSDL document).

The content of the WSDL document defines the web service contract: what operations it has, how you should call them, what parameters it expects, what types have parameters, etc. Basically, he indicates which one should follow in order to be able to successfully interact with the web service.

+5
source

The WSDL Contract is a concept and refers to the WebService "First Contract Approach" concept. An xml view, which is a specific view, is known as a WSDL document. It defines all parts with predefined designations.

+2
source

There is no such thing as a WSDL contract. There is a web services contract, and WSDL is part of its technical specification. There are other specifications that can be part of a web services contract, such as the WS-I basic profile or the basic security profile, which are not directly reflected in the WSDL, but in how your WSDL instance is defined. This means that you can define a WSDL that perfectly complies with the WSDL standard, but violates the Web services contract, for example, non-compliance with the basic security profile.

0
source

Source: https://habr.com/ru/post/911378/


All Articles