Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between WSDL document and WSDL contract

I believe they are the same, a file in XML format as shown in the example below:

<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 WSDL document and WSDL contract?

like image 942
lowLatency Avatar asked Mar 22 '12 05:03

lowLatency


2 Answers

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

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

The content of the WSDL document defines the contract of the web service: what operations it has, how you must call them, what parameters it expects, what types do the parameters have etc. Basically it states the contract that you must follow to be able to successfully interact with the web service.

like image 94
Bogdan Avatar answered Sep 28 '22 04:09

Bogdan


WSDL Contract is a concept and belongs to concept of WebService "Contract first approach". The xml representation which is a concrete representation is known as WSDL document. It define all the details with predefined notations.

like image 26
Muhammad Abdur Rasheed Avatar answered Sep 28 '22 05:09

Muhammad Abdur Rasheed