Why does WSDL present wsdl: message?

Why does WSDL present a wsdl: message message? And parts of the posts?

What advantage can they bring for the direct use of XSD in the parameters of operations (input, output, error)?

How can they (wsdl messages with parts of a wsdl message) be more abstract than XSD?

Why is it not organized, for example, in this way:

<operation name="GetEndorsingBoarder"> <input type="xsd:string"/> <output type="xsd:string, xsd:int, xsd:boolean"/> <fault "type="xsd:string""/> </operation> 
+4
source share
2 answers

I understood:

Messages do not just define operating parameters.

Messages and their parts are indicated in bindings. It should be possible to connect different parts in different ways:

 <message name="m1"> <part name="body" element="tns:GetCompanyInfo"/> </message> <message name="m2"> <part name="body" element="tns:GetCompanyInfoResult"/> <part name="docs" type="xsd:string"/> <part name="logo" type="tns:ArrayOfBinary"/> </message> <portType name="pt1"> <operation name="GetCompanyInfo"> <input message="m1"/> <output message="m2"/> </operation> </portType> <binding name="b1" type="tns:pt1"> <operation name="GetCompanyInfo"> <soap:operation soapAction="http://example.com/GetCompanyInfo"/> <input> <soap:body use="literal"/> </input> <output> <mime:multipartRelated> <mime:part> <soap:body parts="body" use="literal"/> </mime:part> <mime:part> <mime:content part="docs" type="text/html"/> </mime:part> <mime:part> <mime:content part="logo" type="image/gif"/> <mime:content part="logo" type="image/jpeg"/> </mime:part> </mime:multipartRelated> </output> </operation> </binding> 

I skipped this because non-SOAP bindings literally "" are so unusual.

+1
source

A XSD describes aspects of DATA , such as the data aspects of a webservice call, while WSDL describes the purpose of web services (method calls). Usually you cannot determine method calls from your data.

Check out Cheeso and Marc reviews on Creating WSDL from an XSD File

EDIT: source

message describes the exchange of data between the web service provider and the consumer, and each web service has two messages: 1) input: web service settings 2) output: return data from the web service

Each message has zero or more part parameters (one for each parameter of the web service function). Each part parameter is associated with a specific type defined in the types container element.

  <message name="SayHelloRequest"> <part name="firstName" type="xsd:string"/> </message> <message name="SayHelloResponse"> <part name="greeting" type="xsd:string"/> </message> 

Two message elements are defined here. The first is a SayHelloRequest request message, and the second is a SayHelloResponse response message.

Each of these messages contains an element with one part. For the request, the part indicates the parameters of the function; in this case we will specify one parameter firstName. For the answer, the part indicates the values ​​of the returned function; in this case, we will indicate one return value for the greeting.

0
source

All Articles